Remove a verb as a stopword

前端 未结 3 1637
谎友^
谎友^ 2021-01-07 07:29

There are some words which are used sometimes as a verb and sometimes as other part of speech.

Example

A sentence with the meaning of the w

3条回答
  •  渐次进展
    2021-01-07 08:01

    You can do something like this in Python .

    import ntlk
    >>> text = word_tokenize("And now for something completely different")
    >>> nltk.pos_tag(text)
    [('And', 'CC'), ('now', 'RB'), ('for', 'IN'), ('something', 'NN'),
    ('completely', 'RB'), ('different', 'JJ')]
    

    And add youre filter to eliminate Verbs for instance .

    Hope this is helpful !

提交回复
热议问题