Lemon-Model:SenseContext对象的实例化

时间:2015-01-12 15:17:48

标签: java

目前我尝试将一些xml文件转换为Lemon模型。我使用Lemon API和lemon工厂来创建所需对象的实例。不幸的是,我无法找到如何实例化SenseContext类的对象。

E.g。 Lexical Sense可以像这样创建:

LexicalSense lclsns = factory.makeSense(senseURI); 

其中factory是LemonFactory的一个实例。对于SenseContext,在LemonFactory中没有make函数,并且尝试使用方法make()没有用,即:

SenseContext sns = factory.make(SenseContext.class, snsURI, snsURI); 

(插入两次相同的URI只是出于测试原因)。

有谁能告诉我如何正确实例化SenseContext对象?

提前致谢!

添加(2015年12月1日 - 17:47):可以在此处找到有关API的文档:http://lemon-model.net/apidocs/index.html以及此处的API本身http://lemon-model.net/download/api.php

1 个答案:

答案 0 :(得分:0)

这里是Lemon API的javadoc api中的搜索结果:

SenseContext

根据这个你需要使用:

LinguisticOntology.getContext(String name)

LexInfo.getContext(String name)

编辑:

仍然根据javadoc,该界面只有一个实现,所以你的选择是: http://lemon-model.net/apidocs/eu/monnetproject/lemon/impl/class-use/ContextImpl.html

AccepterFactory.getContextImpl(URI uri) 

AccepterFactory.getContextImpl(String bNode) 
相关问题