We have news URLS, which we want to classify into crimes or non-crimes and further identify criminals by using NERs. For creating a model that identifies criminals, we tried SPacy which gave all the names like lawyers name , president ,criminal etc.. can Anyone help on how to get only Criminal name, Not all these irrelevant names. I am just a beginner trying things, any help is appreciated Thanks in Advance
2 Answers
As mentioned by @Edmund you can use public library but where is fun in that. My suggestion: Try to create a set of words which are negative in sentiment. Words like guilty, murdered, snatch etc... Now from NER you are already getting the names. Find the word distance of of these names with the negative words and the name with least distance will be the culprit.
To build a set of negative words, get all crime news and from that pick the frequently occurring words. Some manual cleaning right be required.
-
$\begingroup$ Hi Shivam this seems to be a good approach. I am thinking of giving this word distance and creating similar things as features, and feeding them to Machine Learning Model, which can classify it as Criminal or Not. For that I need training data are, you aware of any public data set, or I have to create it manually. @shivam shah $\endgroup$ Commented Oct 18, 2019 at 6:47
-
$\begingroup$ Nothing I am aware of. But there are some public new data sources which people use for news classification. That might be helpful. $\endgroup$ Commented Oct 18, 2019 at 8:54
By downloading the Free Wolfram Engine for Developers you may use Wolfram Language. If you are using Python then use the Wolfram Client Library for Python to access the engine in Python.
You may use FindTextualAnswer
.
FindTextualAnswer["Person Jane Doe found guilty in case, Judge John Dude to give final verdict on it tomorrow.",
"Who was found guilty?",
TargetDevice -> "GPU"]
"Jane Doe"
FindTextualAnswer["Person Jane Doe found guilty in case, Judge John Dude to give final verdict on it tomorrow.",
"Who was the judge?",
TargetDevice -> "GPU"]
"John Dude"
Hope this helps.
Person XYZ found guilty in case, Judge ABC to give final verdict on it tomorrow
. When I use NER it give me ABC & XYZ both names. I only want Criminal name like here XYZ $\endgroup$