Class ContextUtils
- java.lang.Object
-
- de.julielab.jules.ae.genemapping.utils.ContextUtils
-
public class ContextUtils extends java.lang.Object- Author:
- jwermter
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]STOPWORDS
-
Constructor Summary
Constructors Constructor Description ContextUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.lucene.analysis.TokenStreamgetStemmingStream(java.lang.String input)static java.lang.StringmakeContext(org.apache.uima.jcas.JCas aJCas, int windowSize, de.julielab.jcore.types.EntityMention entity)static org.apache.lucene.search.BooleanQuerymakeContextQuery(java.lang.String context)builds the Lucene context query a given textstatic org.apache.lucene.search.BooleanQuerymakeContextQuery(org.apache.uima.jcas.JCas aJCas)makes the context query.static org.apache.lucene.search.BooleanQuerymakeContextQuery(org.apache.uima.jcas.JCas aJCas, int windowSize, de.julielab.jcore.types.EntityMention entity)makes the context query.static java.lang.StringmakeContextTokens(java.lang.String context)static java.lang.StringmakeContextTypes(java.lang.String context)
-
-
-
Method Detail
-
getStemmingStream
public static org.apache.lucene.analysis.TokenStream getStemmingStream(java.lang.String input)
-
makeContextTypes
public static java.lang.String makeContextTypes(java.lang.String context) throws java.io.IOException- Throws:
java.io.IOException
-
makeContextTokens
public static java.lang.String makeContextTokens(java.lang.String context) throws java.io.IOException- Throws:
java.io.IOException
-
makeContextQuery
public static org.apache.lucene.search.BooleanQuery makeContextQuery(org.apache.uima.jcas.JCas aJCas) throws java.io.IOExceptionmakes the context query. Returns null if no context was found.- Parameters:
aJCas-- Returns:
- a boolean query to be processed by Lucene
- Throws:
java.io.IOException
-
makeContextQuery
public static org.apache.lucene.search.BooleanQuery makeContextQuery(org.apache.uima.jcas.JCas aJCas, int windowSize, de.julielab.jcore.types.EntityMention entity) throws java.io.IOExceptionmakes the context query. Returns null if no context was found.- Parameters:
aJCas-- Returns:
- a boolean query to be processed by Lucene
- Throws:
java.io.IOException
-
makeContext
public static java.lang.String makeContext(org.apache.uima.jcas.JCas aJCas, int windowSize, de.julielab.jcore.types.EntityMention entity)
-
makeContextQuery
public static org.apache.lucene.search.BooleanQuery makeContextQuery(java.lang.String context) throws java.io.IOExceptionbuilds the Lucene context query a given text- Parameters:
context- the document text- Returns:
- Throws:
java.io.IOException
-
-