Hi Valentina,
I am very glad to hear you are happy :)
The answer to your question very much depends on what you mean by
semi-structured text. The easiest and most accurate way to achieve your
goal is to use well structured xml files. Upon load, GATE parses those
documents and creates "Original markups" annotations, based on the
tags in the document. It's an easy road. You should transform the
annotation you are interested in, let's say Artist for example, into one
of the following annotations :
"Entity",
"Organization",
"Person",
"Time",
"Date",
"Percent",
"Location",
"Position",
"Money",
"Abstract",
"ContactInfo",
"Object",
"Event",
"Brand",
"GeneralTerm",
"KeyPhrase",
"KeyPerson",
"KeyOrganization",
"KeyLocation"
it may be "Person". Then put a class feature to it. I will explain why
this is needed. As I explained in one of my previous e-mails, the
Instance Generator processing resource removes all the annotations
which are not in this list. It is considered that they are temporary and
used only for the information extraction, they don't correspond to
entities in the semantic repository and they should not be present in
the document repository. Putting a class feature makes the Instance
Generator create an instance and attach it to the annotation. That is
how the recognized entities are inserted in the semantic repository.
If you use a plain text file, you will have to analyze the string tokens
to extract the entities you are interested in. There are plenty of good
examples in context/default/resources/grammar/main . Have in mind that
this is far less accurate approach and should be carefully implemented
and tested.
If you can provide your data in XML format with no big cost, it's better
to do it this way.
Happy holiday,
Philip
Valentina De Vivo wrote:
Dear list,
I have solved all my problems in using KIM and I'm very happy.
But I have one last curiosity:
If I have a text (a document) in which I know exactly where there are
"names
of singers" or "titles of songs", because for example
1) they are preceded by a predefined pattern (keywords),
2) or because in a semi-structured text they are enclosed in tags,
3) or becase they are in a predefined position in the document....
now is there a quickly way to capture and put them in KIM knowledge base
(referring to my music ontology)? A way to automate generation of N-triples
during the processing of the document?
If yes, please give me some advice on how to do... and please tell me
which
of the three cases above is easier to treat.
It's not urgent, but I am very interested in actually achieving something
like that I said.
Greetings and thanks so much to all for your past support!! ;-)
Valentina
_______________________________________________
Kim-discussion mailing list
[email protected]
http://ontotext.com/mailman/listinfo/kim-discussion
_______________________________________________
Kim-discussion mailing list
[email protected]
http://ontotext.com/mailman/listinfo/kim-discussion