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 97444d2946..8709b58bec 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 @@ from langchain_community.document_loaders.parsers.language.typescript import ( ) 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 a2c048f686..1f382a53d0 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):