Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. from textblob import TextBlob
  2. import nltk
  3. from gingerit.gingerit import GingerIt
  4.  
  5. blob = TextBlob("my name is john")
  6. data = blob.sentences
  7. a=[]
  8. parser = GingerIt()
  9. for sentence in blob.sentences:
  10. strVal = str(sentence)
  11. text = parser.parse(strVal.lstrip())['result']
  12. a.append(text)
  13.  
  14. fullStrVal =(' '.join(a))
  15. print (fullStrVal)
  16.  
  17. blob = TextBlob("my name is asasasa")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement