【问题标题】:How to get a list of parts of speech and words from Princeton English WordNet?如何从普林斯顿英语 WordNet 中获取词类和单词列表?
【发布时间】:2019-04-21 12:48:52
【问题描述】:

我想要一份完整的英语单词词性列表(例如 adj.、adv. 和 .v)。我只需要一个包含两列的 TSV 表,第一列是单词,第二列是 POS。

我知道 wordnet 应该包含这样的信息。但它包含的比我需要的要多。我不确定我应该使用哪个文件。

https://wordnet.princeton.edu/download

有人知道包含英语单词及其词性的易于使用的文件吗?谢谢。

【问题讨论】:

    标签: nlp nltk stanford-nlp wordnet part-of-speech


    【解决方案1】:

    Wordnet 不会给你每个说的“单词”,而是给你引理。

    from nltk.corpus import wordnet as wn
    
    for ss in wn.all_synsets():
        for lemma in ss.lemma_names():
            print(ss.offset() + '\t' + ss.pos() +'\t' + lemma)
    

    【讨论】:

      猜你喜欢
      • 2017-06-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多