You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/libs/community/langchain_community/document_loaders/parsers
bachr b3ed98dec0
community[patch]: avoid KeyError when language not in LANGUAGE_SEGMENTERS (#15212)
**Description:**

Handle unsupported languages in same way as when none is provided 
 
**Issue:**

The following line will throw a KeyError if the language is not
supported.
```python
self.Segmenter = LANGUAGE_SEGMENTERS[language]
```
E.g. when using `Language.CPP` we would get `KeyError: <Language.CPP:
'cpp'>`

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
8 months ago
..
html community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
language community[patch]: avoid KeyError when language not in LANGUAGE_SEGMENTERS (#15212) 8 months ago
__init__.py community[minor]: New documents loader for visio files (with extension .vsdx) (#16171) 8 months ago
audio.py community[patch]: Refactor OpenAIWhisperParserLocal (#15150) 8 months ago
doc_intelligence.py community: fix the "page" mode in the AzureAIDocumentIntelligenceParser (bug) (#15958) 8 months ago
docai.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
generic.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
grobid.py community[patch]: Update grobid.py (#16298) 8 months ago
msword.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
pdf.py docs, experimental[patch], langchain[patch], community[patch]: update storage imports (#15429) 8 months ago
registry.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
txt.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
vsdx.py community[minor]: New documents loader for visio files (with extension .vsdx) (#16171) 8 months ago