Stanford NLP Get Component Activity Issue

activities
nlp
p_qa

#1

Hi Guys,
How to extract Location from the Stanford Core NLP sentence(Output of Text analysis activity) using Get components activity.I have tried the named entity (component type) in Get components for extracting, but it returns the raw sentence only.

Eg:
Activity: Get Component(Named Entity)
Input: “I have to go USA from London”
Output: (I, ),(have, ),(to, ),(go, ),(USA, )_(from, ),(London, )
Issue: Not recognize the Location(USA,London)

Thanks,
Tharma KS


#2

In RawResult output, I can see London and USA are recognized as sentences.

{‘after’: ‘’,
‘before’: ’ ',
‘characterOffsetBegin’: 22,
‘characterOffsetEnd’: 28,
‘index’: 7,
‘lemma’: ‘London’,
‘ner’: ‘CITY’,
‘originalText’: ‘London’,
‘pos’: ‘NNP’,
‘word’: ‘London’}

Though, I am not able to try ‘Get Components’ activity as I see following compilation error for ‘Sentences’ output in ‘text analysis’ activity. I am trying on 2018.2.3-beta.4.

image

nlpOutput variable seems to initialized correctly as well:
image


#3

You ll need to go to the Imports panel and import manually the stanford type of variable


#4

Hi,
Now I got the named entities, but how can I get the date value.

Eg:
O/P: (Today,Date)
From o/p I have to get the Today live date value in date format(yyyy-mm-dd)

Thanks,
Tharma KS