com.languagecomputer.api.sample
Class EntitySpeedTests

java.lang.Object
  extended by com.languagecomputer.api.sample.EntitySpeedTests

public class EntitySpeedTests
extends Object

A series of speed tests for named entity recognition. Runs files through the DocumentService and EntityService in various ways:

  1. Local: Run DocumentService and EntityService locally.
  2. Local: Run AnnotationMetaService locally.
  3. Remote: Run DocumentService and EntityService remotely through their web service clients.
  4. Remote: Run AnnotationMetaService remotely.
  5. Remote: Run the streaming web service version of the DocumentService and then the EntityService remotely.

Since:
1.0
Author:
Kirk Roberts
See Also:
DocumentService, EntityService, AnnotationMetaService

Constructor Summary
EntitySpeedTests(File configFile, String host)
          Creates a new EntitySpeedTests with the given local configFile and remote host.
 
Method Summary
static void main(String[] argv)
          Command line.
 void run(Iterable<File> files)
          Runs all the speed tests.
 long runLocalAnnotationMetaService(Iterable<File> files)
          Runs the AnnotationMetaService locally on the given Files.
 long runLocalDocumentAndEntityServices(Iterable<File> files)
          Runs the DocumentService and EntityService locally on the given Files.
 long runRemoteAnnotationMetaService(Iterable<File> files)
          Runs the AnnotationMetaService remotely on the given Files.
 long runRemoteDocumentAndEntityServices(Iterable<File> files)
          Runs the DocumentService and EntityService remotely on the given Files.
 long runRemoteStreamingDocumentAndEntityServices(Iterable<File> files)
          Runs the DocumentService and EntityService remotely on the given Files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntitySpeedTests

public EntitySpeedTests(File configFile,
                        String host)
Creates a new EntitySpeedTests with the given local configFile and remote host.

Method Detail

run

public void run(Iterable<File> files)
         throws Exception
Runs all the speed tests.

Throws:
Exception

runLocalDocumentAndEntityServices

public long runLocalDocumentAndEntityServices(Iterable<File> files)
                                       throws IOException
Runs the DocumentService and EntityService locally on the given Files.

Throws:
IOException

runLocalAnnotationMetaService

public long runLocalAnnotationMetaService(Iterable<File> files)
                                   throws IOException
Runs the AnnotationMetaService locally on the given Files.

Throws:
IOException

runRemoteDocumentAndEntityServices

public long runRemoteDocumentAndEntityServices(Iterable<File> files)
                                        throws Exception
Runs the DocumentService and EntityService remotely on the given Files.

Throws:
Exception

runRemoteAnnotationMetaService

public long runRemoteAnnotationMetaService(Iterable<File> files)
                                    throws Exception
Runs the AnnotationMetaService remotely on the given Files.

Throws:
Exception

runRemoteStreamingDocumentAndEntityServices

public long runRemoteStreamingDocumentAndEntityServices(Iterable<File> files)
                                                 throws Exception
Runs the DocumentService and EntityService remotely on the given Files. The primary difference between this and runRemoteDocumentAndEntityServices(Iterable) is that the document is streamed to the remote DocumentService instead of using a URL.

Throws:
Exception

main

public static void main(String[] argv)
                 throws Exception
Command line.

Throws:
Exception


Copyright © 2009. All Rights Reserved.