langextract
A Python library for extracting structured information from unstructured text using LLMs with precise source grounding and interactive visualization.
File Explorer
Download Latest Version (.zip)- 1-bug.md
- 2-feature-request.md
- config.yml
- pull_request_template.md
- add-new-checks.sh
- add-size-labels.sh
- revalidate-all-prs.sh
- zenodo_publish.py
- auto-update-pr.yaml
- check-infrastructure-changes.yml
- check-linked-issue.yml
- check-pr-size.yml
- check-pr-up-to-date.yaml
- ci.yaml
- publish.yml
- revalidate-pr.yml
- validate-community-providers.yaml
- validate_pr_template.yaml
- zenodo-publish.yml
- benchmark.py
- config.py
- fuzzy_benchmark.py
- plotting.py
- utils.py
- langextract_concept.gif
- langextract_concept.html
- langextract_concept_still.png
- logo.svg
- medication_entity.gif
- medication_entity_re.gif
- romeo_juliet_basic.gif
- romeo_juliet_full.gif
- batch_api_example.md
- japanese_extraction.md
- longer_text_example.md
- medication_examples.md
- output_schema.md
- __init__.py
- provider.py
- schema.py
- pyproject.toml
- README.md
- test_example_provider.py
- romeo_juliet_extraction.ipynb
- .dockerignore
- demo_ollama.py
- docker-compose.yml
- Dockerfile
- README.md
- __init__.py
- exceptions.py
- inference.py
- README.md
- registry.py
- schema.py
- __init__.py
- base_model.py
- data.py
- debug_utils.py
- exceptions.py
- format_handler.py
- output_schema.py
- schema.py
- tokenizer.py
- types.py
- __init__.py
- gemini.py
- openai.py
- __init__.py
- builtin_registry.py
- gemini.py
- gemini_batch.py
- ollama.py
- openai.py
- openai_batch.py
- patterns.py
- README.md
- router.py
- __init__.py
- annotation.py
- chunking.py
- data.py
- data_lib.py
- exceptions.py
- extraction.py
- factory.py
- inference.py
- io.py
- plugins.py
- progress.py
- prompt_validation.py
- prompting.py
- py.typed
- registry.py
- resolver.py
- schema.py
- tokenizer.py
- visualization.py
- create_provider_plugin.py
- validate_community_providers.py
- basic_extraction.py
- multiple_documents.py
- relationship_extraction.py
- prompt-validation.md
- providers.md
- resolver-params.md
- README.md
- SKILL.md
- .pylintrc
- annotation_test.py
- chunking_test.py
- create_provider_plugin_test.py
- data_lib_test.py
- extract_precedence_test.py
- extract_schema_integration_test.py
- factory_schema_test.py
- factory_test.py
- format_handler_test.py
- fuzzy_alignment_cases_test.py
- gemini_retry_test.py
- inference_test.py
- init_test.py
- io_test.py
- openai_batch_test.py
- progress_test.py
- prompt_validation_test.py
- prompting_test.py
- provider_plugin_test.py
- provider_schema_test.py
- registry_test.py
- resolver_test.py
- schema_test.py
- test_gemini_batch_api.py
- test_kwargs_passthrough.py
- test_live_api.py
- test_ollama_integration.py
- tokenizer_test.py
- visualization_test.py
- .gitignore
- .pre-commit-config.yaml
- .pylintrc
- autoformat.sh
- CITATION.cff
- COMMUNITY_PROVIDERS.md
- CONTRIBUTING.md
- Dockerfile
- LICENSE
- pyproject.toml
- README.md
- tox.ini
# Installation Guide
git clone https://github.com/google/langextract
Downloads the entire project code from GitHub to your computer.
cd langextract
Moves into the project folder you just downloaded.
2. Official Install Script
Easy Recommended- Python 3 Python is required to use pip.
pip install langextract
Installs the package published on PyPI directly β no need to clone the source.
Pulled directly from this repo's README.
3. Docker
Easy- Git Needed to download the project code from GitHub.
- Docker Desktop Needed to build and run containers. Install it and keep it running in the background.
docker build -t langextract .
Builds a runnable image based on the Dockerfile.
docker run --rm -e LANGEXTRACT_API_KEY="your-api-key" langextract python your_script.py
Runs the built image as an actual container.
Pulled directly from this repo's README.
4. Python
Easyf.write(html_content.data) # For Jupyter/Colab
Type this command into your terminal and run it.
pip install langextract
Installs the package published on PyPI directly β no need to clone the source.
python -m venv langextract_env
Runs the Python script (or module).
pip install -e .
Installs the Python libraries listed in requirements.txt (or similar).
pip install -e ".[dev]"
Installs the Python libraries listed in requirements.txt (or similar).
Pulled directly from this repo's README.
