Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from textblob import TextBlob
- import nltk
- from gingerit.gingerit import GingerIt
- blob = TextBlob("my name is john")
- data = blob.sentences
- a=[]
- parser = GingerIt()
- for sentence in blob.sentences:
- strVal = str(sentence)
- text = parser.parse(strVal.lstrip())['result']
- a.append(text)
- fullStrVal =(' '.join(a))
- print (fullStrVal)
- blob = TextBlob("my name is asasasa")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement