diff --git a/libs/community/langchain_community/document_loaders/parsers/language/language_parser.py b/libs/community/langchain_community/document_loaders/parsers/language/language_parser.py index 97444d294609a..8709b58becf42 100644 --- a/libs/community/langchain_community/document_loaders/parsers/language/language_parser.py +++ b/libs/community/langchain_community/document_loaders/parsers/language/language_parser.py @@ -27,10 +27,10 @@ ) if TYPE_CHECKING: - from langchain.langchain.text_splitter import Language + from langchain.text_splitter import Language try: - from langchain.langchain.text_splitter import Language + from langchain.text_splitter import Language LANGUAGE_EXTENSIONS: Dict[str, str] = { "py": Language.PYTHON, diff --git a/libs/langchain/langchain/text_splitter.py b/libs/langchain/langchain/text_splitter.py index a2c048f686ba6..1f382a53d0ef9 100644 --- a/libs/langchain/langchain/text_splitter.py +++ b/libs/langchain/langchain/text_splitter.py @@ -843,6 +843,9 @@ class Language(str, Enum): SOL = "sol" CSHARP = "csharp" COBOL = "cobol" + C = "c" + LUA = "lua" + PERL = "perl" class RecursiveCharacterTextSplitter(TextSplitter):