简体   繁体   English

将复杂的句子翻译成一组SPO三元组(RDF)(可能带有具体化)

[英]Translating a complex Sentence into set of SPO triple (RDF) (maybe with reification)

Having just started out in RDF and ontology, mainly in converting unstructured text to RDF (maybe manually), I found many examples for converting simple sentences to RDF triples 1 2 3 , but not much about complex sentences (using adjectives or adverbs) 4 . 刚刚开始使用RDF和本体,主要是将非结构化文本转换为RDF(可能是手动),我发现了许多将简单句子转换为RDF三元组1 2 3的例子,但对复杂句子(使用形容词或副词)的解释并不多4

Example of complex sentence: Those kids who, with great pleasure, like chocolate ice-cream and those who like vanilla ice-cream, which of them is better? 复杂句子的例子: 那些非常愉快的孩子,如巧克力冰淇淋和喜欢香草冰淇淋的人,哪些更好?

Never mind the meaning of the sentence, what is remarkable is the use of adjectives for ice-cream (chocolate, vanilla) and liking (with pleasure), and the comparison between the two types of kids (who is better) and a question. 没关系句子的意思,值得注意的是冰淇淋(巧克力,香草)和喜欢(愉快)的形容词的使用,以及两种类型的孩子(谁更好)和一个问题之间的比较。 How do we represent such sentences as a collection of SPO triple (RDF) statements - so that it can take care of adjectives, or adverbs or comparisons or other operations? 我们如何将这样的句子表示为SPO三元组(RDF)语句的集合 - 以便它可以处理形容词,副词或比较或其他操作?

S1: Kids - Liking - (ice-cream, flavor, Chocolate) S1:孩子 - 喜欢 - (冰淇淋,味道,巧克力)
S2: Kids - Liking - (ice-cream, flavor, Vanilla) S2:孩子 - 喜欢 - (冰淇淋,香精,香草)
S3: liking with pleasure S3:愉快地喜欢
S4: better(S1+S3, S2+S3) S4:更好(S1 + S3,S2 + S3)

Is there a general way to approach translating such statements?Where should one look for some exploration in this direction - unstructured text to n-tuples? 有没有一种通用的方法来翻译这样的陈述?在哪个方面应该寻找这方面的一些探索 - 非结构化文本到n元组? Maybe I am not asking the right questions - in that case please let me know. 也许我没有问正确的问题 - 在这种情况下请告诉我。 Thanks! 谢谢!

Far from attempting to describe a gneric way for translating such statements I thought of how that concrete example sentence could be modelled in RDF triples. 我没有试图描述翻译这些语句的通用方法,而是想到了如何在RDF三元组中建模这个具体的例句。

That's my first (late night) draft: 那是我的第一个(深夜)选秀:

@prefix : <https://example.org/> .

[] a :Question, :PreferenceQuestion;
   :option [ 
       a :GroupOfHumans;
       :ageGroup :young;
       :perfomingActivity [
          a :Activity, :LikingActivity;
          :mode :withPleasure;
          :object [
              :category :IceCream;
              :flavour :vanilla;
           ]
       ]
   ],
   [ 
       a :GroupOfHumans;
       :ageGroup :young;
       :perfomingActivity [
          a :Activity, :LikingActivity;
          :mode :withPleasure;
          :object [
              :category :IceCream;
              :flavour :chocolate;
           ]
       ]
   ].

This would be 23 triples using quite an expressive Question/Activity/IceCream ontology. 使用相当具有表现力的问题/活动/ IceCream本体,这将是23三倍。

That is a very difficult question that you are asking, there is not a single way to represent "semantic" in a graphical or tree or linkage structure that is definitive standard. 这是一个非常难以回答的问题,没有一种方法可以在图形或树或最终标准的链接结构中表示“语义”。

Look for instance at Google syntax parse , Link Grammar , Spacy dependency parse trees or Stanford NLP parser . 例如,在Google语法分析Link GrammarSpacy依赖解析树Stanford NLP解析器中查找。

See this question that is somewhat related, gives an example of link grammar parse result: How to translate syntatic parse to a dependency parse tree? 看到这个有点相关的问题,给出一个链接语法解析结果的例子: 如何将sytric解析转换为依赖解析树?

For more advanced approaches look at multinet and natural language to first-order-logic kind of approaches. 对于更高级的方法,将多语言自然语言 看作 一阶逻辑类方法。

Where should one look for some exploration in this direction - unstructured text to n-tuples? 人们应该在哪里寻找这方面的一些探索 - 非结构化文本到n元组?

You can represent what ever you want with n-tuples or 3-tuples, the thing is to know what and how to represent. 你可以用n元组或3元组表示你想要的东西,问题是要知道什么以及如何表示。

Last thing, you can come up with you are annotations, they are tools to do it like https://prodi.gy/ . 最后,你可以提出你的注释,它们是像https://prodi.gy/这样做的工具。 Have a look at this question that is seemingly unrelated but I give an example representation of questions that might help you achieve some task https://stackoverflow.com/a/32670572/140837 看看这个似乎无关的问题,但我举一个例子来表示可能有助于你完成某些任务的问题https://stackoverflow.com/a/32670572/140837

Good luck!! 祝好运!!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM