How to identify the subject of a sentence?

前端 未结 6 1623
我在风中等你
我在风中等你 2020-12-14 18:53

Can Python + NLTK be used to identify the subject of a sentence? From what I have learned till now is that a sentence can be broken into a head and its dependents. For e.g.

6条回答
  •  太阳男子
    2020-12-14 19:31

    You can paper over the issue by doing something like doc = nlp(text.decode('utf8')), but this will likely bring you more bugs in future.

    Credits: https://github.com/explosion/spaCy/issues/380

提交回复
热议问题