I am calling a service that analyzes a paragraph and highlights concepts/words that I provide in this format
{
"paragraph": "My dog got sick on 12/13/2010. Then he died on 01/13/2011."
"concept":[
{
"start": "6",
"end": "9",
"word": "sick"
},
{
"start": "35",
"end": "38",
"word": "died"
}]
}
What is the best way to relate the date to the word/concept?
I have tried doing a sentence parsing and working with regex and it gave some success but for more complicated paragraphs and sentence structures, it was failing.
If anyone has suggestions or recommends some type of NLP framework, it would be most appreciated.
Example of what I might the end result to look like:
{
"paragraph": "My dog got sick on 12/13/2010. Then he died on 01/13/2011."
"concept":[
{
"start": "6",
"end": "9",
"word": "sick",
"date" 12/13/2010"
},
{
"start": "35",
"end": "38",
"word": "died",
"date" 01/13/2011"
}]
}
I am using STS, JAVA 8, Spring Frameworks