How to create a negative offer result in nltk

I am new to NLTK. I would like to create a negative sentence (which usually will be in the present tense). For example, there is a function that allows me to convert: "I am running" to "I am not starting"

or

"She is running" to "She is not working."

I suppose I could use POS to detect the verb and its previous pronoun, but I'm just wondering if there was a simpler built-in function

+4
source share
3 answers

You must use the parser to find the head (verb) of the predicate of the sentence.

, , ( ), .

1 (was > , will > , have > have not ..). , : , - (.. ), , , (.. ), , 3- (.. ). (, , ).

- , ShaiCohen . , . , . : , - > , - .

API.

1 , . ...

+2

, . , , , , " ". , , , " , ", 3 ? , "", . , "" "", - . , " ", " ", / . , . , ( - POS), , .

+7

, , , , , . :

a. I didn’t see anyone at the office
b. * I saw anyone at the office
c. I saw someone at the office  

() (), (), - -.

, . : "" " " .

+1

Source: https://habr.com/ru/post/1540388/


All Articles