Examples of SemanticClasses


Examples of org.apache.ctakes.assertion.util.SemanticClasses

public class AssertionAboveLeftTreeExtractor implements SimpleFeatureExtractor {
  protected SemanticClasses sems = null;

  public AssertionAboveLeftTreeExtractor() throws CleartkInitializationException{
    try{
      sems = new SemanticClasses(FileLocator.getAsStream("org/apache/ctakes/assertion/all_cues.txt"));
    }catch(Exception e){
      throw new CleartkInitializationException(e, "org/apache/ctakes/assertion/semantic_classes", "Could not find semantic classes resource.", new Object[]{});
    }
  }
View Full Code Here

Examples of org.apache.ctakes.assertion.util.SemanticClasses

public class AssertionDependencyTreeExtractor implements SimpleFeatureExtractor {
  protected SemanticClasses sems = null;

  public AssertionDependencyTreeExtractor() throws CleartkInitializationException {
    try{
      sems = new SemanticClasses(FileLocator.getAsStream("org/apache/ctakes/assertion/all_cues.txt"));
    }catch(Exception e){
      throw new CleartkInitializationException(e, "org/apache/ctakes/assertion/semantic_classes", "Could not find semantic classes resource.", new Object[]{});
    }
  }
View Full Code Here

Examples of org.apache.ctakes.assertion.util.SemanticClasses

  public TreeFragmentFeatureExtractor(String prefix, String resourceFilename) throws CleartkInitializationException{
    initializeFrags(resourceFilename);
    this.prefix = prefix;
    try{
      sems = new SemanticClasses(FileLocator.getAsStream("org/apache/ctakes/assertion/all_cues.txt"));
    }catch(Exception e){
      throw new CleartkInitializationException(e, "org/apache/ctakes/assertion/all_cues.txt", "Could not find semantic classes resource.", new Object[]{});
    }

  }
View Full Code Here

Examples of org.apache.ctakes.assertion.util.SemanticClasses

        e.printStackTrace();
        System.exit(-1);
      }
     
      if(sems == null){
        sems = new SemanticClasses(FileLocator.getAsStream("org/apache/ctakes/assertion/all_cues.txt"));
      }
      out = new PrintStream(options.outFile);
      List<File> trainFiles = Arrays.asList(options.trainDirectory.listFiles());

      String[] paths = new String[trainFiles.size()];
View Full Code Here

Examples of org.apache.ctakes.assertion.util.SemanticClasses

    optionParser.parseArgument(args);
   
    out = new PrintStream(options.outFile);
    List<File> trainFiles = Arrays.asList(options.trainDirectory.listFiles());
    if(sems == null){
      sems = new SemanticClasses(FileLocator.getAsStream("org/apache/ctakes/assertion/all_cues.txt"));
    }

    String[] paths = new String[trainFiles.size()];
    for (int i = 0; i < paths.length; ++i) {
      paths[i] = trainFiles.get(i).getPath();
View Full Code Here

Examples of org.apache.ctakes.assertion.util.SemanticClasses

  }

  public static void processDocument(JCas jcas) throws ResourceInitializationException, FileNotFoundException {
    log.info("Processing document: " + DocumentIDAnnotationUtil.getDocumentID(jcas));
    if(sems == null){
      sems = new SemanticClasses(FileLocator.locateFile("org/apache/ctakes/assertion/models/semantic_classes").getAbsolutePath());
    }
    Collection<IdentifiedAnnotation> mentions = JCasUtil.select(jcas, IdentifiedAnnotation.class);
    for(IdentifiedAnnotation mention : mentions){
      TopTreebankNode orig = AnnotationTreeUtils.getAnnotationTree(jcas, mention);
      if(orig == null){
View Full Code Here

Examples of org.apache.ctakes.assertion.util.SemanticClasses

  public TreeFragmentFeatureExtractor(String prefix, String resourceFilename) throws CleartkInitializationException{
    initializeFrags(resourceFilename);
    this.prefix = prefix;
    try{
      sems = new SemanticClasses(FileLocator.locateFile("org/apache/ctakes/assertion/semantic_classes").getAbsolutePath());
    }catch(Exception e){
      throw new CleartkInitializationException(e, "org/apache/ctakes/assertion/semantic_classes", "Could not find semantic classes resource.", new Object[]{});
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.