NLTK for Named Entity Recognition

前端 未结 3 665
南方客
南方客 2021-01-30 11:33

I am trying to use NLTK toolkit to get extract place, date and time from text messages. I just installed the toolkit on my machine and I wrote this quick snippet to test it out:

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-30 12:02

    If you wish to correctly identify the date or time from the text messages you can use Stanford's NER.

    It uses the CRF(Conditional Random Fields) Classifier. CRF is a sequential classifier. So it takes the sequences of words into consideration.

    How you frame or design a sentence, accordingly you will get the classified data.

    If your input sentence would have been Let's meet on wednesday at 9am., then Stanford NER would have correctly identified wednesday as date and 9am as time.

    NLTK supports Stanford NER. Try using it.

提交回复
热议问题