当前位置: 首页>>代码示例>>Java>>正文


Java CleartkSequenceAnnotator.initialize方法代码示例

本文整理汇总了Java中org.cleartk.ml.CleartkSequenceAnnotator.initialize方法的典型用法代码示例。如果您正苦于以下问题:Java CleartkSequenceAnnotator.initialize方法的具体用法?Java CleartkSequenceAnnotator.initialize怎么用?Java CleartkSequenceAnnotator.initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.cleartk.ml.CleartkSequenceAnnotator的用法示例。


在下文中一共展示了CleartkSequenceAnnotator.initialize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testBadFileName

import org.cleartk.ml.CleartkSequenceAnnotator; //导入方法依赖的package包/类
@Test
public void testBadFileName() throws Throwable {
  try {
    CleartkSequenceAnnotator<String> classifierAnnotator = new StringTestAnnotator();
    classifierAnnotator.initialize(UimaContextFactory.createUimaContext(
        GenericJarClassifierFactory.PARAM_CLASSIFIER_JAR_PATH,
        new File(outputDirectoryName, "asdf.jar").getPath()));
    classifierAnnotator.classify(Collections.singletonList(InstanceFactory.createInstance(
        "hello",
        1,
        1)));
    fail("expected exception for invalid classifier name");
  } catch (ResourceInitializationException e) {
  }
}
 
开发者ID:ClearTK,项目名称:cleartk,代码行数:16,代码来源:CleartkSequenceAnnotatorTest.java

示例2: testStringClassifierStringAnnotator

import org.cleartk.ml.CleartkSequenceAnnotator; //导入方法依赖的package包/类
@Test
public void testStringClassifierStringAnnotator() throws Exception {
  CleartkSequenceAnnotator<String> classifierAnnotator = new StringTestAnnotator();
  classifierAnnotator.initialize(UimaContextFactory.createUimaContext(
      CleartkSequenceAnnotator.PARAM_CLASSIFIER_FACTORY_CLASS_NAME,
      StringTestClassifierFactory.class.getName()));
  classifierAnnotator.classify(Collections.singletonList(InstanceFactory.createInstance(
      "hello",
      1,
      1)));
}
 
开发者ID:ClearTK,项目名称:cleartk,代码行数:12,代码来源:CleartkSequenceAnnotatorTest.java

示例3: testChildClassifierParentAnnotator

import org.cleartk.ml.CleartkSequenceAnnotator; //导入方法依赖的package包/类
@Test
public void testChildClassifierParentAnnotator() throws Exception {
  CleartkSequenceAnnotator<Parent> classifierAnnotator = new ParentTestAnnotator();
  classifierAnnotator.initialize(UimaContextFactory.createUimaContext(
      CleartkSequenceAnnotator.PARAM_CLASSIFIER_FACTORY_CLASS_NAME,
      ChildTestClassifierFactory.class.getName()));
}
 
开发者ID:ClearTK,项目名称:cleartk,代码行数:8,代码来源:CleartkSequenceAnnotatorTest.java

示例4: testGenericClassifierGenericAnnotator

import org.cleartk.ml.CleartkSequenceAnnotator; //导入方法依赖的package包/类
@Test
public void testGenericClassifierGenericAnnotator() throws Exception {
  CleartkSequenceAnnotator<Object> classifierAnnotator = new TestAnnotator<Object>();
  classifierAnnotator.initialize(UimaContextFactory.createUimaContext(
      CleartkSequenceAnnotator.PARAM_CLASSIFIER_FACTORY_CLASS_NAME,
      TestClassifierFactory.class.getName()));
}
 
开发者ID:ClearTK,项目名称:cleartk,代码行数:8,代码来源:CleartkSequenceAnnotatorTest.java


注:本文中的org.cleartk.ml.CleartkSequenceAnnotator.initialize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。