Hey everyone

I am really thankful to those who tried to answer my previous questions.I have another question which goes as follows:

I have a sentence as following

"The dog chased the cat."

This is what I get after parsing:

(ROOT (S (NP (DT The) (NN dog)) (VP (VBD chased) (NP (DT the) (NN cat))) (. .))) Now I need to make triples and also draw ontology. How to do it? Are there any tools available for this purpose but I need something which does triple formation and ontology drawing automatically.

asked 03 Nov '12, 09:45

sww's gravatar image

sww
4526
accept rate: 0%


IMO, you'd better use the dependency parsing technique instead of the one you're doing now which is called the constituency parsing. This way you'd find it quite straightforward to get the triples from a sentence. Say, I have the following sentence:

Bell, based in Los Angeles, makes and distributes electronic, computer and building products.

The dependency graph for the sentence is the following:

nsubj(makes-8, Bell-1)
nsubj(distributes-10, Bell-1)
partmod(Bell-1, based-3)
nn(Angeles-6, Los-5)
prep_in(based-3, Angeles-6)
conj_and(makes-8, distributes-10)
amod(products-16, electronic-11)
conj_and(electronic-11, computer-13)
amod(products-16, computer-13)
conj_and(electronic-11, building-15)
amod(products-16, building-15)
dobj(makes-8, products-16)
dobj(distributes-10, products-16)

And guess what? Yes, the results are already in triples. You just need to annotate them with terms from some NLP (Natural Language Processing) ontology.

References:

  1. Constituency vs Dependency Parsing
  2. Stanford typed dependencies manual
  3. Stanford Parser
permanent link

answered 03 Nov '12, 14:49

fadirra's gravatar image

fadirra
1.2k310
accept rate: 21%

@fadirra Thank you so much.But can you help a bit further regarding how to annotate them exactly. I mean NLP ontology and tools to use.

(04 Nov '12, 04:23) sww sww's gravatar image
1

This paper that I wrote might give you some ideas of how to do the job: http://ir.cs.ui.ac.id/publication/2010/owlizr.pdf

(04 Nov '12, 18:29) fadirra fadirra's gravatar image

I went through it but the KB Generator and KB Reasoner, I cannot find a way to do it, I mean are there any tools available to do that or may be I am not getting it properly.

(04 Nov '12, 22:32) sww sww's gravatar image

@fadirra Can you help further in this regard

(21 Jan '13, 03:49) sww sww's gravatar image
-2

@fadirra, can you advise me, please.

I have a document that has been through NIF (NLP2RDF), providing me with an ontology of the document and its sentences. This combines with a number of owl ontologies (olia, Stanford, Penn), to define grammar classes (nsubj, dobj, etc) and instances (sentences and words).

Using Stanford's CoreNLP, I can obtain a dependency graph for each sentence. How do I relate the two? How do I turn nsubj(makes-8, Bell-1) into an asserted fact?

I need to assert that the sentence has an instance of the class nsubj with a head (Bell) and a dependent (makes).

permanent link

answered 15 Aug '13, 08:09

afro54's gravatar image

afro54
94
accept rate: 0%

Why do you ask the same question here as an answer of another question?

(15 Aug '13, 16:54) AKSWMember AKSWMember's gravatar image

Because I don't see my question as an answer of another question.

If you really wanted to help, you might at least point out the other question, that you think has the answer that I require.

My question concerns the representation of grammar relationships in an ontology, and I have looked long and hard for an answer, with no joy.

That being said, you're the only one to reply, so thank you .

(16 Aug '13, 07:08) afro54 afro54's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×91
×34
×30
×30

question asked: 03 Nov '12, 09:45

question was seen: 1,561 times

last updated: 16 Aug '13, 07:08