跳到主要内容
CoNLL-U 是 CoNLL-X 格式的修订版。注释被编码在纯文本文件中(UTF-8 编码,规范化为 NFC,仅使用 LF 字符作为换行符,文件末尾包含一个 LF 字符),包含三种类型的行:
  • 词行(Word lines),包含一个单词/词元(token)的注释,分为10个字段,用单个制表符分隔;详见下文。
  • 空行(Blank lines),标记句子边界。
  • 注释行(Comment lines),以哈希符号(#)开头。
这是一个如何加载 CoNLL-U 格式文件的示例。整个文件被视为一个文档。示例数据(conllu.conllu)基于一个标准的 UD/CoNLL-U 示例。
from langchain_community.document_loaders import CoNLLULoader
loader = CoNLLULoader("example_data/conllu.conllu")
document = loader.load()
document
[Document(page_content='They buy and sell books.', metadata={'source': 'example_data/conllu.conllu'})]

以编程方式连接这些文档到 Claude、VSCode 等,通过 MCP 获取实时答案。
© . This site is unofficial and not affiliated with LangChain, Inc.