Hi Kaspar,
I have added a JAPE rule to catch this case. The two files attached
contain the main jape file main.jape which is only changed to include
the new jape, and the new jape itself called long_name.jape . You are
correct that the Fischer detected by the gazetteer is not the right
Fischer. The rule should catch those cases and create a recognized
entity for the whole name.
Thanks again for the information.
Feel free to ask questions.
Philip
Kaspar Fischer wrote:
Dear list,
I have just installed kim-platform-2.3-RC1 and started playing around
with it on MacOS 10.5.6. I am trying to annotate documents but do not
manage to have names in documents recognised.
More precisely, I did the following. Using
./bin/tools/toolPopulate.sh
I added two ASCII documents with the contents
Do you know Nicole Meier, who is Martin Fischer's girlfriend?
and
Immob Inc., a company owned by Martin Fischer, is based in Basel,
Switzerland.
respectively. I then launched http://localhost:8080/KIM and performed
a keyword search for "Fischer". This shows me the two documents. If I
click on the former document and click the link "Show All Document
Entities", I see that in the sentence
Do you know Nicole Meier, who is Martin Fischer's girlfriend?
only the word "Fischer" was recognised as a named entity. Neither
"Martin Fischer" nor "Nicole Meier" were recognised.
It seems that "Fischer" was recognised because the World Knowledge
Base contains an entry for Joschka Fischer, a German politician.
Could it be that only known entities are recognised?
Many thanks for any pointers!
Kaspar
P.S. I also tried changing com.ontotext.kim.KIMConstants.IE_APP in
config/nerc.properties from "IE-no-keywords.gapp" to "IE.gapp" -- with
the same results. I do not know however whether this is related to the
problem I am seeing.
P.P.S. A side not on installing KIM on MacOS X: This worked almost
perfectly and I only encountered one tiny issue that the KIM
developers might be interested in: In config/config_machine.sh, line
29, there is a check for tools.jar, which on MacOS X is not available
in a standard location, see
http://developer.apple.com/documentation/Java/Conceptual/Java14Development/02-JavaDevTools/JavaDevTools.html
After uncommenting this check, KIM ran without any problems at all!
_______________________________________________
Kim-discussion mailing list
[email protected]
http://ontotext.com/mailman/listinfo/kim-discussion
/*
* main.jape
* Copyright 2002-2005 Sirma AI, Ontotext Lab.
*/
MultiPhase: KIM_NER_Grammars
Phases:
first
remove_upper
jobtitle
firstname
person_name
long_name
organization_name
location_name
facilities_name
date_pre
date
reldate
number
address
url_pre
url
email
identifier
spuriousname
final
unknown
unknown_post
number_type
number_type_post
cover_entity
/*
* long_name.jape
*/
Phase: LongName
Input: Token Person
Options: control = appelt debug = no
Rule: LongName
Priority: 100
(
({Token.category == NNP})*
({Person}):prsn
({Token.category == NNP})*
):person
-->
{
gate.AnnotationSet perSet = (gate.AnnotationSet)bindings.get("person");
gate.Annotation perAnn = (gate.Annotation)perSet.iterator().next();
gate.AnnotationSet prsnSet = (gate.AnnotationSet)bindings.get("prsn");
gate.Annotation prsnAnn = (gate.Annotation)perSet.iterator().next();
gate.FeatureMap features = Factory.newFeatureMap();
features.put("class", prsnAnn.getFeatures().get("class"));
features.put("rule", "LongName");
annotations.add(perSet.firstNode(), perSet.lastNode(), "Person",
features);
annotations.removeAll(prsnSet);
}
_______________________________________________
Kim-discussion mailing list
[email protected]
http://ontotext.com/mailman/listinfo/kim-discussion