Last active
December 16, 2015 13:59
-
-
Save Digo/5445968 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ConnectionOptions connOptions = new ConnectionOptions(); | |
connOptions.setCorpusUrl(ldcServerUrl); | |
connOptions.setCachingStrategy(mysqlCachingStrategy); | |
//Connects to a remote corpus server | |
AnnotatedCorpus aRemoteCorpus = CorpusManager.connect(connOptions); | |
//Query remote corpus and return a new corpus object | |
AnnotatedCorpus hitlistCorpus = aRemoteCorpus.subCorpus(keytermQuery); | |
myViewOptions.setDocumentContentShown(); | |
myViewOptions.setAnnotationShown(); | |
DocumentStreamReader reader = hitlistCorpus.getDocumentStreamReader(myViewOptions); | |
while(reader.hasNext()){ | |
AnnotatedDocument doc = reader.next(); | |
//do thing with doc | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment