repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/ch/epfl/bbp/uima/types/Topic.java
Topic.getScores
public double getScores(int i) { if (Topic_Type.featOkTst && ((Topic_Type)jcasType).casFeat_scores == null) jcasType.jcas.throwFeatMissing("scores", "ch.epfl.bbp.uima.types.Topic"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Topic_Type)jcasType).casFeatCode_scores), i); return jcasType.ll_cas.ll_getDoubleArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Topic_Type)jcasType).casFeatCode_scores), i);}
java
public double getScores(int i) { if (Topic_Type.featOkTst && ((Topic_Type)jcasType).casFeat_scores == null) jcasType.jcas.throwFeatMissing("scores", "ch.epfl.bbp.uima.types.Topic"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Topic_Type)jcasType).casFeatCode_scores), i); return jcasType.ll_cas.ll_getDoubleArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Topic_Type)jcasType).casFeatCode_scores), i);}
[ "public", "double", "getScores", "(", "int", "i", ")", "{", "if", "(", "Topic_Type", ".", "featOkTst", "&&", "(", "(", "Topic_Type", ")", "jcasType", ")", ".", "casFeat_scores", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\...
indexed getter for scores - gets an indexed value - @generated @param i index in the array to get @return value of the element at index i
[ "indexed", "getter", "for", "scores", "-", "gets", "an", "indexed", "value", "-" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/ch/epfl/bbp/uima/types/Topic.java#L106-L110
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/ch/epfl/bbp/uima/types/Topic.java
Topic.setScores
public void setScores(int i, double v) { if (Topic_Type.featOkTst && ((Topic_Type)jcasType).casFeat_scores == null) jcasType.jcas.throwFeatMissing("scores", "ch.epfl.bbp.uima.types.Topic"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Topic_Type)jcasType).casFeatCode_scores), i); jcasType.ll_cas.ll_setDoubleArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Topic_Type)jcasType).casFeatCode_scores), i, v);}
java
public void setScores(int i, double v) { if (Topic_Type.featOkTst && ((Topic_Type)jcasType).casFeat_scores == null) jcasType.jcas.throwFeatMissing("scores", "ch.epfl.bbp.uima.types.Topic"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Topic_Type)jcasType).casFeatCode_scores), i); jcasType.ll_cas.ll_setDoubleArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Topic_Type)jcasType).casFeatCode_scores), i, v);}
[ "public", "void", "setScores", "(", "int", "i", ",", "double", "v", ")", "{", "if", "(", "Topic_Type", ".", "featOkTst", "&&", "(", "(", "Topic_Type", ")", "jcasType", ")", ".", "casFeat_scores", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwF...
indexed setter for scores - sets an indexed value - @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "scores", "-", "sets", "an", "indexed", "value", "-" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/ch/epfl/bbp/uima/types/Topic.java#L117-L121
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/ch/epfl/bbp/uima/types/Topic.java
Topic.getMostLikelyTopic
public int getMostLikelyTopic() { if (Topic_Type.featOkTst && ((Topic_Type)jcasType).casFeat_mostLikelyTopic == null) jcasType.jcas.throwFeatMissing("mostLikelyTopic", "ch.epfl.bbp.uima.types.Topic"); return jcasType.ll_cas.ll_getIntValue(addr, ((Topic_Type)jcasType).casFeatCode_mostLikelyTopic);}
java
public int getMostLikelyTopic() { if (Topic_Type.featOkTst && ((Topic_Type)jcasType).casFeat_mostLikelyTopic == null) jcasType.jcas.throwFeatMissing("mostLikelyTopic", "ch.epfl.bbp.uima.types.Topic"); return jcasType.ll_cas.ll_getIntValue(addr, ((Topic_Type)jcasType).casFeatCode_mostLikelyTopic);}
[ "public", "int", "getMostLikelyTopic", "(", ")", "{", "if", "(", "Topic_Type", ".", "featOkTst", "&&", "(", "(", "Topic_Type", ")", "jcasType", ")", ".", "casFeat_mostLikelyTopic", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"...
getter for mostLikelyTopic - gets The most likely topic id for this topic @generated @return value of the feature
[ "getter", "for", "mostLikelyTopic", "-", "gets", "The", "most", "likely", "topic", "id", "for", "this", "topic" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/ch/epfl/bbp/uima/types/Topic.java#L131-L134
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/ch/epfl/bbp/uima/types/Topic.java
Topic.setMostLikelyTopic
public void setMostLikelyTopic(int v) { if (Topic_Type.featOkTst && ((Topic_Type)jcasType).casFeat_mostLikelyTopic == null) jcasType.jcas.throwFeatMissing("mostLikelyTopic", "ch.epfl.bbp.uima.types.Topic"); jcasType.ll_cas.ll_setIntValue(addr, ((Topic_Type)jcasType).casFeatCode_mostLikelyTopic, v);}
java
public void setMostLikelyTopic(int v) { if (Topic_Type.featOkTst && ((Topic_Type)jcasType).casFeat_mostLikelyTopic == null) jcasType.jcas.throwFeatMissing("mostLikelyTopic", "ch.epfl.bbp.uima.types.Topic"); jcasType.ll_cas.ll_setIntValue(addr, ((Topic_Type)jcasType).casFeatCode_mostLikelyTopic, v);}
[ "public", "void", "setMostLikelyTopic", "(", "int", "v", ")", "{", "if", "(", "Topic_Type", ".", "featOkTst", "&&", "(", "(", "Topic_Type", ")", "jcasType", ")", ".", "casFeat_mostLikelyTopic", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissi...
setter for mostLikelyTopic - sets The most likely topic id for this topic @generated @param v value to set into the feature
[ "setter", "for", "mostLikelyTopic", "-", "sets", "The", "most", "likely", "topic", "id", "for", "this", "topic" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/ch/epfl/bbp/uima/types/Topic.java#L140-L143
train
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/abbvGapsHmm/AbbvGapsHMMEvaluator.java
AbbvGapsHMMEvaluator.updateOutgoingEdgesStateM
protected void updateOutgoingEdgesStateM( int currS, int currL, int prevS, int prevL, Emissions emission ){ updateOutgoingEdges(currS, currL, States.M, prevS, prevL, States.DL, Transitions.t_DL_to_M, emission); updateOutgoingEdges(currS, currL, States.M, prevS, prevL, States.M, Transitions.t_M_in, emission); updateOutgoingEdges(currS, currL, States.M, prevS, prevL, States.D, Transitions.t_D_to_M, emission); updateOutgoingEdges(currS, currL, States.M, prevS, prevL, States.S, Transitions.t_S_to_M, emission); }
java
protected void updateOutgoingEdgesStateM( int currS, int currL, int prevS, int prevL, Emissions emission ){ updateOutgoingEdges(currS, currL, States.M, prevS, prevL, States.DL, Transitions.t_DL_to_M, emission); updateOutgoingEdges(currS, currL, States.M, prevS, prevL, States.M, Transitions.t_M_in, emission); updateOutgoingEdges(currS, currL, States.M, prevS, prevL, States.D, Transitions.t_D_to_M, emission); updateOutgoingEdges(currS, currL, States.M, prevS, prevL, States.S, Transitions.t_S_to_M, emission); }
[ "protected", "void", "updateOutgoingEdgesStateM", "(", "int", "currS", ",", "int", "currL", ",", "int", "prevS", ",", "int", "prevL", ",", "Emissions", "emission", ")", "{", "updateOutgoingEdges", "(", "currS", ",", "currL", ",", "States", ".", "M", ",", "...
Enumerates the possible transitions into state M. @param currS @param currL @param prevS @param prevL
[ "Enumerates", "the", "possible", "transitions", "into", "state", "M", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/abbvGapsHmm/AbbvGapsHMMEvaluator.java#L360-L369
train
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/abbvGapsHmm/AbbvGapsHMMEvaluator.java
AbbvGapsHMMEvaluator.updateOutgoingEdgesStateD
protected void updateOutgoingEdgesStateD( int currS, int currL, int prevS, int prevL, Emissions emission ){ updateOutgoingEdges(currS, currL, States.D, prevS, prevL, States.D, Transitions.t_D_in, emission); updateOutgoingEdges(currS, currL, States.D, prevS, prevL, States.M, Transitions.t_M_to_D, emission); }
java
protected void updateOutgoingEdgesStateD( int currS, int currL, int prevS, int prevL, Emissions emission ){ updateOutgoingEdges(currS, currL, States.D, prevS, prevL, States.D, Transitions.t_D_in, emission); updateOutgoingEdges(currS, currL, States.D, prevS, prevL, States.M, Transitions.t_M_to_D, emission); }
[ "protected", "void", "updateOutgoingEdgesStateD", "(", "int", "currS", ",", "int", "currL", ",", "int", "prevS", ",", "int", "prevL", ",", "Emissions", "emission", ")", "{", "updateOutgoingEdges", "(", "currS", ",", "currL", ",", "States", ".", "D", ",", "...
Enumerates the possible transitions into state D.
[ "Enumerates", "the", "possible", "transitions", "into", "state", "D", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/abbvGapsHmm/AbbvGapsHMMEvaluator.java#L374-L381
train
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/abbvGapsHmm/AbbvGapsHMMEvaluator.java
AbbvGapsHMMEvaluator.updateOutgoingEdgesStateDL
protected void updateOutgoingEdgesStateDL( int currS, int currL, int prevS, int prevL, Emissions emission ){ updateOutgoingEdges(currS, currL, States.DL, prevS, prevL, States.DL, Transitions.t_DL_in, emission); updateOutgoingEdges(currS, currL, States.DL, prevS, prevL, States.S, Transitions.t_S_to_DL, emission); }
java
protected void updateOutgoingEdgesStateDL( int currS, int currL, int prevS, int prevL, Emissions emission ){ updateOutgoingEdges(currS, currL, States.DL, prevS, prevL, States.DL, Transitions.t_DL_in, emission); updateOutgoingEdges(currS, currL, States.DL, prevS, prevL, States.S, Transitions.t_S_to_DL, emission); }
[ "protected", "void", "updateOutgoingEdgesStateDL", "(", "int", "currS", ",", "int", "currL", ",", "int", "prevS", ",", "int", "prevL", ",", "Emissions", "emission", ")", "{", "updateOutgoingEdges", "(", "currS", ",", "currL", ",", "States", ".", "DL", ",", ...
Enumerates the possible transitions into state DL.
[ "Enumerates", "the", "possible", "transitions", "into", "state", "DL", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/abbvGapsHmm/AbbvGapsHMMEvaluator.java#L386-L393
train
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/abbvGapsHmm/AbbvGapsHMMEvaluator.java
AbbvGapsHMMEvaluator.updateOutgoingEdgesStateEND
protected void updateOutgoingEdgesStateEND( int currS, int currL, int prevS, int prevL, Emissions emission ){ updateOutgoingEdges(currS, currL, States.END, prevS, prevL, States.D, Transitions.t_D_to_END, emission); updateOutgoingEdges(currS, currL, States.END, prevS, prevL, States.M, Transitions.t_M_to_END, emission); }
java
protected void updateOutgoingEdgesStateEND( int currS, int currL, int prevS, int prevL, Emissions emission ){ updateOutgoingEdges(currS, currL, States.END, prevS, prevL, States.D, Transitions.t_D_to_END, emission); updateOutgoingEdges(currS, currL, States.END, prevS, prevL, States.M, Transitions.t_M_to_END, emission); }
[ "protected", "void", "updateOutgoingEdgesStateEND", "(", "int", "currS", ",", "int", "currL", ",", "int", "prevS", ",", "int", "prevL", ",", "Emissions", "emission", ")", "{", "updateOutgoingEdges", "(", "currS", ",", "currL", ",", "States", ".", "END", ",",...
Enumerates the possible transitions into state END.
[ "Enumerates", "the", "possible", "transitions", "into", "state", "END", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/abbvGapsHmm/AbbvGapsHMMEvaluator.java#L398-L405
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Clause.java
Clause.getRule
public String getRule() { if (Clause_Type.featOkTst && ((Clause_Type)jcasType).casFeat_rule == null) jcasType.jcas.throwFeatMissing("rule", "com.digitalpebble.rasp.Clause"); return jcasType.ll_cas.ll_getStringValue(addr, ((Clause_Type)jcasType).casFeatCode_rule);}
java
public String getRule() { if (Clause_Type.featOkTst && ((Clause_Type)jcasType).casFeat_rule == null) jcasType.jcas.throwFeatMissing("rule", "com.digitalpebble.rasp.Clause"); return jcasType.ll_cas.ll_getStringValue(addr, ((Clause_Type)jcasType).casFeatCode_rule);}
[ "public", "String", "getRule", "(", ")", "{", "if", "(", "Clause_Type", ".", "featOkTst", "&&", "(", "(", "Clause_Type", ")", "jcasType", ")", ".", "casFeat_rule", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"rule\"", ",", ...
getter for rule - gets @generated @return value of the feature
[ "getter", "for", "rule", "-", "gets" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Clause.java#L87-L90
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Clause.java
Clause.setRule
public void setRule(String v) { if (Clause_Type.featOkTst && ((Clause_Type)jcasType).casFeat_rule == null) jcasType.jcas.throwFeatMissing("rule", "com.digitalpebble.rasp.Clause"); jcasType.ll_cas.ll_setStringValue(addr, ((Clause_Type)jcasType).casFeatCode_rule, v);}
java
public void setRule(String v) { if (Clause_Type.featOkTst && ((Clause_Type)jcasType).casFeat_rule == null) jcasType.jcas.throwFeatMissing("rule", "com.digitalpebble.rasp.Clause"); jcasType.ll_cas.ll_setStringValue(addr, ((Clause_Type)jcasType).casFeatCode_rule, v);}
[ "public", "void", "setRule", "(", "String", "v", ")", "{", "if", "(", "Clause_Type", ".", "featOkTst", "&&", "(", "(", "Clause_Type", ")", "jcasType", ")", ".", "casFeat_rule", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"...
setter for rule - sets @generated @param v value to set into the feature
[ "setter", "for", "rule", "-", "sets" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Clause.java#L96-L99
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Clause.java
Clause.getSubclauses
public FSArray getSubclauses() { if (Clause_Type.featOkTst && ((Clause_Type)jcasType).casFeat_subclauses == null) jcasType.jcas.throwFeatMissing("subclauses", "com.digitalpebble.rasp.Clause"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Clause_Type)jcasType).casFeatCode_subclauses)));}
java
public FSArray getSubclauses() { if (Clause_Type.featOkTst && ((Clause_Type)jcasType).casFeat_subclauses == null) jcasType.jcas.throwFeatMissing("subclauses", "com.digitalpebble.rasp.Clause"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Clause_Type)jcasType).casFeatCode_subclauses)));}
[ "public", "FSArray", "getSubclauses", "(", ")", "{", "if", "(", "Clause_Type", ".", "featOkTst", "&&", "(", "(", "Clause_Type", ")", "jcasType", ")", ".", "casFeat_subclauses", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"subc...
getter for subclauses - gets array of subelements. contains WordForms or Clauses @generated @return value of the feature
[ "getter", "for", "subclauses", "-", "gets", "array", "of", "subelements", ".", "contains", "WordForms", "or", "Clauses" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Clause.java#L109-L112
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Clause.java
Clause.setSubclauses
public void setSubclauses(FSArray v) { if (Clause_Type.featOkTst && ((Clause_Type)jcasType).casFeat_subclauses == null) jcasType.jcas.throwFeatMissing("subclauses", "com.digitalpebble.rasp.Clause"); jcasType.ll_cas.ll_setRefValue(addr, ((Clause_Type)jcasType).casFeatCode_subclauses, jcasType.ll_cas.ll_getFSRef(v));}
java
public void setSubclauses(FSArray v) { if (Clause_Type.featOkTst && ((Clause_Type)jcasType).casFeat_subclauses == null) jcasType.jcas.throwFeatMissing("subclauses", "com.digitalpebble.rasp.Clause"); jcasType.ll_cas.ll_setRefValue(addr, ((Clause_Type)jcasType).casFeatCode_subclauses, jcasType.ll_cas.ll_getFSRef(v));}
[ "public", "void", "setSubclauses", "(", "FSArray", "v", ")", "{", "if", "(", "Clause_Type", ".", "featOkTst", "&&", "(", "(", "Clause_Type", ")", "jcasType", ")", ".", "casFeat_subclauses", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing",...
setter for subclauses - sets array of subelements. contains WordForms or Clauses @generated @param v value to set into the feature
[ "setter", "for", "subclauses", "-", "sets", "array", "of", "subelements", ".", "contains", "WordForms", "or", "Clauses" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Clause.java#L118-L121
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Clause.java
Clause.getSubclauses
public Annotation getSubclauses(int i) { if (Clause_Type.featOkTst && ((Clause_Type)jcasType).casFeat_subclauses == null) jcasType.jcas.throwFeatMissing("subclauses", "com.digitalpebble.rasp.Clause"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Clause_Type)jcasType).casFeatCode_subclauses), i); return (Annotation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Clause_Type)jcasType).casFeatCode_subclauses), i)));}
java
public Annotation getSubclauses(int i) { if (Clause_Type.featOkTst && ((Clause_Type)jcasType).casFeat_subclauses == null) jcasType.jcas.throwFeatMissing("subclauses", "com.digitalpebble.rasp.Clause"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Clause_Type)jcasType).casFeatCode_subclauses), i); return (Annotation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Clause_Type)jcasType).casFeatCode_subclauses), i)));}
[ "public", "Annotation", "getSubclauses", "(", "int", "i", ")", "{", "if", "(", "Clause_Type", ".", "featOkTst", "&&", "(", "(", "Clause_Type", ")", "jcasType", ")", ".", "casFeat_subclauses", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing...
indexed getter for subclauses - gets an indexed value - array of subelements. contains WordForms or Clauses @generated @param i index in the array to get @return value of the element at index i
[ "indexed", "getter", "for", "subclauses", "-", "gets", "an", "indexed", "value", "-", "array", "of", "subelements", ".", "contains", "WordForms", "or", "Clauses" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Clause.java#L128-L132
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Clause.java
Clause.setSubclauses
public void setSubclauses(int i, Annotation v) { if (Clause_Type.featOkTst && ((Clause_Type)jcasType).casFeat_subclauses == null) jcasType.jcas.throwFeatMissing("subclauses", "com.digitalpebble.rasp.Clause"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Clause_Type)jcasType).casFeatCode_subclauses), i); jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Clause_Type)jcasType).casFeatCode_subclauses), i, jcasType.ll_cas.ll_getFSRef(v));}
java
public void setSubclauses(int i, Annotation v) { if (Clause_Type.featOkTst && ((Clause_Type)jcasType).casFeat_subclauses == null) jcasType.jcas.throwFeatMissing("subclauses", "com.digitalpebble.rasp.Clause"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Clause_Type)jcasType).casFeatCode_subclauses), i); jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Clause_Type)jcasType).casFeatCode_subclauses), i, jcasType.ll_cas.ll_getFSRef(v));}
[ "public", "void", "setSubclauses", "(", "int", "i", ",", "Annotation", "v", ")", "{", "if", "(", "Clause_Type", ".", "featOkTst", "&&", "(", "(", "Clause_Type", ")", "jcasType", ")", ".", "casFeat_subclauses", "==", "null", ")", "jcasType", ".", "jcas", ...
indexed setter for subclauses - sets an indexed value - array of subelements. contains WordForms or Clauses @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "subclauses", "-", "sets", "an", "indexed", "value", "-", "array", "of", "subelements", ".", "contains", "WordForms", "or", "Clauses" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Clause.java#L139-L143
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/EventTrigger.java
EventTrigger.getProbability
public String getProbability() { if (EventTrigger_Type.featOkTst && ((EventTrigger_Type)jcasType).casFeat_probability == null) jcasType.jcas.throwFeatMissing("probability", "de.julielab.jules.types.EventTrigger"); return jcasType.ll_cas.ll_getStringValue(addr, ((EventTrigger_Type)jcasType).casFeatCode_probability);}
java
public String getProbability() { if (EventTrigger_Type.featOkTst && ((EventTrigger_Type)jcasType).casFeat_probability == null) jcasType.jcas.throwFeatMissing("probability", "de.julielab.jules.types.EventTrigger"); return jcasType.ll_cas.ll_getStringValue(addr, ((EventTrigger_Type)jcasType).casFeatCode_probability);}
[ "public", "String", "getProbability", "(", ")", "{", "if", "(", "EventTrigger_Type", ".", "featOkTst", "&&", "(", "(", "EventTrigger_Type", ")", "jcasType", ")", ".", "casFeat_probability", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "...
getter for probability - gets probability of this trigger to be an event or relation trigger @generated @return value of the feature
[ "getter", "for", "probability", "-", "gets", "probability", "of", "this", "trigger", "to", "be", "an", "event", "or", "relation", "trigger" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/EventTrigger.java#L85-L88
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/EventTrigger.java
EventTrigger.setProbability
public void setProbability(String v) { if (EventTrigger_Type.featOkTst && ((EventTrigger_Type)jcasType).casFeat_probability == null) jcasType.jcas.throwFeatMissing("probability", "de.julielab.jules.types.EventTrigger"); jcasType.ll_cas.ll_setStringValue(addr, ((EventTrigger_Type)jcasType).casFeatCode_probability, v);}
java
public void setProbability(String v) { if (EventTrigger_Type.featOkTst && ((EventTrigger_Type)jcasType).casFeat_probability == null) jcasType.jcas.throwFeatMissing("probability", "de.julielab.jules.types.EventTrigger"); jcasType.ll_cas.ll_setStringValue(addr, ((EventTrigger_Type)jcasType).casFeatCode_probability, v);}
[ "public", "void", "setProbability", "(", "String", "v", ")", "{", "if", "(", "EventTrigger_Type", ".", "featOkTst", "&&", "(", "(", "EventTrigger_Type", ")", "jcasType", ")", ".", "casFeat_probability", "==", "null", ")", "jcasType", ".", "jcas", ".", "throw...
setter for probability - sets probability of this trigger to be an event or relation trigger @generated @param v value to set into the feature
[ "setter", "for", "probability", "-", "sets", "probability", "of", "this", "trigger", "to", "be", "an", "event", "or", "relation", "trigger" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/EventTrigger.java#L94-L97
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/EventTrigger.java
EventTrigger.getSpecifity
public String getSpecifity() { if (EventTrigger_Type.featOkTst && ((EventTrigger_Type)jcasType).casFeat_specifity == null) jcasType.jcas.throwFeatMissing("specifity", "de.julielab.jules.types.EventTrigger"); return jcasType.ll_cas.ll_getStringValue(addr, ((EventTrigger_Type)jcasType).casFeatCode_specifity);}
java
public String getSpecifity() { if (EventTrigger_Type.featOkTst && ((EventTrigger_Type)jcasType).casFeat_specifity == null) jcasType.jcas.throwFeatMissing("specifity", "de.julielab.jules.types.EventTrigger"); return jcasType.ll_cas.ll_getStringValue(addr, ((EventTrigger_Type)jcasType).casFeatCode_specifity);}
[ "public", "String", "getSpecifity", "(", ")", "{", "if", "(", "EventTrigger_Type", ".", "featOkTst", "&&", "(", "(", "EventTrigger_Type", ")", "jcasType", ")", ".", "casFeat_specifity", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", ...
getter for specifity - gets specifity to be an event trigger, compare with using in other context @generated @return value of the feature
[ "getter", "for", "specifity", "-", "gets", "specifity", "to", "be", "an", "event", "trigger", "compare", "with", "using", "in", "other", "context" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/EventTrigger.java#L107-L110
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/EventTrigger.java
EventTrigger.setSpecifity
public void setSpecifity(String v) { if (EventTrigger_Type.featOkTst && ((EventTrigger_Type)jcasType).casFeat_specifity == null) jcasType.jcas.throwFeatMissing("specifity", "de.julielab.jules.types.EventTrigger"); jcasType.ll_cas.ll_setStringValue(addr, ((EventTrigger_Type)jcasType).casFeatCode_specifity, v);}
java
public void setSpecifity(String v) { if (EventTrigger_Type.featOkTst && ((EventTrigger_Type)jcasType).casFeat_specifity == null) jcasType.jcas.throwFeatMissing("specifity", "de.julielab.jules.types.EventTrigger"); jcasType.ll_cas.ll_setStringValue(addr, ((EventTrigger_Type)jcasType).casFeatCode_specifity, v);}
[ "public", "void", "setSpecifity", "(", "String", "v", ")", "{", "if", "(", "EventTrigger_Type", ".", "featOkTst", "&&", "(", "(", "EventTrigger_Type", ")", "jcasType", ")", ".", "casFeat_specifity", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeat...
setter for specifity - sets specifity to be an event trigger, compare with using in other context @generated @param v value to set into the feature
[ "setter", "for", "specifity", "-", "sets", "specifity", "to", "be", "an", "event", "trigger", "compare", "with", "using", "in", "other", "context" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/EventTrigger.java#L116-L119
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/EventTrigger.java
EventTrigger.getImportance
public String getImportance() { if (EventTrigger_Type.featOkTst && ((EventTrigger_Type)jcasType).casFeat_importance == null) jcasType.jcas.throwFeatMissing("importance", "de.julielab.jules.types.EventTrigger"); return jcasType.ll_cas.ll_getStringValue(addr, ((EventTrigger_Type)jcasType).casFeatCode_importance);}
java
public String getImportance() { if (EventTrigger_Type.featOkTst && ((EventTrigger_Type)jcasType).casFeat_importance == null) jcasType.jcas.throwFeatMissing("importance", "de.julielab.jules.types.EventTrigger"); return jcasType.ll_cas.ll_getStringValue(addr, ((EventTrigger_Type)jcasType).casFeatCode_importance);}
[ "public", "String", "getImportance", "(", ")", "{", "if", "(", "EventTrigger_Type", ".", "featOkTst", "&&", "(", "(", "EventTrigger_Type", ")", "jcasType", ")", ".", "casFeat_importance", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "("...
getter for importance - gets how important is this trigger for the event @generated @return value of the feature
[ "getter", "for", "importance", "-", "gets", "how", "important", "is", "this", "trigger", "for", "the", "event" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/EventTrigger.java#L129-L132
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/EventTrigger.java
EventTrigger.setImportance
public void setImportance(String v) { if (EventTrigger_Type.featOkTst && ((EventTrigger_Type)jcasType).casFeat_importance == null) jcasType.jcas.throwFeatMissing("importance", "de.julielab.jules.types.EventTrigger"); jcasType.ll_cas.ll_setStringValue(addr, ((EventTrigger_Type)jcasType).casFeatCode_importance, v);}
java
public void setImportance(String v) { if (EventTrigger_Type.featOkTst && ((EventTrigger_Type)jcasType).casFeat_importance == null) jcasType.jcas.throwFeatMissing("importance", "de.julielab.jules.types.EventTrigger"); jcasType.ll_cas.ll_setStringValue(addr, ((EventTrigger_Type)jcasType).casFeatCode_importance, v);}
[ "public", "void", "setImportance", "(", "String", "v", ")", "{", "if", "(", "EventTrigger_Type", ".", "featOkTst", "&&", "(", "(", "EventTrigger_Type", ")", "jcasType", ")", ".", "casFeat_importance", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFe...
setter for importance - sets how important is this trigger for the event @generated @param v value to set into the feature
[ "setter", "for", "importance", "-", "sets", "how", "important", "is", "this", "trigger", "for", "the", "event" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/EventTrigger.java#L138-L141
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/muc7/MUC7Header.java
MUC7Header.getStoryID
public String getStoryID() { if (MUC7Header_Type.featOkTst && ((MUC7Header_Type)jcasType).casFeat_storyID == null) jcasType.jcas.throwFeatMissing("storyID", "de.julielab.jules.types.muc7.MUC7Header"); return jcasType.ll_cas.ll_getStringValue(addr, ((MUC7Header_Type)jcasType).casFeatCode_storyID);}
java
public String getStoryID() { if (MUC7Header_Type.featOkTst && ((MUC7Header_Type)jcasType).casFeat_storyID == null) jcasType.jcas.throwFeatMissing("storyID", "de.julielab.jules.types.muc7.MUC7Header"); return jcasType.ll_cas.ll_getStringValue(addr, ((MUC7Header_Type)jcasType).casFeatCode_storyID);}
[ "public", "String", "getStoryID", "(", ")", "{", "if", "(", "MUC7Header_Type", ".", "featOkTst", "&&", "(", "(", "MUC7Header_Type", ")", "jcasType", ")", ".", "casFeat_storyID", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"sto...
getter for storyID - gets the storyID of the MUC7 documents @generated @return value of the feature
[ "getter", "for", "storyID", "-", "gets", "the", "storyID", "of", "the", "MUC7", "documents" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/muc7/MUC7Header.java#L86-L89
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/muc7/MUC7Header.java
MUC7Header.setStoryID
public void setStoryID(String v) { if (MUC7Header_Type.featOkTst && ((MUC7Header_Type)jcasType).casFeat_storyID == null) jcasType.jcas.throwFeatMissing("storyID", "de.julielab.jules.types.muc7.MUC7Header"); jcasType.ll_cas.ll_setStringValue(addr, ((MUC7Header_Type)jcasType).casFeatCode_storyID, v);}
java
public void setStoryID(String v) { if (MUC7Header_Type.featOkTst && ((MUC7Header_Type)jcasType).casFeat_storyID == null) jcasType.jcas.throwFeatMissing("storyID", "de.julielab.jules.types.muc7.MUC7Header"); jcasType.ll_cas.ll_setStringValue(addr, ((MUC7Header_Type)jcasType).casFeatCode_storyID, v);}
[ "public", "void", "setStoryID", "(", "String", "v", ")", "{", "if", "(", "MUC7Header_Type", ".", "featOkTst", "&&", "(", "(", "MUC7Header_Type", ")", "jcasType", ")", ".", "casFeat_storyID", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing"...
setter for storyID - sets the storyID of the MUC7 documents @generated @param v value to set into the feature
[ "setter", "for", "storyID", "-", "sets", "the", "storyID", "of", "the", "MUC7", "documents" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/muc7/MUC7Header.java#L95-L98
train
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/Level2.java
Level2.explainScore
public String explainScore(StringWrapper s, StringWrapper t) { StringBuffer buf = new StringBuffer(); BagOfTokens sBag = asBagOfTokens(s); BagOfTokens tBag = asBagOfTokens(t); double sumOverI = 0; for (Iterator i = sBag.tokenIterator(); i.hasNext(); ) { Token tokenI = (Token)i.next(); buf.append("token="+tokenI); double maxOverJ = -Double.MAX_VALUE; Token closestToI = null; for (Iterator j = tBag.tokenIterator(); j.hasNext(); ) { Token tokenJ = (Token)j.next(); double scoreItoJ = tokenDistance.score( tokenI.getValue(), tokenJ.getValue() ); buf.append(" dist("+tokenJ.getValue()+")="+scoreItoJ); if (scoreItoJ >= maxOverJ) { maxOverJ = scoreItoJ; closestToI = tokenJ; } } sumOverI += maxOverJ; buf.append(" match="+closestToI+" score="+maxOverJ+"\n"); } buf.append("total: "+sumOverI+"/"+sBag.size()+" = "+score(s,t)+"\n"); return buf.toString(); }
java
public String explainScore(StringWrapper s, StringWrapper t) { StringBuffer buf = new StringBuffer(); BagOfTokens sBag = asBagOfTokens(s); BagOfTokens tBag = asBagOfTokens(t); double sumOverI = 0; for (Iterator i = sBag.tokenIterator(); i.hasNext(); ) { Token tokenI = (Token)i.next(); buf.append("token="+tokenI); double maxOverJ = -Double.MAX_VALUE; Token closestToI = null; for (Iterator j = tBag.tokenIterator(); j.hasNext(); ) { Token tokenJ = (Token)j.next(); double scoreItoJ = tokenDistance.score( tokenI.getValue(), tokenJ.getValue() ); buf.append(" dist("+tokenJ.getValue()+")="+scoreItoJ); if (scoreItoJ >= maxOverJ) { maxOverJ = scoreItoJ; closestToI = tokenJ; } } sumOverI += maxOverJ; buf.append(" match="+closestToI+" score="+maxOverJ+"\n"); } buf.append("total: "+sumOverI+"/"+sBag.size()+" = "+score(s,t)+"\n"); return buf.toString(); }
[ "public", "String", "explainScore", "(", "StringWrapper", "s", ",", "StringWrapper", "t", ")", "{", "StringBuffer", "buf", "=", "new", "StringBuffer", "(", ")", ";", "BagOfTokens", "sBag", "=", "asBagOfTokens", "(", "s", ")", ";", "BagOfTokens", "tBag", "=",...
Explain how the distance was computed.
[ "Explain", "how", "the", "distance", "was", "computed", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/Level2.java#L49-L74
train
BlueBrain/bluima
modules/bluima_opennlp/src/main/java/ch/epfl/bbp/shaded/opennlp/maxent/io/OldFormatGISModelReader.java
OldFormatGISModelReader.main
public static void main (String[] args) throws IOException { if (args.length < 1) { System.out.println("Usage: java opennlp.maxent.io.OldFormatGISModelReader model_name_prefix (new_model_name)"); System.exit(0); } int nameIndex = 0; String infilePrefix = args[nameIndex]; String outfile; if (args.length > nameIndex) outfile = args[nameIndex+1]; else outfile = infilePrefix + ".bin.gz"; GISModelReader reader = new OldFormatGISModelReader(infilePrefix); new SuffixSensitiveGISModelWriter(reader.getModel(), new File(outfile)).persist(); }
java
public static void main (String[] args) throws IOException { if (args.length < 1) { System.out.println("Usage: java opennlp.maxent.io.OldFormatGISModelReader model_name_prefix (new_model_name)"); System.exit(0); } int nameIndex = 0; String infilePrefix = args[nameIndex]; String outfile; if (args.length > nameIndex) outfile = args[nameIndex+1]; else outfile = infilePrefix + ".bin.gz"; GISModelReader reader = new OldFormatGISModelReader(infilePrefix); new SuffixSensitiveGISModelWriter(reader.getModel(), new File(outfile)).persist(); }
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "IOException", "{", "if", "(", "args", ".", "length", "<", "1", ")", "{", "System", ".", "out", ".", "println", "(", "\"Usage: java opennlp.maxent.io.OldFormatGISModelReader mo...
Convert a model created with Maxent 1.0 to a format used with Maxent 1.2. <p>Usage: java opennlp.maxent.io.OldFormatGISModelReader model_name_prefix (new_model_name)"); <p>If the new_model_name is left unspecified, the new model will be saved in gzipped, binary format as "<model_name_prefix>.bin.gz".
[ "Convert", "a", "model", "created", "with", "Maxent", "1", ".", "0", "to", "a", "format", "used", "with", "Maxent", "1", ".", "2", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_opennlp/src/main/java/ch/epfl/bbp/shaded/opennlp/maxent/io/OldFormatGISModelReader.java#L93-L115
train
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/lookup/SoftTFIDFDictionary.java
SoftTFIDFDictionary.put
public void put(String string,Object value) { if (frozen) throw new IllegalStateException("can't add new values to a frozen dictionary"); Set valset = (Set)valueMap.get(string); if (valset==null) valueMap.put(string, (valset=new HashSet())); valset.add( value ); }
java
public void put(String string,Object value) { if (frozen) throw new IllegalStateException("can't add new values to a frozen dictionary"); Set valset = (Set)valueMap.get(string); if (valset==null) valueMap.put(string, (valset=new HashSet())); valset.add( value ); }
[ "public", "void", "put", "(", "String", "string", ",", "Object", "value", ")", "{", "if", "(", "frozen", ")", "throw", "new", "IllegalStateException", "(", "\"can't add new values to a frozen dictionary\"", ")", ";", "Set", "valset", "=", "(", "Set", ")", "val...
Insert a string into the dictionary, and associate it with the given value.
[ "Insert", "a", "string", "into", "the", "dictionary", "and", "associate", "it", "with", "the", "given", "value", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/lookup/SoftTFIDFDictionary.java#L347-L353
train
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/lookup/SoftTFIDFDictionary.java
SoftTFIDFDictionary.freeze
public void freeze() { if (frozen) return; // train the TFIDF distance on all strings seen trainDistances(); // now, compute the maxScore of each token, and create an inverted index if (DEBUG) System.out.println("computing maxScore of "+tokenizer.maxTokenIndex()+" tokens"); invertedIndex = new Set[ tokenizer.maxTokenIndex()+1 ]; maxTFIDFScore = new double[ tokenizer.maxTokenIndex()+1 ]; for (Iterator i=valueMap.keySet().iterator(); i.hasNext(); ) { String s = (String)i.next(); tfidfDistance.prepare( s ); Token[] tokens = tfidfDistance.getTokens(); for (int j=0; j<tokens.length; j++) { Token tok = tokens[j]; double w = tfidfDistance.getWeight( tok ); maxTFIDFScore[ tok.getIndex() ] = Math.max( maxTFIDFScore[tok.getIndex()], w ); Set ii = invertedIndex[ tok.getIndex() ]; if (ii==null) ii = invertedIndex[ tok.getIndex() ] = new HashSet(); ii.add( s ); //if (DEBUG) System.out.println("adjust maxscore, invertedIndex for "+tok); } } // find out which tokens are similar to which other tokens if (DEBUG) System.out.println("computing similar-tokens for "+tokenizer.maxTokenIndex()+" tokens, window="+windowSize); allTokens = new Token[tokenizer.maxTokenIndex()] ; numTokens=0; for (Iterator i=tokenizer.tokenIterator(); i.hasNext(); ) { Token toki = (Token)i.next(); allTokens[numTokens++] = toki; } Arrays.sort(allTokens,LEXICAL_ORDER_FOR_TOKENS); similarTokens = new Token[tokenizer.maxTokenIndex()+1][]; for (int i=0; i<numTokens; i++) { Token toki = allTokens[i]; Set likeTokI = findSimilarTokens( toki.getValue(), i ); similarTokens[ toki.getIndex() ] = new Token[ likeTokI.size() ]; int k = 0; for (Iterator j=likeTokI.iterator(); j.hasNext(); ) { Token tokj = (Token)j.next(); similarTokens[toki.getIndex()][ k++ ] = tokj; } } frozen = true; }
java
public void freeze() { if (frozen) return; // train the TFIDF distance on all strings seen trainDistances(); // now, compute the maxScore of each token, and create an inverted index if (DEBUG) System.out.println("computing maxScore of "+tokenizer.maxTokenIndex()+" tokens"); invertedIndex = new Set[ tokenizer.maxTokenIndex()+1 ]; maxTFIDFScore = new double[ tokenizer.maxTokenIndex()+1 ]; for (Iterator i=valueMap.keySet().iterator(); i.hasNext(); ) { String s = (String)i.next(); tfidfDistance.prepare( s ); Token[] tokens = tfidfDistance.getTokens(); for (int j=0; j<tokens.length; j++) { Token tok = tokens[j]; double w = tfidfDistance.getWeight( tok ); maxTFIDFScore[ tok.getIndex() ] = Math.max( maxTFIDFScore[tok.getIndex()], w ); Set ii = invertedIndex[ tok.getIndex() ]; if (ii==null) ii = invertedIndex[ tok.getIndex() ] = new HashSet(); ii.add( s ); //if (DEBUG) System.out.println("adjust maxscore, invertedIndex for "+tok); } } // find out which tokens are similar to which other tokens if (DEBUG) System.out.println("computing similar-tokens for "+tokenizer.maxTokenIndex()+" tokens, window="+windowSize); allTokens = new Token[tokenizer.maxTokenIndex()] ; numTokens=0; for (Iterator i=tokenizer.tokenIterator(); i.hasNext(); ) { Token toki = (Token)i.next(); allTokens[numTokens++] = toki; } Arrays.sort(allTokens,LEXICAL_ORDER_FOR_TOKENS); similarTokens = new Token[tokenizer.maxTokenIndex()+1][]; for (int i=0; i<numTokens; i++) { Token toki = allTokens[i]; Set likeTokI = findSimilarTokens( toki.getValue(), i ); similarTokens[ toki.getIndex() ] = new Token[ likeTokI.size() ]; int k = 0; for (Iterator j=likeTokI.iterator(); j.hasNext(); ) { Token tokj = (Token)j.next(); similarTokens[toki.getIndex()][ k++ ] = tokj; } } frozen = true; }
[ "public", "void", "freeze", "(", ")", "{", "if", "(", "frozen", ")", "return", ";", "// train the TFIDF distance on all strings seen\r", "trainDistances", "(", ")", ";", "// now, compute the maxScore of each token, and create an inverted index\r", "if", "(", "DEBUG", ")", ...
Make it impossible to add new values, but possible to perform lookups.
[ "Make", "it", "impossible", "to", "add", "new", "values", "but", "possible", "to", "perform", "lookups", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/lookup/SoftTFIDFDictionary.java#L363-L413
train
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/lookup/SoftTFIDFDictionary.java
SoftTFIDFDictionary.findSimilarTokens
private Set findSimilarTokens(String s,int i) { Set likeTokI = new HashSet(); for (int j=Math.max(0,i-windowSize); j<Math.min(i+windowSize,numTokens); j++) { if (i!=j) { Token tokj = allTokens[j]; double d = jaroWinklerDistance.score( s, tokj.getValue() ); if (d>=minTokenSimilarity) likeTokI.add( tokj ); } } return likeTokI; }
java
private Set findSimilarTokens(String s,int i) { Set likeTokI = new HashSet(); for (int j=Math.max(0,i-windowSize); j<Math.min(i+windowSize,numTokens); j++) { if (i!=j) { Token tokj = allTokens[j]; double d = jaroWinklerDistance.score( s, tokj.getValue() ); if (d>=minTokenSimilarity) likeTokI.add( tokj ); } } return likeTokI; }
[ "private", "Set", "findSimilarTokens", "(", "String", "s", ",", "int", "i", ")", "{", "Set", "likeTokI", "=", "new", "HashSet", "(", ")", ";", "for", "(", "int", "j", "=", "Math", ".", "max", "(", "0", ",", "i", "-", "windowSize", ")", ";", "j", ...
position of s in the list 'allTokens'
[ "position", "of", "s", "in", "the", "list", "allTokens" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/lookup/SoftTFIDFDictionary.java#L432-L443
train
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/lookup/SoftTFIDFDictionary.java
SoftTFIDFDictionary.slowLookup
public int slowLookup(double minScore,String toFind) { if (!frozen) freeze(); long start = System.currentTimeMillis(); StringWrapper wa = softTFIDFDistance.prepare( toFind ); result = new ArrayList(); for (Iterator i=valueMap.keySet().iterator(); i.hasNext(); ) { String found = (String)i.next(); StringWrapper wb = softTFIDFDistance.prepare( found ); double d = softTFIDFDistance.score( wa, wb ); if (d>=minScore) { Set valset = (Set)valueMap.get(found); for (Iterator j=valset.iterator(); j.hasNext(); ) { String valj=(String)j.next(); result.add(new LookupResult(found,valj,d)); } } } Collections.sort( result ); lookupTime = (System.currentTimeMillis()-start) / 1000.0; return result.size(); }
java
public int slowLookup(double minScore,String toFind) { if (!frozen) freeze(); long start = System.currentTimeMillis(); StringWrapper wa = softTFIDFDistance.prepare( toFind ); result = new ArrayList(); for (Iterator i=valueMap.keySet().iterator(); i.hasNext(); ) { String found = (String)i.next(); StringWrapper wb = softTFIDFDistance.prepare( found ); double d = softTFIDFDistance.score( wa, wb ); if (d>=minScore) { Set valset = (Set)valueMap.get(found); for (Iterator j=valset.iterator(); j.hasNext(); ) { String valj=(String)j.next(); result.add(new LookupResult(found,valj,d)); } } } Collections.sort( result ); lookupTime = (System.currentTimeMillis()-start) / 1000.0; return result.size(); }
[ "public", "int", "slowLookup", "(", "double", "minScore", ",", "String", "toFind", ")", "{", "if", "(", "!", "frozen", ")", "freeze", "(", ")", ";", "long", "start", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "StringWrapper", "wa", "=", "s...
Exactly like lookup, but works by exhaustively checking every stored string.
[ "Exactly", "like", "lookup", "but", "works", "by", "exhaustively", "checking", "every", "stored", "string", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/lookup/SoftTFIDFDictionary.java#L452-L473
train
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/lookup/SoftTFIDFDictionary.java
SoftTFIDFDictionary.storeUpperBound
private void storeUpperBound(Token tok, Token simTok, List usefulTokens, Map upperBoundOnWeight, double sim) { double upperBound = tfidfDistance.getWeight(tok)*maxTFIDFScore[simTok.getIndex()]*sim; if (DEBUG) System.out.println("upper-bounding tok "+simTok+" sim="+sim+" to "+tok+" upperBound "+upperBound); if (DEBUG) System.out.println("upperBound = "+tfidfDistance.getWeight(tok)+"*"+maxTFIDFScore[simTok.getIndex()]+"*"+sim); usefulTokens.add( simTok ); upperBoundOnWeight.put( simTok, new Double(upperBound) ); }
java
private void storeUpperBound(Token tok, Token simTok, List usefulTokens, Map upperBoundOnWeight, double sim) { double upperBound = tfidfDistance.getWeight(tok)*maxTFIDFScore[simTok.getIndex()]*sim; if (DEBUG) System.out.println("upper-bounding tok "+simTok+" sim="+sim+" to "+tok+" upperBound "+upperBound); if (DEBUG) System.out.println("upperBound = "+tfidfDistance.getWeight(tok)+"*"+maxTFIDFScore[simTok.getIndex()]+"*"+sim); usefulTokens.add( simTok ); upperBoundOnWeight.put( simTok, new Double(upperBound) ); }
[ "private", "void", "storeUpperBound", "(", "Token", "tok", ",", "Token", "simTok", ",", "List", "usefulTokens", ",", "Map", "upperBoundOnWeight", ",", "double", "sim", ")", "{", "double", "upperBound", "=", "tfidfDistance", ".", "getWeight", "(", "tok", ")", ...
subroutine of lookup
[ "subroutine", "of", "lookup" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/lookup/SoftTFIDFDictionary.java#L567-L574
train
BlueBrain/bluima
utils/blue_commons/src/main/java/ch/epfl/bbp/io/TextFileWriter.java
TextFileWriter.addLine
public void addLine(String line) { try { writer.append(line); writer.newLine(); } catch (IOException e) { e.printStackTrace(); } }
java
public void addLine(String line) { try { writer.append(line); writer.newLine(); } catch (IOException e) { e.printStackTrace(); } }
[ "public", "void", "addLine", "(", "String", "line", ")", "{", "try", "{", "writer", ".", "append", "(", "line", ")", ";", "writer", ".", "newLine", "(", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "e", ".", "printStackTrace", "(", ")...
add text, and a new line
[ "add", "text", "and", "a", "new", "line" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/utils/blue_commons/src/main/java/ch/epfl/bbp/io/TextFileWriter.java#L29-L36
train
BlueBrain/bluima
utils/blue_commons/src/main/java/ch/epfl/bbp/io/TextFileWriter.java
TextFileWriter.addText
public void addText(String text) { try { writer.append(text); } catch (IOException e) { e.printStackTrace(); } }
java
public void addText(String text) { try { writer.append(text); } catch (IOException e) { e.printStackTrace(); } }
[ "public", "void", "addText", "(", "String", "text", ")", "{", "try", "{", "writer", ".", "append", "(", "text", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "}", "}" ]
add text, without new line
[ "add", "text", "without", "new", "line" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/utils/blue_commons/src/main/java/ch/epfl/bbp/io/TextFileWriter.java#L39-L45
train
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/MultiStringDistance.java
MultiStringDistance.multiScore
private double[] multiScore(MultiStringWrapper ms,MultiStringWrapper mt) { if (ms.size() != mt.size()) { throw new IllegalArgumentException("inputs have different numbers of fields"); } int n = ms.size(); double scores[] = new double[n]; for (int i=0; i<n; i++) { scores[i] = getDistance(i).score(ms.get(i), mt.get(i)); } return scores; }
java
private double[] multiScore(MultiStringWrapper ms,MultiStringWrapper mt) { if (ms.size() != mt.size()) { throw new IllegalArgumentException("inputs have different numbers of fields"); } int n = ms.size(); double scores[] = new double[n]; for (int i=0; i<n; i++) { scores[i] = getDistance(i).score(ms.get(i), mt.get(i)); } return scores; }
[ "private", "double", "[", "]", "multiScore", "(", "MultiStringWrapper", "ms", ",", "MultiStringWrapper", "mt", ")", "{", "if", "(", "ms", ".", "size", "(", ")", "!=", "mt", ".", "size", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(",...
Compute the scores for each primitive distance function on each field.
[ "Compute", "the", "scores", "for", "each", "primitive", "distance", "function", "on", "each", "field", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/MultiStringDistance.java#L43-L54
train
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/MultiStringDistance.java
MultiStringDistance.score
final public double score(String s, String t) { return score(prepare(s), prepare(t)); }
java
final public double score(String s, String t) { return score(prepare(s), prepare(t)); }
[ "final", "public", "double", "score", "(", "String", "s", ",", "String", "t", ")", "{", "return", "score", "(", "prepare", "(", "s", ")", ",", "prepare", "(", "t", ")", ")", ";", "}" ]
Strings are scored by converting them to StringWrappers with the prepare function.
[ "Strings", "are", "scored", "by", "converting", "them", "to", "StringWrappers", "with", "the", "prepare", "function", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/MultiStringDistance.java#L80-L82
train
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/MultiStringDistance.java
MultiStringDistance.explainScore
final public String explainScore(String s, String t) { return explainScore(prepare(s),prepare(t)); }
java
final public String explainScore(String s, String t) { return explainScore(prepare(s),prepare(t)); }
[ "final", "public", "String", "explainScore", "(", "String", "s", ",", "String", "t", ")", "{", "return", "explainScore", "(", "prepare", "(", "s", ")", ",", "prepare", "(", "t", ")", ")", ";", "}" ]
Scores are explained by converting Strings to StringWrappers with the prepare function.
[ "Scores", "are", "explained", "by", "converting", "Strings", "to", "StringWrappers", "with", "the", "prepare", "function", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/MultiStringDistance.java#L86-L88
train
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/MultiStringDistance.java
MultiStringDistance.prepare
final public StringWrapper prepare(String s) { MultiStringWrapper ms = new MultiStringWrapper(s,delim); if (!isLegalMultiStringWrapperSize(ms.size())) { throw new IllegalArgumentException("string has invalid number of fields"); } for (int i=0; i<ms.size(); i++) { ms.set(i, getDistance(i).prepare( ms.get(i).unwrap() )); } return ms; }
java
final public StringWrapper prepare(String s) { MultiStringWrapper ms = new MultiStringWrapper(s,delim); if (!isLegalMultiStringWrapperSize(ms.size())) { throw new IllegalArgumentException("string has invalid number of fields"); } for (int i=0; i<ms.size(); i++) { ms.set(i, getDistance(i).prepare( ms.get(i).unwrap() )); } return ms; }
[ "final", "public", "StringWrapper", "prepare", "(", "String", "s", ")", "{", "MultiStringWrapper", "ms", "=", "new", "MultiStringWrapper", "(", "s", ",", "delim", ")", ";", "if", "(", "!", "isLegalMultiStringWrapperSize", "(", "ms", ".", "size", "(", ")", ...
Prepare a string.
[ "Prepare", "a", "string", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/MultiStringDistance.java#L92-L101
train
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/MultiStringDistance.java
MultiStringDistance.doMain
final protected static void doMain(StringDistance d,String[] argv) { if (argv.length!=2) { System.out.println("usage: string1 string2"); } else { System.out.println(d.explainScore(argv[0],argv[1])); } }
java
final protected static void doMain(StringDistance d,String[] argv) { if (argv.length!=2) { System.out.println("usage: string1 string2"); } else { System.out.println(d.explainScore(argv[0],argv[1])); } }
[ "final", "protected", "static", "void", "doMain", "(", "StringDistance", "d", ",", "String", "[", "]", "argv", ")", "{", "if", "(", "argv", ".", "length", "!=", "2", ")", "{", "System", ".", "out", ".", "println", "(", "\"usage: string1 string2\"", ")", ...
Default main routine for testing
[ "Default", "main", "routine", "for", "testing" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/MultiStringDistance.java#L123-L130
train
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/ApproxNeedlemanWunsch.java
ApproxNeedlemanWunsch.getAlignedChar
public int getAlignedChar(int iMinusOne,boolean preferHigherIndices) { // internally to this package, strings are indexed 1...N, so // we need to convert from the usual 0...N-1 Java convention int i = iMinusOne+1; int bestJ = -1; double bestScore = -Double.MAX_VALUE; for (int j=mat.getFirstStoredEntryInRow(i); j<=mat.getLastStoredEntryInRow(i); j++) { if (mat.outOfRange(i,j)) log.error("out of range: "+i+","+j); double score = mat.get(i,j); if ((score>bestScore) || (score==bestScore && preferHigherIndices)) { bestScore = score; bestJ = j; } } // convert back to the usual 0...N-1 Java convention return bestJ-1; }
java
public int getAlignedChar(int iMinusOne,boolean preferHigherIndices) { // internally to this package, strings are indexed 1...N, so // we need to convert from the usual 0...N-1 Java convention int i = iMinusOne+1; int bestJ = -1; double bestScore = -Double.MAX_VALUE; for (int j=mat.getFirstStoredEntryInRow(i); j<=mat.getLastStoredEntryInRow(i); j++) { if (mat.outOfRange(i,j)) log.error("out of range: "+i+","+j); double score = mat.get(i,j); if ((score>bestScore) || (score==bestScore && preferHigherIndices)) { bestScore = score; bestJ = j; } } // convert back to the usual 0...N-1 Java convention return bestJ-1; }
[ "public", "int", "getAlignedChar", "(", "int", "iMinusOne", ",", "boolean", "preferHigherIndices", ")", "{", "// internally to this package, strings are indexed 1...N, so\r", "// we need to convert from the usual 0...N-1 Java convention\r", "int", "i", "=", "iMinusOne", "+", "1",...
Find a character in the first string, s, that can be aligned with the i-th character in the second string, t.
[ "Find", "a", "character", "in", "the", "first", "string", "s", "that", "can", "be", "aligned", "with", "the", "i", "-", "th", "character", "in", "the", "second", "string", "t", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/ApproxNeedlemanWunsch.java#L59-L76
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java
Header.getCopyright
public String getCopyright() { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_copyright == null) jcasType.jcas.throwFeatMissing("copyright", "de.julielab.jules.types.Header"); return jcasType.ll_cas.ll_getStringValue(addr, ((Header_Type)jcasType).casFeatCode_copyright);}
java
public String getCopyright() { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_copyright == null) jcasType.jcas.throwFeatMissing("copyright", "de.julielab.jules.types.Header"); return jcasType.ll_cas.ll_getStringValue(addr, ((Header_Type)jcasType).casFeatCode_copyright);}
[ "public", "String", "getCopyright", "(", ")", "{", "if", "(", "Header_Type", ".", "featOkTst", "&&", "(", "(", "Header_Type", ")", "jcasType", ")", ".", "casFeat_copyright", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"copyrig...
getter for copyright - gets Copyright information, C @generated @return value of the feature
[ "getter", "for", "copyright", "-", "gets", "Copyright", "information", "C" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java#L152-L155
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java
Header.setCopyright
public void setCopyright(String v) { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_copyright == null) jcasType.jcas.throwFeatMissing("copyright", "de.julielab.jules.types.Header"); jcasType.ll_cas.ll_setStringValue(addr, ((Header_Type)jcasType).casFeatCode_copyright, v);}
java
public void setCopyright(String v) { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_copyright == null) jcasType.jcas.throwFeatMissing("copyright", "de.julielab.jules.types.Header"); jcasType.ll_cas.ll_setStringValue(addr, ((Header_Type)jcasType).casFeatCode_copyright, v);}
[ "public", "void", "setCopyright", "(", "String", "v", ")", "{", "if", "(", "Header_Type", ".", "featOkTst", "&&", "(", "(", "Header_Type", ")", "jcasType", ")", ".", "casFeat_copyright", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", ...
setter for copyright - sets Copyright information, C @generated @param v value to set into the feature
[ "setter", "for", "copyright", "-", "sets", "Copyright", "information", "C" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java#L161-L164
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java
Header.getTruncated
public boolean getTruncated() { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_truncated == null) jcasType.jcas.throwFeatMissing("truncated", "de.julielab.jules.types.Header"); return jcasType.ll_cas.ll_getBooleanValue(addr, ((Header_Type)jcasType).casFeatCode_truncated);}
java
public boolean getTruncated() { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_truncated == null) jcasType.jcas.throwFeatMissing("truncated", "de.julielab.jules.types.Header"); return jcasType.ll_cas.ll_getBooleanValue(addr, ((Header_Type)jcasType).casFeatCode_truncated);}
[ "public", "boolean", "getTruncated", "(", ")", "{", "if", "(", "Header_Type", ".", "featOkTst", "&&", "(", "(", "Header_Type", ")", "jcasType", ")", ".", "casFeat_truncated", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"trunca...
getter for truncated - gets Indicates whether the document is truncated, C @generated @return value of the feature
[ "getter", "for", "truncated", "-", "gets", "Indicates", "whether", "the", "document", "is", "truncated", "C" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java#L174-L177
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java
Header.setTruncated
public void setTruncated(boolean v) { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_truncated == null) jcasType.jcas.throwFeatMissing("truncated", "de.julielab.jules.types.Header"); jcasType.ll_cas.ll_setBooleanValue(addr, ((Header_Type)jcasType).casFeatCode_truncated, v);}
java
public void setTruncated(boolean v) { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_truncated == null) jcasType.jcas.throwFeatMissing("truncated", "de.julielab.jules.types.Header"); jcasType.ll_cas.ll_setBooleanValue(addr, ((Header_Type)jcasType).casFeatCode_truncated, v);}
[ "public", "void", "setTruncated", "(", "boolean", "v", ")", "{", "if", "(", "Header_Type", ".", "featOkTst", "&&", "(", "(", "Header_Type", ")", "jcasType", ")", ".", "casFeat_truncated", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", ...
setter for truncated - sets Indicates whether the document is truncated, C @generated @param v value to set into the feature
[ "setter", "for", "truncated", "-", "sets", "Indicates", "whether", "the", "document", "is", "truncated", "C" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java#L183-L186
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java
Header.getAuthors
public FSArray getAuthors() { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_authors == null) jcasType.jcas.throwFeatMissing("authors", "de.julielab.jules.types.Header"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_authors)));}
java
public FSArray getAuthors() { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_authors == null) jcasType.jcas.throwFeatMissing("authors", "de.julielab.jules.types.Header"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_authors)));}
[ "public", "FSArray", "getAuthors", "(", ")", "{", "if", "(", "Header_Type", ".", "featOkTst", "&&", "(", "(", "Header_Type", ")", "jcasType", ")", ".", "casFeat_authors", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"authors\""...
getter for authors - gets The authors of the document, O @generated @return value of the feature
[ "getter", "for", "authors", "-", "gets", "The", "authors", "of", "the", "document", "O" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java#L196-L199
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java
Header.setAuthors
public void setAuthors(FSArray v) { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_authors == null) jcasType.jcas.throwFeatMissing("authors", "de.julielab.jules.types.Header"); jcasType.ll_cas.ll_setRefValue(addr, ((Header_Type)jcasType).casFeatCode_authors, jcasType.ll_cas.ll_getFSRef(v));}
java
public void setAuthors(FSArray v) { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_authors == null) jcasType.jcas.throwFeatMissing("authors", "de.julielab.jules.types.Header"); jcasType.ll_cas.ll_setRefValue(addr, ((Header_Type)jcasType).casFeatCode_authors, jcasType.ll_cas.ll_getFSRef(v));}
[ "public", "void", "setAuthors", "(", "FSArray", "v", ")", "{", "if", "(", "Header_Type", ".", "featOkTst", "&&", "(", "(", "Header_Type", ")", "jcasType", ")", ".", "casFeat_authors", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "("...
setter for authors - sets The authors of the document, O @generated @param v value to set into the feature
[ "setter", "for", "authors", "-", "sets", "The", "authors", "of", "the", "document", "O" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java#L205-L208
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java
Header.getAuthors
public AuthorInfo getAuthors(int i) { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_authors == null) jcasType.jcas.throwFeatMissing("authors", "de.julielab.jules.types.Header"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_authors), i); return (AuthorInfo)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_authors), i)));}
java
public AuthorInfo getAuthors(int i) { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_authors == null) jcasType.jcas.throwFeatMissing("authors", "de.julielab.jules.types.Header"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_authors), i); return (AuthorInfo)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_authors), i)));}
[ "public", "AuthorInfo", "getAuthors", "(", "int", "i", ")", "{", "if", "(", "Header_Type", ".", "featOkTst", "&&", "(", "(", "Header_Type", ")", "jcasType", ")", ".", "casFeat_authors", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "...
indexed getter for authors - gets an indexed value - The authors of the document, O @generated @param i index in the array to get @return value of the element at index i
[ "indexed", "getter", "for", "authors", "-", "gets", "an", "indexed", "value", "-", "The", "authors", "of", "the", "document", "O" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java#L215-L219
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java
Header.setAuthors
public void setAuthors(int i, AuthorInfo v) { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_authors == null) jcasType.jcas.throwFeatMissing("authors", "de.julielab.jules.types.Header"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_authors), i); jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_authors), i, jcasType.ll_cas.ll_getFSRef(v));}
java
public void setAuthors(int i, AuthorInfo v) { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_authors == null) jcasType.jcas.throwFeatMissing("authors", "de.julielab.jules.types.Header"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_authors), i); jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_authors), i, jcasType.ll_cas.ll_getFSRef(v));}
[ "public", "void", "setAuthors", "(", "int", "i", ",", "AuthorInfo", "v", ")", "{", "if", "(", "Header_Type", ".", "featOkTst", "&&", "(", "(", "Header_Type", ")", "jcasType", ")", ".", "casFeat_authors", "==", "null", ")", "jcasType", ".", "jcas", ".", ...
indexed setter for authors - sets an indexed value - The authors of the document, O @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "authors", "-", "sets", "an", "indexed", "value", "-", "The", "authors", "of", "the", "document", "O" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java#L226-L230
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java
Header.getPubTypeList
public FSArray getPubTypeList() { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_pubTypeList == null) jcasType.jcas.throwFeatMissing("pubTypeList", "de.julielab.jules.types.Header"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_pubTypeList)));}
java
public FSArray getPubTypeList() { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_pubTypeList == null) jcasType.jcas.throwFeatMissing("pubTypeList", "de.julielab.jules.types.Header"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_pubTypeList)));}
[ "public", "FSArray", "getPubTypeList", "(", ")", "{", "if", "(", "Header_Type", ".", "featOkTst", "&&", "(", "(", "Header_Type", ")", "jcasType", ")", ".", "casFeat_pubTypeList", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"pu...
getter for pubTypeList - gets The list of the publication types, O @generated @return value of the feature
[ "getter", "for", "pubTypeList", "-", "gets", "The", "list", "of", "the", "publication", "types", "O" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java#L262-L265
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java
Header.setPubTypeList
public void setPubTypeList(FSArray v) { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_pubTypeList == null) jcasType.jcas.throwFeatMissing("pubTypeList", "de.julielab.jules.types.Header"); jcasType.ll_cas.ll_setRefValue(addr, ((Header_Type)jcasType).casFeatCode_pubTypeList, jcasType.ll_cas.ll_getFSRef(v));}
java
public void setPubTypeList(FSArray v) { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_pubTypeList == null) jcasType.jcas.throwFeatMissing("pubTypeList", "de.julielab.jules.types.Header"); jcasType.ll_cas.ll_setRefValue(addr, ((Header_Type)jcasType).casFeatCode_pubTypeList, jcasType.ll_cas.ll_getFSRef(v));}
[ "public", "void", "setPubTypeList", "(", "FSArray", "v", ")", "{", "if", "(", "Header_Type", ".", "featOkTst", "&&", "(", "(", "Header_Type", ")", "jcasType", ")", ".", "casFeat_pubTypeList", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing...
setter for pubTypeList - sets The list of the publication types, O @generated @param v value to set into the feature
[ "setter", "for", "pubTypeList", "-", "sets", "The", "list", "of", "the", "publication", "types", "O" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java#L271-L274
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java
Header.getPubTypeList
public PubType getPubTypeList(int i) { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_pubTypeList == null) jcasType.jcas.throwFeatMissing("pubTypeList", "de.julielab.jules.types.Header"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_pubTypeList), i); return (PubType)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_pubTypeList), i)));}
java
public PubType getPubTypeList(int i) { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_pubTypeList == null) jcasType.jcas.throwFeatMissing("pubTypeList", "de.julielab.jules.types.Header"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_pubTypeList), i); return (PubType)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_pubTypeList), i)));}
[ "public", "PubType", "getPubTypeList", "(", "int", "i", ")", "{", "if", "(", "Header_Type", ".", "featOkTst", "&&", "(", "(", "Header_Type", ")", "jcasType", ")", ".", "casFeat_pubTypeList", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing"...
indexed getter for pubTypeList - gets an indexed value - The list of the publication types, O @generated @param i index in the array to get @return value of the element at index i
[ "indexed", "getter", "for", "pubTypeList", "-", "gets", "an", "indexed", "value", "-", "The", "list", "of", "the", "publication", "types", "O" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java#L281-L285
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java
Header.setPubTypeList
public void setPubTypeList(int i, PubType v) { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_pubTypeList == null) jcasType.jcas.throwFeatMissing("pubTypeList", "de.julielab.jules.types.Header"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_pubTypeList), i); jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_pubTypeList), i, jcasType.ll_cas.ll_getFSRef(v));}
java
public void setPubTypeList(int i, PubType v) { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_pubTypeList == null) jcasType.jcas.throwFeatMissing("pubTypeList", "de.julielab.jules.types.Header"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_pubTypeList), i); jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_pubTypeList), i, jcasType.ll_cas.ll_getFSRef(v));}
[ "public", "void", "setPubTypeList", "(", "int", "i", ",", "PubType", "v", ")", "{", "if", "(", "Header_Type", ".", "featOkTst", "&&", "(", "(", "Header_Type", ")", "jcasType", ")", ".", "casFeat_pubTypeList", "==", "null", ")", "jcasType", ".", "jcas", "...
indexed setter for pubTypeList - sets an indexed value - The list of the publication types, O @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "pubTypeList", "-", "sets", "an", "indexed", "value", "-", "The", "list", "of", "the", "publication", "types", "O" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java#L292-L296
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java
Header.getLanguage
public String getLanguage() { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_language == null) jcasType.jcas.throwFeatMissing("language", "de.julielab.jules.types.Header"); return jcasType.ll_cas.ll_getStringValue(addr, ((Header_Type)jcasType).casFeatCode_language);}
java
public String getLanguage() { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_language == null) jcasType.jcas.throwFeatMissing("language", "de.julielab.jules.types.Header"); return jcasType.ll_cas.ll_getStringValue(addr, ((Header_Type)jcasType).casFeatCode_language);}
[ "public", "String", "getLanguage", "(", ")", "{", "if", "(", "Header_Type", ".", "featOkTst", "&&", "(", "(", "Header_Type", ")", "jcasType", ")", ".", "casFeat_language", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"language\...
getter for language - gets The language of the document, O @generated @return value of the feature
[ "getter", "for", "language", "-", "gets", "The", "language", "of", "the", "document", "O" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java#L306-L309
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java
Header.setLanguage
public void setLanguage(String v) { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_language == null) jcasType.jcas.throwFeatMissing("language", "de.julielab.jules.types.Header"); jcasType.ll_cas.ll_setStringValue(addr, ((Header_Type)jcasType).casFeatCode_language, v);}
java
public void setLanguage(String v) { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_language == null) jcasType.jcas.throwFeatMissing("language", "de.julielab.jules.types.Header"); jcasType.ll_cas.ll_setStringValue(addr, ((Header_Type)jcasType).casFeatCode_language, v);}
[ "public", "void", "setLanguage", "(", "String", "v", ")", "{", "if", "(", "Header_Type", ".", "featOkTst", "&&", "(", "(", "Header_Type", ")", "jcasType", ")", ".", "casFeat_language", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(...
setter for language - sets The language of the document, O @generated @param v value to set into the feature
[ "setter", "for", "language", "-", "sets", "The", "language", "of", "the", "document", "O" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java#L315-L318
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java
Header.getDoi
public String getDoi() { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_doi == null) jcasType.jcas.throwFeatMissing("doi", "de.julielab.jules.types.Header"); return jcasType.ll_cas.ll_getStringValue(addr, ((Header_Type)jcasType).casFeatCode_doi);}
java
public String getDoi() { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_doi == null) jcasType.jcas.throwFeatMissing("doi", "de.julielab.jules.types.Header"); return jcasType.ll_cas.ll_getStringValue(addr, ((Header_Type)jcasType).casFeatCode_doi);}
[ "public", "String", "getDoi", "(", ")", "{", "if", "(", "Header_Type", ".", "featOkTst", "&&", "(", "(", "Header_Type", ")", "jcasType", ")", ".", "casFeat_doi", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"doi\"", ",", "\...
getter for doi - gets document object identifier @generated @return value of the feature
[ "getter", "for", "doi", "-", "gets", "document", "object", "identifier" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java#L328-L331
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java
Header.setDoi
public void setDoi(String v) { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_doi == null) jcasType.jcas.throwFeatMissing("doi", "de.julielab.jules.types.Header"); jcasType.ll_cas.ll_setStringValue(addr, ((Header_Type)jcasType).casFeatCode_doi, v);}
java
public void setDoi(String v) { if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_doi == null) jcasType.jcas.throwFeatMissing("doi", "de.julielab.jules.types.Header"); jcasType.ll_cas.ll_setStringValue(addr, ((Header_Type)jcasType).casFeatCode_doi, v);}
[ "public", "void", "setDoi", "(", "String", "v", ")", "{", "if", "(", "Header_Type", ".", "featOkTst", "&&", "(", "(", "Header_Type", ")", "jcasType", ")", ".", "casFeat_doi", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"do...
setter for doi - sets document object identifier @generated @param v value to set into the feature
[ "setter", "for", "doi", "-", "sets", "document", "object", "identifier" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java#L337-L340
train
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/SourcedTFIDF.java
SourcedTFIDF.getDocumentFrequency
public int getDocumentFrequency(Token token) { Integer df = (Integer)documentFrequency.get(token); if (df == null) return 0; else return df.intValue(); }
java
public int getDocumentFrequency(Token token) { Integer df = (Integer)documentFrequency.get(token); if (df == null) return 0; else return df.intValue(); }
[ "public", "int", "getDocumentFrequency", "(", "Token", "token", ")", "{", "Integer", "df", "=", "(", "Integer", ")", "documentFrequency", ".", "get", "(", "token", ")", ";", "if", "(", "df", "==", "null", ")", "return", "0", ";", "else", "return", "df"...
Get the document frequency of the token.
[ "Get", "the", "document", "frequency", "of", "the", "token", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/SourcedTFIDF.java#L62-L67
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/PronounFeats.java
PronounFeats.setGender
public void setGender(String v) { if (PronounFeats_Type.featOkTst && ((PronounFeats_Type)jcasType).casFeat_gender == null) jcasType.jcas.throwFeatMissing("gender", "de.julielab.jules.types.PronounFeats"); jcasType.ll_cas.ll_setStringValue(addr, ((PronounFeats_Type)jcasType).casFeatCode_gender, v);}
java
public void setGender(String v) { if (PronounFeats_Type.featOkTst && ((PronounFeats_Type)jcasType).casFeat_gender == null) jcasType.jcas.throwFeatMissing("gender", "de.julielab.jules.types.PronounFeats"); jcasType.ll_cas.ll_setStringValue(addr, ((PronounFeats_Type)jcasType).casFeatCode_gender, v);}
[ "public", "void", "setGender", "(", "String", "v", ")", "{", "if", "(", "PronounFeats_Type", ".", "featOkTst", "&&", "(", "(", "PronounFeats_Type", ")", "jcasType", ")", ".", "casFeat_gender", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissin...
setter for gender - sets Gender @generated @param v value to set into the feature
[ "setter", "for", "gender", "-", "sets", "Gender" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/PronounFeats.java#L94-L97
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/PronounFeats.java
PronounFeats.getCase
public String getCase() { if (PronounFeats_Type.featOkTst && ((PronounFeats_Type)jcasType).casFeat_case == null) jcasType.jcas.throwFeatMissing("case", "de.julielab.jules.types.PronounFeats"); return jcasType.ll_cas.ll_getStringValue(addr, ((PronounFeats_Type)jcasType).casFeatCode_case);}
java
public String getCase() { if (PronounFeats_Type.featOkTst && ((PronounFeats_Type)jcasType).casFeat_case == null) jcasType.jcas.throwFeatMissing("case", "de.julielab.jules.types.PronounFeats"); return jcasType.ll_cas.ll_getStringValue(addr, ((PronounFeats_Type)jcasType).casFeatCode_case);}
[ "public", "String", "getCase", "(", ")", "{", "if", "(", "PronounFeats_Type", ".", "featOkTst", "&&", "(", "(", "PronounFeats_Type", ")", "jcasType", ")", ".", "casFeat_case", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"case\...
getter for case - gets Case @generated @return value of the feature
[ "getter", "for", "case", "-", "gets", "Case" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/PronounFeats.java#L107-L110
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/PronounFeats.java
PronounFeats.setCase
public void setCase(String v) { if (PronounFeats_Type.featOkTst && ((PronounFeats_Type)jcasType).casFeat_case == null) jcasType.jcas.throwFeatMissing("case", "de.julielab.jules.types.PronounFeats"); jcasType.ll_cas.ll_setStringValue(addr, ((PronounFeats_Type)jcasType).casFeatCode_case, v);}
java
public void setCase(String v) { if (PronounFeats_Type.featOkTst && ((PronounFeats_Type)jcasType).casFeat_case == null) jcasType.jcas.throwFeatMissing("case", "de.julielab.jules.types.PronounFeats"); jcasType.ll_cas.ll_setStringValue(addr, ((PronounFeats_Type)jcasType).casFeatCode_case, v);}
[ "public", "void", "setCase", "(", "String", "v", ")", "{", "if", "(", "PronounFeats_Type", ".", "featOkTst", "&&", "(", "(", "PronounFeats_Type", ")", "jcasType", ")", ".", "casFeat_case", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", ...
setter for case - sets Case @generated @param v value to set into the feature
[ "setter", "for", "case", "-", "sets", "Case" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/PronounFeats.java#L116-L119
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/PronounFeats.java
PronounFeats.getNumber
public String getNumber() { if (PronounFeats_Type.featOkTst && ((PronounFeats_Type)jcasType).casFeat_number == null) jcasType.jcas.throwFeatMissing("number", "de.julielab.jules.types.PronounFeats"); return jcasType.ll_cas.ll_getStringValue(addr, ((PronounFeats_Type)jcasType).casFeatCode_number);}
java
public String getNumber() { if (PronounFeats_Type.featOkTst && ((PronounFeats_Type)jcasType).casFeat_number == null) jcasType.jcas.throwFeatMissing("number", "de.julielab.jules.types.PronounFeats"); return jcasType.ll_cas.ll_getStringValue(addr, ((PronounFeats_Type)jcasType).casFeatCode_number);}
[ "public", "String", "getNumber", "(", ")", "{", "if", "(", "PronounFeats_Type", ".", "featOkTst", "&&", "(", "(", "PronounFeats_Type", ")", "jcasType", ")", ".", "casFeat_number", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"n...
getter for number - gets Number @generated @return value of the feature
[ "getter", "for", "number", "-", "gets", "Number" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/PronounFeats.java#L129-L132
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/PronounFeats.java
PronounFeats.setNumber
public void setNumber(String v) { if (PronounFeats_Type.featOkTst && ((PronounFeats_Type)jcasType).casFeat_number == null) jcasType.jcas.throwFeatMissing("number", "de.julielab.jules.types.PronounFeats"); jcasType.ll_cas.ll_setStringValue(addr, ((PronounFeats_Type)jcasType).casFeatCode_number, v);}
java
public void setNumber(String v) { if (PronounFeats_Type.featOkTst && ((PronounFeats_Type)jcasType).casFeat_number == null) jcasType.jcas.throwFeatMissing("number", "de.julielab.jules.types.PronounFeats"); jcasType.ll_cas.ll_setStringValue(addr, ((PronounFeats_Type)jcasType).casFeatCode_number, v);}
[ "public", "void", "setNumber", "(", "String", "v", ")", "{", "if", "(", "PronounFeats_Type", ".", "featOkTst", "&&", "(", "(", "PronounFeats_Type", ")", "jcasType", ")", ".", "casFeat_number", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissin...
setter for number - sets Number @generated @param v value to set into the feature
[ "setter", "for", "number", "-", "sets", "Number" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/PronounFeats.java#L138-L141
train
BlueBrain/bluima
modules/bluima_xml/src/main/java/ch/epfl/bbp/uima/xml/archivearticle3/Th.java
Th.getHeaders
public java.util.List<Object> getHeaders() { if (headers == null) { headers = new ArrayList<Object>(); } return this.headers; }
java
public java.util.List<Object> getHeaders() { if (headers == null) { headers = new ArrayList<Object>(); } return this.headers; }
[ "public", "java", ".", "util", ".", "List", "<", "Object", ">", "getHeaders", "(", ")", "{", "if", "(", "headers", "==", "null", ")", "{", "headers", "=", "new", "ArrayList", "<", "Object", ">", "(", ")", ";", "}", "return", "this", ".", "headers",...
Gets the value of the headers property. <p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the headers property. <p> For example, to add a new item, do as follows: <pre> getHeaders().add(newItem); </pre> <p> Objects of the following type(s) are allowed in the list {@link Object }
[ "Gets", "the", "value", "of", "the", "headers", "property", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_xml/src/main/java/ch/epfl/bbp/uima/xml/archivearticle3/Th.java#L465-L470
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Annotation.java
Annotation.getComponentId
public String getComponentId() { if (Annotation_Type.featOkTst && ((Annotation_Type)jcasType).casFeat_componentId == null) jcasType.jcas.throwFeatMissing("componentId", "de.julielab.jules.types.Annotation"); return jcasType.ll_cas.ll_getStringValue(addr, ((Annotation_Type)jcasType).casFeatCode_componentId);}
java
public String getComponentId() { if (Annotation_Type.featOkTst && ((Annotation_Type)jcasType).casFeat_componentId == null) jcasType.jcas.throwFeatMissing("componentId", "de.julielab.jules.types.Annotation"); return jcasType.ll_cas.ll_getStringValue(addr, ((Annotation_Type)jcasType).casFeatCode_componentId);}
[ "public", "String", "getComponentId", "(", ")", "{", "if", "(", "Annotation_Type", ".", "featOkTst", "&&", "(", "(", "Annotation_Type", ")", "jcasType", ")", ".", "casFeat_componentId", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", ...
getter for componentId - gets Indicates which NLP component has been used to derive the annotation, C @generated @return value of the feature
[ "getter", "for", "componentId", "-", "gets", "Indicates", "which", "NLP", "component", "has", "been", "used", "to", "derive", "the", "annotation", "C" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Annotation.java#L107-L110
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Annotation.java
Annotation.setComponentId
public void setComponentId(String v) { if (Annotation_Type.featOkTst && ((Annotation_Type)jcasType).casFeat_componentId == null) jcasType.jcas.throwFeatMissing("componentId", "de.julielab.jules.types.Annotation"); jcasType.ll_cas.ll_setStringValue(addr, ((Annotation_Type)jcasType).casFeatCode_componentId, v);}
java
public void setComponentId(String v) { if (Annotation_Type.featOkTst && ((Annotation_Type)jcasType).casFeat_componentId == null) jcasType.jcas.throwFeatMissing("componentId", "de.julielab.jules.types.Annotation"); jcasType.ll_cas.ll_setStringValue(addr, ((Annotation_Type)jcasType).casFeatCode_componentId, v);}
[ "public", "void", "setComponentId", "(", "String", "v", ")", "{", "if", "(", "Annotation_Type", ".", "featOkTst", "&&", "(", "(", "Annotation_Type", ")", "jcasType", ")", ".", "casFeat_componentId", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeat...
setter for componentId - sets Indicates which NLP component has been used to derive the annotation, C @generated @param v value to set into the feature
[ "setter", "for", "componentId", "-", "sets", "Indicates", "which", "NLP", "component", "has", "been", "used", "to", "derive", "the", "annotation", "C" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Annotation.java#L116-L119
train
BlueBrain/bluima
modules/bluima_banner/src/main/java/banner/tagging/DictionaryTagger.java
DictionaryTagger.add
public void add(String text, MentionType type) { MentionType previousType = entities.add(process(text), type); if (previousType != null && !previousType.equals(type)) throw new IllegalArgumentException("Text is already associated with a different tag: " + text); }
java
public void add(String text, MentionType type) { MentionType previousType = entities.add(process(text), type); if (previousType != null && !previousType.equals(type)) throw new IllegalArgumentException("Text is already associated with a different tag: " + text); }
[ "public", "void", "add", "(", "String", "text", ",", "MentionType", "type", ")", "{", "MentionType", "previousType", "=", "entities", ".", "add", "(", "process", "(", "text", ")", ",", "type", ")", ";", "if", "(", "previousType", "!=", "null", "&&", "!...
Adds a single entry to the dictionary. The text is processed by the tokenizer and the resulting tokens are stored. @param text The text to find @param type The {@link MentionType} to tag the text with
[ "Adds", "a", "single", "entry", "to", "the", "dictionary", ".", "The", "text", "is", "processed", "by", "the", "tokenizer", "and", "the", "resulting", "tokens", "are", "stored", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_banner/src/main/java/banner/tagging/DictionaryTagger.java#L75-L80
train
BlueBrain/bluima
utils/blue_commons/src/main/java/ch/epfl/bbp/triechar/TrieCnt.java
TrieCnt.toFrequencyFile
public void toFrequencyFile(String filePath) throws IOException { BufferedWriter writer = new BufferedWriter(new OutputStreamWriter( new FileOutputStream(filePath), "UTF-8")); for (TrieNodeCnt child : root.children.values()) { child.writeFrequencies(writer, new char[0]);// recursive } writer.close(); }
java
public void toFrequencyFile(String filePath) throws IOException { BufferedWriter writer = new BufferedWriter(new OutputStreamWriter( new FileOutputStream(filePath), "UTF-8")); for (TrieNodeCnt child : root.children.values()) { child.writeFrequencies(writer, new char[0]);// recursive } writer.close(); }
[ "public", "void", "toFrequencyFile", "(", "String", "filePath", ")", "throws", "IOException", "{", "BufferedWriter", "writer", "=", "new", "BufferedWriter", "(", "new", "OutputStreamWriter", "(", "new", "FileOutputStream", "(", "filePath", ")", ",", "\"UTF-8\"", "...
one entry per line. word first, then tab, then frequency
[ "one", "entry", "per", "line", ".", "word", "first", "then", "tab", "then", "frequency" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/utils/blue_commons/src/main/java/ch/epfl/bbp/triechar/TrieCnt.java#L44-L51
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/ace/EntityAttribute.java
EntityAttribute.getNames
public FSArray getNames() { if (EntityAttribute_Type.featOkTst && ((EntityAttribute_Type)jcasType).casFeat_names == null) jcasType.jcas.throwFeatMissing("names", "de.julielab.jules.types.ace.EntityAttribute"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((EntityAttribute_Type)jcasType).casFeatCode_names)));}
java
public FSArray getNames() { if (EntityAttribute_Type.featOkTst && ((EntityAttribute_Type)jcasType).casFeat_names == null) jcasType.jcas.throwFeatMissing("names", "de.julielab.jules.types.ace.EntityAttribute"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((EntityAttribute_Type)jcasType).casFeatCode_names)));}
[ "public", "FSArray", "getNames", "(", ")", "{", "if", "(", "EntityAttribute_Type", ".", "featOkTst", "&&", "(", "(", "EntityAttribute_Type", ")", "jcasType", ")", ".", "casFeat_names", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", ...
getter for names - gets @generated @return value of the feature
[ "getter", "for", "names", "-", "gets" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/ace/EntityAttribute.java#L86-L89
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/ace/EntityAttribute.java
EntityAttribute.setNames
public void setNames(FSArray v) { if (EntityAttribute_Type.featOkTst && ((EntityAttribute_Type)jcasType).casFeat_names == null) jcasType.jcas.throwFeatMissing("names", "de.julielab.jules.types.ace.EntityAttribute"); jcasType.ll_cas.ll_setRefValue(addr, ((EntityAttribute_Type)jcasType).casFeatCode_names, jcasType.ll_cas.ll_getFSRef(v));}
java
public void setNames(FSArray v) { if (EntityAttribute_Type.featOkTst && ((EntityAttribute_Type)jcasType).casFeat_names == null) jcasType.jcas.throwFeatMissing("names", "de.julielab.jules.types.ace.EntityAttribute"); jcasType.ll_cas.ll_setRefValue(addr, ((EntityAttribute_Type)jcasType).casFeatCode_names, jcasType.ll_cas.ll_getFSRef(v));}
[ "public", "void", "setNames", "(", "FSArray", "v", ")", "{", "if", "(", "EntityAttribute_Type", ".", "featOkTst", "&&", "(", "(", "EntityAttribute_Type", ")", "jcasType", ")", ".", "casFeat_names", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatM...
setter for names - sets @generated @param v value to set into the feature
[ "setter", "for", "names", "-", "sets" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/ace/EntityAttribute.java#L95-L98
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/ace/EntityAttribute.java
EntityAttribute.getNames
public Name getNames(int i) { if (EntityAttribute_Type.featOkTst && ((EntityAttribute_Type)jcasType).casFeat_names == null) jcasType.jcas.throwFeatMissing("names", "de.julielab.jules.types.ace.EntityAttribute"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((EntityAttribute_Type)jcasType).casFeatCode_names), i); return (Name)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((EntityAttribute_Type)jcasType).casFeatCode_names), i)));}
java
public Name getNames(int i) { if (EntityAttribute_Type.featOkTst && ((EntityAttribute_Type)jcasType).casFeat_names == null) jcasType.jcas.throwFeatMissing("names", "de.julielab.jules.types.ace.EntityAttribute"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((EntityAttribute_Type)jcasType).casFeatCode_names), i); return (Name)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((EntityAttribute_Type)jcasType).casFeatCode_names), i)));}
[ "public", "Name", "getNames", "(", "int", "i", ")", "{", "if", "(", "EntityAttribute_Type", ".", "featOkTst", "&&", "(", "(", "EntityAttribute_Type", ")", "jcasType", ")", ".", "casFeat_names", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissi...
indexed getter for names - gets an indexed value - @generated @param i index in the array to get @return value of the element at index i
[ "indexed", "getter", "for", "names", "-", "gets", "an", "indexed", "value", "-" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/ace/EntityAttribute.java#L105-L109
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/ace/EntityAttribute.java
EntityAttribute.setNames
public void setNames(int i, Name v) { if (EntityAttribute_Type.featOkTst && ((EntityAttribute_Type)jcasType).casFeat_names == null) jcasType.jcas.throwFeatMissing("names", "de.julielab.jules.types.ace.EntityAttribute"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((EntityAttribute_Type)jcasType).casFeatCode_names), i); jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((EntityAttribute_Type)jcasType).casFeatCode_names), i, jcasType.ll_cas.ll_getFSRef(v));}
java
public void setNames(int i, Name v) { if (EntityAttribute_Type.featOkTst && ((EntityAttribute_Type)jcasType).casFeat_names == null) jcasType.jcas.throwFeatMissing("names", "de.julielab.jules.types.ace.EntityAttribute"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((EntityAttribute_Type)jcasType).casFeatCode_names), i); jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((EntityAttribute_Type)jcasType).casFeatCode_names), i, jcasType.ll_cas.ll_getFSRef(v));}
[ "public", "void", "setNames", "(", "int", "i", ",", "Name", "v", ")", "{", "if", "(", "EntityAttribute_Type", ".", "featOkTst", "&&", "(", "(", "EntityAttribute_Type", ")", "jcasType", ")", ".", "casFeat_names", "==", "null", ")", "jcasType", ".", "jcas", ...
indexed setter for names - sets an indexed value - @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "names", "-", "sets", "an", "indexed", "value", "-" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/ace/EntityAttribute.java#L116-L120
train
BlueBrain/bluima
modules/bluima_pdf/src/main/java/edu/psu/seersuite/extractors/tableextractor/extraction/TableExtractor.java
TableExtractor.judgeHTMLCode
private boolean judgeHTMLCode(ArrayList<ArrayList<TextPiece>> wordsByPage) { ArrayList<TextPiece> wordsOfPageOne = wordsByPage.get(0); boolean isHTMLCode = true; int i = 0; /* * do not have to check all words, Checking 10 words is enough */ while (i < Math.min(20, wordsOfPageOne.size())) { TextPiece currentWord = wordsOfPageOne.get(i); String thisText = currentWord.getText(); if ((thisText.length() % 2 != 0) && (thisText.matches("([A-Z]([A-Z]|[0-9]))*") == false)) { isHTMLCode = false; break; } i++; } // if (isHTMLCode) // System.out.println("This document is coded in HTML code!"); return isHTMLCode; }
java
private boolean judgeHTMLCode(ArrayList<ArrayList<TextPiece>> wordsByPage) { ArrayList<TextPiece> wordsOfPageOne = wordsByPage.get(0); boolean isHTMLCode = true; int i = 0; /* * do not have to check all words, Checking 10 words is enough */ while (i < Math.min(20, wordsOfPageOne.size())) { TextPiece currentWord = wordsOfPageOne.get(i); String thisText = currentWord.getText(); if ((thisText.length() % 2 != 0) && (thisText.matches("([A-Z]([A-Z]|[0-9]))*") == false)) { isHTMLCode = false; break; } i++; } // if (isHTMLCode) // System.out.println("This document is coded in HTML code!"); return isHTMLCode; }
[ "private", "boolean", "judgeHTMLCode", "(", "ArrayList", "<", "ArrayList", "<", "TextPiece", ">", ">", "wordsByPage", ")", "{", "ArrayList", "<", "TextPiece", ">", "wordsOfPageOne", "=", "wordsByPage", ".", "get", "(", "0", ")", ";", "boolean", "isHTMLCode", ...
Detects documents encoded in HTML code @param wordsByPage the extracted texts in the word level in a document @return A boolean value: true/false
[ "Detects", "documents", "encoded", "in", "HTML", "code" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_pdf/src/main/java/edu/psu/seersuite/extractors/tableextractor/extraction/TableExtractor.java#L413-L433
train
BlueBrain/bluima
modules/bluima_pdf/src/main/java/edu/psu/seersuite/extractors/tableextractor/extraction/TableExtractor.java
TableExtractor.extractFiguresFromAPage
private void extractFiguresFromAPage(ArrayList<TextPiece> linesOfAPage, ArrayList<TextPiece> wordsOfAPage, int i, File pdfFile, ArrayList<ArrayList<TextPiece>> linesByPage) { if (linesOfAPage.size() > 30) { // if this page is very short, it // usually does not contain tables /* * Checks for table keyword */ boolean figureKwdExist = false; int prevTableEndIndex = 0; int k = -1; for (TextPiece t : linesOfAPage) { k++; String textWithoutSpace = t.getText().replace(" ", ""); TextPiece prevLine = (k == 0) ? null : linesOfAPage.get(k - 1); if (getMatchedFigureKeyword(textWithoutSpace) != null) { figureKwdExist = true; String figKwd = getMatchedFigureKeyword(textWithoutSpace); System.out.println("In page " + (i + 1) + ": " + textWithoutSpace); } } } else { /* * Impossible to contain tables because of few texts in the page */ } }
java
private void extractFiguresFromAPage(ArrayList<TextPiece> linesOfAPage, ArrayList<TextPiece> wordsOfAPage, int i, File pdfFile, ArrayList<ArrayList<TextPiece>> linesByPage) { if (linesOfAPage.size() > 30) { // if this page is very short, it // usually does not contain tables /* * Checks for table keyword */ boolean figureKwdExist = false; int prevTableEndIndex = 0; int k = -1; for (TextPiece t : linesOfAPage) { k++; String textWithoutSpace = t.getText().replace(" ", ""); TextPiece prevLine = (k == 0) ? null : linesOfAPage.get(k - 1); if (getMatchedFigureKeyword(textWithoutSpace) != null) { figureKwdExist = true; String figKwd = getMatchedFigureKeyword(textWithoutSpace); System.out.println("In page " + (i + 1) + ": " + textWithoutSpace); } } } else { /* * Impossible to contain tables because of few texts in the page */ } }
[ "private", "void", "extractFiguresFromAPage", "(", "ArrayList", "<", "TextPiece", ">", "linesOfAPage", ",", "ArrayList", "<", "TextPiece", ">", "wordsOfAPage", ",", "int", "i", ",", "File", "pdfFile", ",", "ArrayList", "<", "ArrayList", "<", "TextPiece", ">", ...
Extracts figures from ONE page @param linesOfAPage the list of lines of one page @param wordsOfAPage the list of words of one page @param i the current page id @param linesByPage the list of lines of the document
[ "Extracts", "figures", "from", "ONE", "page" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_pdf/src/main/java/edu/psu/seersuite/extractors/tableextractor/extraction/TableExtractor.java#L921-L948
train
BlueBrain/bluima
modules/bluima_pdf/src/main/java/edu/psu/seersuite/extractors/tableextractor/extraction/TableExtractor.java
TableExtractor.extractOneTable
private int extractOneTable(int lineNumber, ArrayList<TextPiece> linesOfAPage, String keyword, TableCandidate tc, ArrayList<TextPiece> wordsOfAPage, int i, int prevTableEndIndex, ArrayList<ArrayList<TextPiece>> linesByPage) { TextPiece line = linesOfAPage.get(lineNumber); if (line.getX() < 0 && line.getWidth() == 0.0) { System.out .println("\n This is a reversed table, currently we do not support such tables!"); lineNumber++; tc.setValid(false); } else { lineNumber = findCaptionBoundary(lineNumber, linesOfAPage, tc); if (tc.isValid()) { tc.setPageId_thisTable(i); // getReferenceTableTexts(tc, linesByPage); isWideTable(tc); Vector distinctY = new Vector(); Vector piecesEachY = new Vector(); distinctY = getDistinctSortedY(distinctY, piecesEachY, wordsOfAPage, tc); boolean aboveCaption = judgeCaptionLocation(linesOfAPage, tc, distinctY, wordsOfAPage); lineNumber = findBodyBoundary(lineNumber, linesOfAPage, tc, aboveCaption, prevTableEndIndex); getReferenceTableTexts(tc, linesByPage); // System.out.println(tc.getRefText()); } tc.setHighLevelMeta(i); if (tc.isValid()) { organizeCells(linesOfAPage, tc); } if (tc.isValid()) { findFootnoteBeginRow(tc); } if (tc.isValid()) { determineFootnoteHeading(tc); getColumnBoundaryWithoutHeading(tc); } int cc = tc.getColumnNum_thisTable(); if (cc > 20) { tc.setValid(false); } else { // if((cc>=2) && (tc.getMaxColumnNumber()<cc*2) ) { //if we // treat each line as the possible table beginning without // considering the table keyword, we need use this if (cc >= 2) { getTableStructure(cc, tc, wordsOfAPage); // if (tc.isValid()) parameters.tableNum++; } else { tc.setEmptyMetadataStructureLevel(tc.getRows().size(), cc, wordsOfAPage, m_docInfo); } } } return lineNumber; }
java
private int extractOneTable(int lineNumber, ArrayList<TextPiece> linesOfAPage, String keyword, TableCandidate tc, ArrayList<TextPiece> wordsOfAPage, int i, int prevTableEndIndex, ArrayList<ArrayList<TextPiece>> linesByPage) { TextPiece line = linesOfAPage.get(lineNumber); if (line.getX() < 0 && line.getWidth() == 0.0) { System.out .println("\n This is a reversed table, currently we do not support such tables!"); lineNumber++; tc.setValid(false); } else { lineNumber = findCaptionBoundary(lineNumber, linesOfAPage, tc); if (tc.isValid()) { tc.setPageId_thisTable(i); // getReferenceTableTexts(tc, linesByPage); isWideTable(tc); Vector distinctY = new Vector(); Vector piecesEachY = new Vector(); distinctY = getDistinctSortedY(distinctY, piecesEachY, wordsOfAPage, tc); boolean aboveCaption = judgeCaptionLocation(linesOfAPage, tc, distinctY, wordsOfAPage); lineNumber = findBodyBoundary(lineNumber, linesOfAPage, tc, aboveCaption, prevTableEndIndex); getReferenceTableTexts(tc, linesByPage); // System.out.println(tc.getRefText()); } tc.setHighLevelMeta(i); if (tc.isValid()) { organizeCells(linesOfAPage, tc); } if (tc.isValid()) { findFootnoteBeginRow(tc); } if (tc.isValid()) { determineFootnoteHeading(tc); getColumnBoundaryWithoutHeading(tc); } int cc = tc.getColumnNum_thisTable(); if (cc > 20) { tc.setValid(false); } else { // if((cc>=2) && (tc.getMaxColumnNumber()<cc*2) ) { //if we // treat each line as the possible table beginning without // considering the table keyword, we need use this if (cc >= 2) { getTableStructure(cc, tc, wordsOfAPage); // if (tc.isValid()) parameters.tableNum++; } else { tc.setEmptyMetadataStructureLevel(tc.getRows().size(), cc, wordsOfAPage, m_docInfo); } } } return lineNumber; }
[ "private", "int", "extractOneTable", "(", "int", "lineNumber", ",", "ArrayList", "<", "TextPiece", ">", "linesOfAPage", ",", "String", "keyword", ",", "TableCandidate", "tc", ",", "ArrayList", "<", "TextPiece", ">", "wordsOfAPage", ",", "int", "i", ",", "int",...
Extracts a table if detecting a potential table caption @param linesOfAPage the list of lines of one page @param tc the object of the table candidates @param wordsOfAPage the list of words of one page @param i the current page id @param prevTableEndIndex the line id of the ending place of the previous table @param linesByPage the list of lines of the document page @return next line number after caption area
[ "Extracts", "a", "table", "if", "detecting", "a", "potential", "table", "caption" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_pdf/src/main/java/edu/psu/seersuite/extractors/tableextractor/extraction/TableExtractor.java#L967-L1028
train
BlueBrain/bluima
modules/bluima_pdf/src/main/java/edu/psu/seersuite/extractors/tableextractor/extraction/TableExtractor.java
TableExtractor.isWideTable
private void isWideTable(TableCandidate tc) { float docWidth = m_docInfo.getMaxX() - m_docInfo.getMinX(); if ((((tc.getCaptionX() > ((docWidth - 30) / (float) 4.0) + m_docInfo.getMinX())) && (tc.getCaptionX() < docWidth / 2.5)) || (tc.getCaptonEndX() - tc.getCaptionX() > docWidth / (float) 1.85)) { tc.setWideTable(true); // System.out.println(); // System.out.println("This is a wide table? " + tc.isWideTable()); } else { // System.out.println(); // System.out.println("This is a single-doc-column table!"); } }
java
private void isWideTable(TableCandidate tc) { float docWidth = m_docInfo.getMaxX() - m_docInfo.getMinX(); if ((((tc.getCaptionX() > ((docWidth - 30) / (float) 4.0) + m_docInfo.getMinX())) && (tc.getCaptionX() < docWidth / 2.5)) || (tc.getCaptonEndX() - tc.getCaptionX() > docWidth / (float) 1.85)) { tc.setWideTable(true); // System.out.println(); // System.out.println("This is a wide table? " + tc.isWideTable()); } else { // System.out.println(); // System.out.println("This is a single-doc-column table!"); } }
[ "private", "void", "isWideTable", "(", "TableCandidate", "tc", ")", "{", "float", "docWidth", "=", "m_docInfo", ".", "getMaxX", "(", ")", "-", "m_docInfo", ".", "getMinX", "(", ")", ";", "if", "(", "(", "(", "(", "tc", ".", "getCaptionX", "(", ")", "...
Judges whether a table is a wide table or not by considering the width of the table @param tc the object of the table candidates
[ "Judges", "whether", "a", "table", "is", "a", "wide", "table", "or", "not", "by", "considering", "the", "width", "of", "the", "table" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_pdf/src/main/java/edu/psu/seersuite/extractors/tableextractor/extraction/TableExtractor.java#L1037-L1050
train
BlueBrain/bluima
modules/bluima_pdf/src/main/java/edu/psu/seersuite/extractors/tableextractor/extraction/TableExtractor.java
TableExtractor.organizeCells
private void organizeCells(ArrayList<TextPiece> linesOfAPage, TableCandidate tc) { float captionY = linesOfAPage.get(tc.getCaptionStartLine()).getY(); float captionEndY = linesOfAPage.get(tc.getCaptionEndLine()).getEndY(); ArrayList<TextPiece> rawCells = new ArrayList<TextPiece>(); /* * Copy & sort */ for (int i = tc.getBodyStartLine(); i <= tc.getBodyEndLine(); i++) { rawCells.add(linesOfAPage.get(i)); } Collections.sort(rawCells); assert rawCells.size() >= 4; // due to previous check TableRow currentRow = null; // creates first row for (TextPiece cell : rawCells) { /* * Skips lines beyond caption //TODO: remove the far Y */ if (tc.isTopCaption() && (cell.getY() < captionY)) continue; if (!tc.isTopCaption() && (cell.getEndY() > captionEndY)) continue; /* * Lines too close to each other are treated as a single line */ if (currentRow != null && cell.getY() - currentRow.getY() < m_docInfo .getAverageLineGap() / 2.0) currentRow.addCell(cell); else { /* * Creates a new row */ currentRow = new TableRow(); currentRow.setY(cell.getY()); if (cell.isSuperScriptBeginning()) currentRow.setSuperScriptRow(true); currentRow.addCell(cell); tc.addRow(currentRow); } } if (tc.getRows().size() < 2) tc.setValid(false); }
java
private void organizeCells(ArrayList<TextPiece> linesOfAPage, TableCandidate tc) { float captionY = linesOfAPage.get(tc.getCaptionStartLine()).getY(); float captionEndY = linesOfAPage.get(tc.getCaptionEndLine()).getEndY(); ArrayList<TextPiece> rawCells = new ArrayList<TextPiece>(); /* * Copy & sort */ for (int i = tc.getBodyStartLine(); i <= tc.getBodyEndLine(); i++) { rawCells.add(linesOfAPage.get(i)); } Collections.sort(rawCells); assert rawCells.size() >= 4; // due to previous check TableRow currentRow = null; // creates first row for (TextPiece cell : rawCells) { /* * Skips lines beyond caption //TODO: remove the far Y */ if (tc.isTopCaption() && (cell.getY() < captionY)) continue; if (!tc.isTopCaption() && (cell.getEndY() > captionEndY)) continue; /* * Lines too close to each other are treated as a single line */ if (currentRow != null && cell.getY() - currentRow.getY() < m_docInfo .getAverageLineGap() / 2.0) currentRow.addCell(cell); else { /* * Creates a new row */ currentRow = new TableRow(); currentRow.setY(cell.getY()); if (cell.isSuperScriptBeginning()) currentRow.setSuperScriptRow(true); currentRow.addCell(cell); tc.addRow(currentRow); } } if (tc.getRows().size() < 2) tc.setValid(false); }
[ "private", "void", "organizeCells", "(", "ArrayList", "<", "TextPiece", ">", "linesOfAPage", ",", "TableCandidate", "tc", ")", "{", "float", "captionY", "=", "linesOfAPage", ".", "get", "(", "tc", ".", "getCaptionStartLine", "(", ")", ")", ".", "getY", "(", ...
Organizes cells into rows based on the coordinate information @param linesOfAPage the list of lines of this document page @param tc the object of the table candidate
[ "Organizes", "cells", "into", "rows", "based", "on", "the", "coordinate", "information" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_pdf/src/main/java/edu/psu/seersuite/extractors/tableextractor/extraction/TableExtractor.java#L1636-L1682
train
BlueBrain/bluima
modules/bluima_pdf/src/main/java/edu/psu/seersuite/extractors/tableextractor/extraction/TableExtractor.java
TableExtractor.getRowHeadingBasedOnCells
public void getRowHeadingBasedOnCells(TableCandidate tc) { String rowHeadingThisTable = ""; int footnoteLineIndex = tc.getFootnoteBeginRow(); String[][] cells = tc.getCells(); // if (cells[0][0].length()==0 ) { for (int j = 0; j < footnoteLineIndex; j++) { if (cells[j][0].length() > 0) rowHeadingThisTable = rowHeadingThisTable + cells[j][0] + "; "; } // } rowHeadingThisTable = tc .replaceAllSpecialChracters(rowHeadingThisTable); tc.setHeadingRows(rowHeadingThisTable); }
java
public void getRowHeadingBasedOnCells(TableCandidate tc) { String rowHeadingThisTable = ""; int footnoteLineIndex = tc.getFootnoteBeginRow(); String[][] cells = tc.getCells(); // if (cells[0][0].length()==0 ) { for (int j = 0; j < footnoteLineIndex; j++) { if (cells[j][0].length() > 0) rowHeadingThisTable = rowHeadingThisTable + cells[j][0] + "; "; } // } rowHeadingThisTable = tc .replaceAllSpecialChracters(rowHeadingThisTable); tc.setHeadingRows(rowHeadingThisTable); }
[ "public", "void", "getRowHeadingBasedOnCells", "(", "TableCandidate", "tc", ")", "{", "String", "rowHeadingThisTable", "=", "\"\"", ";", "int", "footnoteLineIndex", "=", "tc", ".", "getFootnoteBeginRow", "(", ")", ";", "String", "[", "]", "[", "]", "cells", "=...
Get the table row headings based on the cell information @param tc the object of the table candidate
[ "Get", "the", "table", "row", "headings", "based", "on", "the", "cell", "information" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_pdf/src/main/java/edu/psu/seersuite/extractors/tableextractor/extraction/TableExtractor.java#L2237-L2250
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Dependency.java
Dependency.getDeptype
public String getDeptype() { if (Dependency_Type.featOkTst && ((Dependency_Type)jcasType).casFeat_deptype == null) jcasType.jcas.throwFeatMissing("deptype", "com.digitalpebble.rasp.Dependency"); return jcasType.ll_cas.ll_getStringValue(addr, ((Dependency_Type)jcasType).casFeatCode_deptype);}
java
public String getDeptype() { if (Dependency_Type.featOkTst && ((Dependency_Type)jcasType).casFeat_deptype == null) jcasType.jcas.throwFeatMissing("deptype", "com.digitalpebble.rasp.Dependency"); return jcasType.ll_cas.ll_getStringValue(addr, ((Dependency_Type)jcasType).casFeatCode_deptype);}
[ "public", "String", "getDeptype", "(", ")", "{", "if", "(", "Dependency_Type", ".", "featOkTst", "&&", "(", "(", "Dependency_Type", ")", "jcasType", ")", ".", "casFeat_deptype", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"dep...
getter for deptype - gets @generated @return value of the feature
[ "getter", "for", "deptype", "-", "gets" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Dependency.java#L86-L89
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Dependency.java
Dependency.setDeptype
public void setDeptype(String v) { if (Dependency_Type.featOkTst && ((Dependency_Type)jcasType).casFeat_deptype == null) jcasType.jcas.throwFeatMissing("deptype", "com.digitalpebble.rasp.Dependency"); jcasType.ll_cas.ll_setStringValue(addr, ((Dependency_Type)jcasType).casFeatCode_deptype, v);}
java
public void setDeptype(String v) { if (Dependency_Type.featOkTst && ((Dependency_Type)jcasType).casFeat_deptype == null) jcasType.jcas.throwFeatMissing("deptype", "com.digitalpebble.rasp.Dependency"); jcasType.ll_cas.ll_setStringValue(addr, ((Dependency_Type)jcasType).casFeatCode_deptype, v);}
[ "public", "void", "setDeptype", "(", "String", "v", ")", "{", "if", "(", "Dependency_Type", ".", "featOkTst", "&&", "(", "(", "Dependency_Type", ")", "jcasType", ")", ".", "casFeat_deptype", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing"...
setter for deptype - sets @generated @param v value to set into the feature
[ "setter", "for", "deptype", "-", "sets" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Dependency.java#L95-L98
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Dependency.java
Dependency.getSubtype
public String getSubtype() { if (Dependency_Type.featOkTst && ((Dependency_Type)jcasType).casFeat_subtype == null) jcasType.jcas.throwFeatMissing("subtype", "com.digitalpebble.rasp.Dependency"); return jcasType.ll_cas.ll_getStringValue(addr, ((Dependency_Type)jcasType).casFeatCode_subtype);}
java
public String getSubtype() { if (Dependency_Type.featOkTst && ((Dependency_Type)jcasType).casFeat_subtype == null) jcasType.jcas.throwFeatMissing("subtype", "com.digitalpebble.rasp.Dependency"); return jcasType.ll_cas.ll_getStringValue(addr, ((Dependency_Type)jcasType).casFeatCode_subtype);}
[ "public", "String", "getSubtype", "(", ")", "{", "if", "(", "Dependency_Type", ".", "featOkTst", "&&", "(", "(", "Dependency_Type", ")", "jcasType", ")", ".", "casFeat_subtype", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"sub...
getter for subtype - gets @generated @return value of the feature
[ "getter", "for", "subtype", "-", "gets" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Dependency.java#L108-L111
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Dependency.java
Dependency.setSubtype
public void setSubtype(String v) { if (Dependency_Type.featOkTst && ((Dependency_Type)jcasType).casFeat_subtype == null) jcasType.jcas.throwFeatMissing("subtype", "com.digitalpebble.rasp.Dependency"); jcasType.ll_cas.ll_setStringValue(addr, ((Dependency_Type)jcasType).casFeatCode_subtype, v);}
java
public void setSubtype(String v) { if (Dependency_Type.featOkTst && ((Dependency_Type)jcasType).casFeat_subtype == null) jcasType.jcas.throwFeatMissing("subtype", "com.digitalpebble.rasp.Dependency"); jcasType.ll_cas.ll_setStringValue(addr, ((Dependency_Type)jcasType).casFeatCode_subtype, v);}
[ "public", "void", "setSubtype", "(", "String", "v", ")", "{", "if", "(", "Dependency_Type", ".", "featOkTst", "&&", "(", "(", "Dependency_Type", ")", "jcasType", ")", ".", "casFeat_subtype", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing"...
setter for subtype - sets @generated @param v value to set into the feature
[ "setter", "for", "subtype", "-", "sets" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Dependency.java#L117-L120
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Dependency.java
Dependency.getDep
public WordForm getDep() { if (Dependency_Type.featOkTst && ((Dependency_Type)jcasType).casFeat_dep == null) jcasType.jcas.throwFeatMissing("dep", "com.digitalpebble.rasp.Dependency"); return (WordForm)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Dependency_Type)jcasType).casFeatCode_dep)));}
java
public WordForm getDep() { if (Dependency_Type.featOkTst && ((Dependency_Type)jcasType).casFeat_dep == null) jcasType.jcas.throwFeatMissing("dep", "com.digitalpebble.rasp.Dependency"); return (WordForm)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Dependency_Type)jcasType).casFeatCode_dep)));}
[ "public", "WordForm", "getDep", "(", ")", "{", "if", "(", "Dependency_Type", ".", "featOkTst", "&&", "(", "(", "Dependency_Type", ")", "jcasType", ")", ".", "casFeat_dep", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"dep\"", ...
getter for dep - gets @generated @return value of the feature
[ "getter", "for", "dep", "-", "gets" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Dependency.java#L152-L155
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Dependency.java
Dependency.setDep
public void setDep(WordForm v) { if (Dependency_Type.featOkTst && ((Dependency_Type)jcasType).casFeat_dep == null) jcasType.jcas.throwFeatMissing("dep", "com.digitalpebble.rasp.Dependency"); jcasType.ll_cas.ll_setRefValue(addr, ((Dependency_Type)jcasType).casFeatCode_dep, jcasType.ll_cas.ll_getFSRef(v));}
java
public void setDep(WordForm v) { if (Dependency_Type.featOkTst && ((Dependency_Type)jcasType).casFeat_dep == null) jcasType.jcas.throwFeatMissing("dep", "com.digitalpebble.rasp.Dependency"); jcasType.ll_cas.ll_setRefValue(addr, ((Dependency_Type)jcasType).casFeatCode_dep, jcasType.ll_cas.ll_getFSRef(v));}
[ "public", "void", "setDep", "(", "WordForm", "v", ")", "{", "if", "(", "Dependency_Type", ".", "featOkTst", "&&", "(", "(", "Dependency_Type", ")", "jcasType", ")", ".", "casFeat_dep", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(...
setter for dep - sets @generated @param v value to set into the feature
[ "setter", "for", "dep", "-", "sets" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Dependency.java#L161-L164
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Lemma.java
Lemma.setValue
public void setValue(String v) { if (Lemma_Type.featOkTst && ((Lemma_Type)jcasType).casFeat_value == null) jcasType.jcas.throwFeatMissing("value", "de.julielab.jules.types.Lemma"); jcasType.ll_cas.ll_setStringValue(addr, ((Lemma_Type)jcasType).casFeatCode_value, v);}
java
public void setValue(String v) { if (Lemma_Type.featOkTst && ((Lemma_Type)jcasType).casFeat_value == null) jcasType.jcas.throwFeatMissing("value", "de.julielab.jules.types.Lemma"); jcasType.ll_cas.ll_setStringValue(addr, ((Lemma_Type)jcasType).casFeatCode_value, v);}
[ "public", "void", "setValue", "(", "String", "v", ")", "{", "if", "(", "Lemma_Type", ".", "featOkTst", "&&", "(", "(", "Lemma_Type", ")", "jcasType", ")", ".", "casFeat_value", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"...
setter for value - sets The value of lemma,C @generated @param v value to set into the feature
[ "setter", "for", "value", "-", "sets", "The", "value", "of", "lemma", "C" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Lemma.java#L94-L97
train
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/abbvGapsHmm/AbbvGapsHMM.java
AbbvGapsHMM.trainCorpus
protected boolean trainCorpus(List<List<Acronym>> corpus, List<Map<String, String>> trueLabels){ boolean converge = false; // Unsupervised trueLabels = null; initModelParamsAndCounters(); int n = corpus.size(); int c = 1; Double change; LOG.debug("Training abbreviations..."); while(!converge){ for (int i = 0; i < n; i++) { List<Acronym> docAcronyms = corpus.get(i); Map<String, String> docTrueLabels = null; if(trueLabels != null) docTrueLabels = trueLabels.get(i); int m = docAcronyms.size(); for (int j = 0; j < m; j++) { Acronym currAcronym = docAcronyms.get(j); if(trueLabels != null) expectationStep(currAcronym, docTrueLabels.get(currAcronym._shortForm)); else expectationStep(currAcronym, null); } } change = maximizationStep(); LOG.debug("step {}...",c); c++; if(c > MAX_ITERATIONS){ System.out.println("\n\tTraining stopped after "+(c-1)+" iterations with final change: "+change); converge = true; } if(change.compareTo(CHANGE_THRESHOLD) < 0){ LOG.debug("Training converged in "+(c-1)+" iterations."); converge = true; } } saveModelParams(); return true; }
java
protected boolean trainCorpus(List<List<Acronym>> corpus, List<Map<String, String>> trueLabels){ boolean converge = false; // Unsupervised trueLabels = null; initModelParamsAndCounters(); int n = corpus.size(); int c = 1; Double change; LOG.debug("Training abbreviations..."); while(!converge){ for (int i = 0; i < n; i++) { List<Acronym> docAcronyms = corpus.get(i); Map<String, String> docTrueLabels = null; if(trueLabels != null) docTrueLabels = trueLabels.get(i); int m = docAcronyms.size(); for (int j = 0; j < m; j++) { Acronym currAcronym = docAcronyms.get(j); if(trueLabels != null) expectationStep(currAcronym, docTrueLabels.get(currAcronym._shortForm)); else expectationStep(currAcronym, null); } } change = maximizationStep(); LOG.debug("step {}...",c); c++; if(c > MAX_ITERATIONS){ System.out.println("\n\tTraining stopped after "+(c-1)+" iterations with final change: "+change); converge = true; } if(change.compareTo(CHANGE_THRESHOLD) < 0){ LOG.debug("Training converged in "+(c-1)+" iterations."); converge = true; } } saveModelParams(); return true; }
[ "protected", "boolean", "trainCorpus", "(", "List", "<", "List", "<", "Acronym", ">", ">", "corpus", ",", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "trueLabels", ")", "{", "boolean", "converge", "=", "false", ";", "// Unsupervised\r", "...
Gets training examples separated by documents
[ "Gets", "training", "examples", "separated", "by", "documents" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/abbvGapsHmm/AbbvGapsHMM.java#L262-L308
train
BlueBrain/bluima
modules/bluima_pdf/src/main/java/ch/epfl/bbp/uima/pdf/cleanup/LigaturesRemover.java
LigaturesRemover.remove
public String remove(String txt) { for (Pattern p : patterns.keySet()) { System.out.println("p: "+p); System.out.println("b: "+txt); txt = p.matcher(txt).replaceAll(patterns.get(p)); System.out.println("a: "+txt); } return txt; }
java
public String remove(String txt) { for (Pattern p : patterns.keySet()) { System.out.println("p: "+p); System.out.println("b: "+txt); txt = p.matcher(txt).replaceAll(patterns.get(p)); System.out.println("a: "+txt); } return txt; }
[ "public", "String", "remove", "(", "String", "txt", ")", "{", "for", "(", "Pattern", "p", ":", "patterns", ".", "keySet", "(", ")", ")", "{", "System", ".", "out", ".", "println", "(", "\"p: \"", "+", "p", ")", ";", "System", ".", "out", ".", "pr...
Takes a string and returns it without ligatures in it @param txt line that is processed @return cleaned line
[ "Takes", "a", "string", "and", "returns", "it", "without", "ligatures", "in", "it" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_pdf/src/main/java/ch/epfl/bbp/uima/pdf/cleanup/LigaturesRemover.java#L45-L53
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/DiscontinuousAnnotation.java
DiscontinuousAnnotation.getValue
public FSArray getValue() { if (DiscontinuousAnnotation_Type.featOkTst && ((DiscontinuousAnnotation_Type)jcasType).casFeat_value == null) jcasType.jcas.throwFeatMissing("value", "de.julielab.jules.types.DiscontinuousAnnotation"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((DiscontinuousAnnotation_Type)jcasType).casFeatCode_value)));}
java
public FSArray getValue() { if (DiscontinuousAnnotation_Type.featOkTst && ((DiscontinuousAnnotation_Type)jcasType).casFeat_value == null) jcasType.jcas.throwFeatMissing("value", "de.julielab.jules.types.DiscontinuousAnnotation"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((DiscontinuousAnnotation_Type)jcasType).casFeatCode_value)));}
[ "public", "FSArray", "getValue", "(", ")", "{", "if", "(", "DiscontinuousAnnotation_Type", ".", "featOkTst", "&&", "(", "(", "DiscontinuousAnnotation_Type", ")", "jcasType", ")", ".", "casFeat_value", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMi...
getter for value - gets Annotations to be chained. @generated @return value of the feature
[ "getter", "for", "value", "-", "gets", "Annotations", "to", "be", "chained", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/DiscontinuousAnnotation.java#L86-L89
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/DiscontinuousAnnotation.java
DiscontinuousAnnotation.setValue
public void setValue(FSArray v) { if (DiscontinuousAnnotation_Type.featOkTst && ((DiscontinuousAnnotation_Type)jcasType).casFeat_value == null) jcasType.jcas.throwFeatMissing("value", "de.julielab.jules.types.DiscontinuousAnnotation"); jcasType.ll_cas.ll_setRefValue(addr, ((DiscontinuousAnnotation_Type)jcasType).casFeatCode_value, jcasType.ll_cas.ll_getFSRef(v));}
java
public void setValue(FSArray v) { if (DiscontinuousAnnotation_Type.featOkTst && ((DiscontinuousAnnotation_Type)jcasType).casFeat_value == null) jcasType.jcas.throwFeatMissing("value", "de.julielab.jules.types.DiscontinuousAnnotation"); jcasType.ll_cas.ll_setRefValue(addr, ((DiscontinuousAnnotation_Type)jcasType).casFeatCode_value, jcasType.ll_cas.ll_getFSRef(v));}
[ "public", "void", "setValue", "(", "FSArray", "v", ")", "{", "if", "(", "DiscontinuousAnnotation_Type", ".", "featOkTst", "&&", "(", "(", "DiscontinuousAnnotation_Type", ")", "jcasType", ")", ".", "casFeat_value", "==", "null", ")", "jcasType", ".", "jcas", "....
setter for value - sets Annotations to be chained. @generated @param v value to set into the feature
[ "setter", "for", "value", "-", "sets", "Annotations", "to", "be", "chained", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/DiscontinuousAnnotation.java#L95-L98
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/DiscontinuousAnnotation.java
DiscontinuousAnnotation.getValue
public Annotation getValue(int i) { if (DiscontinuousAnnotation_Type.featOkTst && ((DiscontinuousAnnotation_Type)jcasType).casFeat_value == null) jcasType.jcas.throwFeatMissing("value", "de.julielab.jules.types.DiscontinuousAnnotation"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((DiscontinuousAnnotation_Type)jcasType).casFeatCode_value), i); return (Annotation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((DiscontinuousAnnotation_Type)jcasType).casFeatCode_value), i)));}
java
public Annotation getValue(int i) { if (DiscontinuousAnnotation_Type.featOkTst && ((DiscontinuousAnnotation_Type)jcasType).casFeat_value == null) jcasType.jcas.throwFeatMissing("value", "de.julielab.jules.types.DiscontinuousAnnotation"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((DiscontinuousAnnotation_Type)jcasType).casFeatCode_value), i); return (Annotation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((DiscontinuousAnnotation_Type)jcasType).casFeatCode_value), i)));}
[ "public", "Annotation", "getValue", "(", "int", "i", ")", "{", "if", "(", "DiscontinuousAnnotation_Type", ".", "featOkTst", "&&", "(", "(", "DiscontinuousAnnotation_Type", ")", "jcasType", ")", ".", "casFeat_value", "==", "null", ")", "jcasType", ".", "jcas", ...
indexed getter for value - gets an indexed value - Annotations to be chained. @generated @param i index in the array to get @return value of the element at index i
[ "indexed", "getter", "for", "value", "-", "gets", "an", "indexed", "value", "-", "Annotations", "to", "be", "chained", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/DiscontinuousAnnotation.java#L105-L109
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/DiscontinuousAnnotation.java
DiscontinuousAnnotation.setValue
public void setValue(int i, Annotation v) { if (DiscontinuousAnnotation_Type.featOkTst && ((DiscontinuousAnnotation_Type)jcasType).casFeat_value == null) jcasType.jcas.throwFeatMissing("value", "de.julielab.jules.types.DiscontinuousAnnotation"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((DiscontinuousAnnotation_Type)jcasType).casFeatCode_value), i); jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((DiscontinuousAnnotation_Type)jcasType).casFeatCode_value), i, jcasType.ll_cas.ll_getFSRef(v));}
java
public void setValue(int i, Annotation v) { if (DiscontinuousAnnotation_Type.featOkTst && ((DiscontinuousAnnotation_Type)jcasType).casFeat_value == null) jcasType.jcas.throwFeatMissing("value", "de.julielab.jules.types.DiscontinuousAnnotation"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((DiscontinuousAnnotation_Type)jcasType).casFeatCode_value), i); jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((DiscontinuousAnnotation_Type)jcasType).casFeatCode_value), i, jcasType.ll_cas.ll_getFSRef(v));}
[ "public", "void", "setValue", "(", "int", "i", ",", "Annotation", "v", ")", "{", "if", "(", "DiscontinuousAnnotation_Type", ".", "featOkTst", "&&", "(", "(", "DiscontinuousAnnotation_Type", ")", "jcasType", ")", ".", "casFeat_value", "==", "null", ")", "jcasTy...
indexed setter for value - sets an indexed value - Annotations to be chained. @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "value", "-", "sets", "an", "indexed", "value", "-", "Annotations", "to", "be", "chained", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/DiscontinuousAnnotation.java#L116-L120
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/org/apache/uima/examples/SourceDocumentInformation.java
SourceDocumentInformation.getDocumentSize
public int getDocumentSize() { if (SourceDocumentInformation_Type.featOkTst && ((SourceDocumentInformation_Type)jcasType).casFeat_documentSize == null) jcasType.jcas.throwFeatMissing("documentSize", "org.apache.uima.examples.SourceDocumentInformation"); return jcasType.ll_cas.ll_getIntValue(addr, ((SourceDocumentInformation_Type)jcasType).casFeatCode_documentSize);}
java
public int getDocumentSize() { if (SourceDocumentInformation_Type.featOkTst && ((SourceDocumentInformation_Type)jcasType).casFeat_documentSize == null) jcasType.jcas.throwFeatMissing("documentSize", "org.apache.uima.examples.SourceDocumentInformation"); return jcasType.ll_cas.ll_getIntValue(addr, ((SourceDocumentInformation_Type)jcasType).casFeatCode_documentSize);}
[ "public", "int", "getDocumentSize", "(", ")", "{", "if", "(", "SourceDocumentInformation_Type", ".", "featOkTst", "&&", "(", "(", "SourceDocumentInformation_Type", ")", "jcasType", ")", ".", "casFeat_documentSize", "==", "null", ")", "jcasType", ".", "jcas", ".", ...
getter for documentSize - gets Size of original document in bytes before processing by CAS Initializer. Either absolute file size of size within file or other source. @generated
[ "getter", "for", "documentSize", "-", "gets", "Size", "of", "original", "document", "in", "bytes", "before", "processing", "by", "CAS", "Initializer", ".", "Either", "absolute", "file", "size", "of", "size", "within", "file", "or", "other", "source", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/org/apache/uima/examples/SourceDocumentInformation.java#L106-L109
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/org/apache/uima/examples/SourceDocumentInformation.java
SourceDocumentInformation.setDocumentSize
public void setDocumentSize(int v) { if (SourceDocumentInformation_Type.featOkTst && ((SourceDocumentInformation_Type)jcasType).casFeat_documentSize == null) jcasType.jcas.throwFeatMissing("documentSize", "org.apache.uima.examples.SourceDocumentInformation"); jcasType.ll_cas.ll_setIntValue(addr, ((SourceDocumentInformation_Type)jcasType).casFeatCode_documentSize, v);}
java
public void setDocumentSize(int v) { if (SourceDocumentInformation_Type.featOkTst && ((SourceDocumentInformation_Type)jcasType).casFeat_documentSize == null) jcasType.jcas.throwFeatMissing("documentSize", "org.apache.uima.examples.SourceDocumentInformation"); jcasType.ll_cas.ll_setIntValue(addr, ((SourceDocumentInformation_Type)jcasType).casFeatCode_documentSize, v);}
[ "public", "void", "setDocumentSize", "(", "int", "v", ")", "{", "if", "(", "SourceDocumentInformation_Type", ".", "featOkTst", "&&", "(", "(", "SourceDocumentInformation_Type", ")", "jcasType", ")", ".", "casFeat_documentSize", "==", "null", ")", "jcasType", ".", ...
setter for documentSize - sets Size of original document in bytes before processing by CAS Initializer. Either absolute file size of size within file or other source. @generated
[ "setter", "for", "documentSize", "-", "sets", "Size", "of", "original", "document", "in", "bytes", "before", "processing", "by", "CAS", "Initializer", ".", "Either", "absolute", "file", "size", "of", "size", "within", "file", "or", "other", "source", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/org/apache/uima/examples/SourceDocumentInformation.java#L113-L116
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/org/apache/uima/examples/SourceDocumentInformation.java
SourceDocumentInformation.getLastSegment
public boolean getLastSegment() { if (SourceDocumentInformation_Type.featOkTst && ((SourceDocumentInformation_Type)jcasType).casFeat_lastSegment == null) jcasType.jcas.throwFeatMissing("lastSegment", "org.apache.uima.examples.SourceDocumentInformation"); return jcasType.ll_cas.ll_getBooleanValue(addr, ((SourceDocumentInformation_Type)jcasType).casFeatCode_lastSegment);}
java
public boolean getLastSegment() { if (SourceDocumentInformation_Type.featOkTst && ((SourceDocumentInformation_Type)jcasType).casFeat_lastSegment == null) jcasType.jcas.throwFeatMissing("lastSegment", "org.apache.uima.examples.SourceDocumentInformation"); return jcasType.ll_cas.ll_getBooleanValue(addr, ((SourceDocumentInformation_Type)jcasType).casFeatCode_lastSegment);}
[ "public", "boolean", "getLastSegment", "(", ")", "{", "if", "(", "SourceDocumentInformation_Type", ".", "featOkTst", "&&", "(", "(", "SourceDocumentInformation_Type", ")", "jcasType", ")", ".", "casFeat_lastSegment", "==", "null", ")", "jcasType", ".", "jcas", "."...
getter for lastSegment - gets For a CAS that represents a segment of a larger source document, this flag indicates whether this CAS is the final segment of the source document. This is useful for downstream components that want to take some action after having seen all of the segments of a particular source document. @generated
[ "getter", "for", "lastSegment", "-", "gets", "For", "a", "CAS", "that", "represents", "a", "segment", "of", "a", "larger", "source", "document", "this", "flag", "indicates", "whether", "this", "CAS", "is", "the", "final", "segment", "of", "the", "source", ...
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/org/apache/uima/examples/SourceDocumentInformation.java#L124-L127
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/org/apache/uima/examples/SourceDocumentInformation.java
SourceDocumentInformation.setLastSegment
public void setLastSegment(boolean v) { if (SourceDocumentInformation_Type.featOkTst && ((SourceDocumentInformation_Type)jcasType).casFeat_lastSegment == null) jcasType.jcas.throwFeatMissing("lastSegment", "org.apache.uima.examples.SourceDocumentInformation"); jcasType.ll_cas.ll_setBooleanValue(addr, ((SourceDocumentInformation_Type)jcasType).casFeatCode_lastSegment, v);}
java
public void setLastSegment(boolean v) { if (SourceDocumentInformation_Type.featOkTst && ((SourceDocumentInformation_Type)jcasType).casFeat_lastSegment == null) jcasType.jcas.throwFeatMissing("lastSegment", "org.apache.uima.examples.SourceDocumentInformation"); jcasType.ll_cas.ll_setBooleanValue(addr, ((SourceDocumentInformation_Type)jcasType).casFeatCode_lastSegment, v);}
[ "public", "void", "setLastSegment", "(", "boolean", "v", ")", "{", "if", "(", "SourceDocumentInformation_Type", ".", "featOkTst", "&&", "(", "(", "SourceDocumentInformation_Type", ")", "jcasType", ")", ".", "casFeat_lastSegment", "==", "null", ")", "jcasType", "."...
setter for lastSegment - sets For a CAS that represents a segment of a larger source document, this flag indicates whether this CAS is the final segment of the source document. This is useful for downstream components that want to take some action after having seen all of the segments of a particular source document. @generated
[ "setter", "for", "lastSegment", "-", "sets", "For", "a", "CAS", "that", "represents", "a", "segment", "of", "a", "larger", "source", "document", "this", "flag", "indicates", "whether", "this", "CAS", "is", "the", "final", "segment", "of", "the", "source", ...
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/org/apache/uima/examples/SourceDocumentInformation.java#L131-L134
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/WordForm.java
WordForm.getLemma
public String getLemma() { if (WordForm_Type.featOkTst && ((WordForm_Type)jcasType).casFeat_lemma == null) jcasType.jcas.throwFeatMissing("lemma", "com.digitalpebble.rasp.WordForm"); return jcasType.ll_cas.ll_getStringValue(addr, ((WordForm_Type)jcasType).casFeatCode_lemma);}
java
public String getLemma() { if (WordForm_Type.featOkTst && ((WordForm_Type)jcasType).casFeat_lemma == null) jcasType.jcas.throwFeatMissing("lemma", "com.digitalpebble.rasp.WordForm"); return jcasType.ll_cas.ll_getStringValue(addr, ((WordForm_Type)jcasType).casFeatCode_lemma);}
[ "public", "String", "getLemma", "(", ")", "{", "if", "(", "WordForm_Type", ".", "featOkTst", "&&", "(", "(", "WordForm_Type", ")", "jcasType", ")", ".", "casFeat_lemma", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"lemma\"", ...
getter for lemma - gets lemma of the Form @generated @return value of the feature
[ "getter", "for", "lemma", "-", "gets", "lemma", "of", "the", "Form" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/WordForm.java#L86-L89
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/WordForm.java
WordForm.setLemma
public void setLemma(String v) { if (WordForm_Type.featOkTst && ((WordForm_Type)jcasType).casFeat_lemma == null) jcasType.jcas.throwFeatMissing("lemma", "com.digitalpebble.rasp.WordForm"); jcasType.ll_cas.ll_setStringValue(addr, ((WordForm_Type)jcasType).casFeatCode_lemma, v);}
java
public void setLemma(String v) { if (WordForm_Type.featOkTst && ((WordForm_Type)jcasType).casFeat_lemma == null) jcasType.jcas.throwFeatMissing("lemma", "com.digitalpebble.rasp.WordForm"); jcasType.ll_cas.ll_setStringValue(addr, ((WordForm_Type)jcasType).casFeatCode_lemma, v);}
[ "public", "void", "setLemma", "(", "String", "v", ")", "{", "if", "(", "WordForm_Type", ".", "featOkTst", "&&", "(", "(", "WordForm_Type", ")", "jcasType", ")", ".", "casFeat_lemma", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(",...
setter for lemma - sets lemma of the Form @generated @param v value to set into the feature
[ "setter", "for", "lemma", "-", "sets", "lemma", "of", "the", "Form" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/WordForm.java#L95-L98
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/WordForm.java
WordForm.getPOS
public String getPOS() { if (WordForm_Type.featOkTst && ((WordForm_Type)jcasType).casFeat_POS == null) jcasType.jcas.throwFeatMissing("POS", "com.digitalpebble.rasp.WordForm"); return jcasType.ll_cas.ll_getStringValue(addr, ((WordForm_Type)jcasType).casFeatCode_POS);}
java
public String getPOS() { if (WordForm_Type.featOkTst && ((WordForm_Type)jcasType).casFeat_POS == null) jcasType.jcas.throwFeatMissing("POS", "com.digitalpebble.rasp.WordForm"); return jcasType.ll_cas.ll_getStringValue(addr, ((WordForm_Type)jcasType).casFeatCode_POS);}
[ "public", "String", "getPOS", "(", ")", "{", "if", "(", "WordForm_Type", ".", "featOkTst", "&&", "(", "(", "WordForm_Type", ")", "jcasType", ")", ".", "casFeat_POS", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"POS\"", ",", ...
getter for POS - gets POS tag for a given form @generated @return value of the feature
[ "getter", "for", "POS", "-", "gets", "POS", "tag", "for", "a", "given", "form" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/WordForm.java#L108-L111
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/WordForm.java
WordForm.setPOS
public void setPOS(String v) { if (WordForm_Type.featOkTst && ((WordForm_Type)jcasType).casFeat_POS == null) jcasType.jcas.throwFeatMissing("POS", "com.digitalpebble.rasp.WordForm"); jcasType.ll_cas.ll_setStringValue(addr, ((WordForm_Type)jcasType).casFeatCode_POS, v);}
java
public void setPOS(String v) { if (WordForm_Type.featOkTst && ((WordForm_Type)jcasType).casFeat_POS == null) jcasType.jcas.throwFeatMissing("POS", "com.digitalpebble.rasp.WordForm"); jcasType.ll_cas.ll_setStringValue(addr, ((WordForm_Type)jcasType).casFeatCode_POS, v);}
[ "public", "void", "setPOS", "(", "String", "v", ")", "{", "if", "(", "WordForm_Type", ".", "featOkTst", "&&", "(", "(", "WordForm_Type", ")", "jcasType", ")", ".", "casFeat_POS", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "...
setter for POS - sets POS tag for a given form @generated @param v value to set into the feature
[ "setter", "for", "POS", "-", "sets", "POS", "tag", "for", "a", "given", "form" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/WordForm.java#L117-L120
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/WordForm.java
WordForm.getSuffix
public String getSuffix() { if (WordForm_Type.featOkTst && ((WordForm_Type)jcasType).casFeat_suffix == null) jcasType.jcas.throwFeatMissing("suffix", "com.digitalpebble.rasp.WordForm"); return jcasType.ll_cas.ll_getStringValue(addr, ((WordForm_Type)jcasType).casFeatCode_suffix);}
java
public String getSuffix() { if (WordForm_Type.featOkTst && ((WordForm_Type)jcasType).casFeat_suffix == null) jcasType.jcas.throwFeatMissing("suffix", "com.digitalpebble.rasp.WordForm"); return jcasType.ll_cas.ll_getStringValue(addr, ((WordForm_Type)jcasType).casFeatCode_suffix);}
[ "public", "String", "getSuffix", "(", ")", "{", "if", "(", "WordForm_Type", ".", "featOkTst", "&&", "(", "(", "WordForm_Type", ")", "jcasType", ")", ".", "casFeat_suffix", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"suffix\""...
getter for suffix - gets @generated @return value of the feature
[ "getter", "for", "suffix", "-", "gets" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/WordForm.java#L152-L155
train
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/WordForm.java
WordForm.setSuffix
public void setSuffix(String v) { if (WordForm_Type.featOkTst && ((WordForm_Type)jcasType).casFeat_suffix == null) jcasType.jcas.throwFeatMissing("suffix", "com.digitalpebble.rasp.WordForm"); jcasType.ll_cas.ll_setStringValue(addr, ((WordForm_Type)jcasType).casFeatCode_suffix, v);}
java
public void setSuffix(String v) { if (WordForm_Type.featOkTst && ((WordForm_Type)jcasType).casFeat_suffix == null) jcasType.jcas.throwFeatMissing("suffix", "com.digitalpebble.rasp.WordForm"); jcasType.ll_cas.ll_setStringValue(addr, ((WordForm_Type)jcasType).casFeatCode_suffix, v);}
[ "public", "void", "setSuffix", "(", "String", "v", ")", "{", "if", "(", "WordForm_Type", ".", "featOkTst", "&&", "(", "(", "WordForm_Type", ")", "jcasType", ")", ".", "casFeat_suffix", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(...
setter for suffix - sets @generated @param v value to set into the feature
[ "setter", "for", "suffix", "-", "sets" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/WordForm.java#L161-L164
train
BlueBrain/bluima
modules/bluima_pdf/src/main/java/ch/epfl/bbp/uima/pdf/cr/PdfCollectionReader.java
PdfCollectionReader.serializeXMLDocument
public static void serializeXMLDocument (Document doc, Writer output) throws TransformerException { // serialize XML document using identity transformation Transformer trans = TransformerFactory.newInstance().newTransformer(); DOMSource source = new DOMSource(doc); StreamResult result = new StreamResult(output); trans.transform(source, result); }
java
public static void serializeXMLDocument (Document doc, Writer output) throws TransformerException { // serialize XML document using identity transformation Transformer trans = TransformerFactory.newInstance().newTransformer(); DOMSource source = new DOMSource(doc); StreamResult result = new StreamResult(output); trans.transform(source, result); }
[ "public", "static", "void", "serializeXMLDocument", "(", "Document", "doc", ",", "Writer", "output", ")", "throws", "TransformerException", "{", "// serialize XML document using identity transformation", "Transformer", "trans", "=", "TransformerFactory", ".", "newInstance", ...
Writes the given Document to the given Writer using a no-op XSL transformation.
[ "Writes", "the", "given", "Document", "to", "the", "given", "Writer", "using", "a", "no", "-", "op", "XSL", "transformation", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_pdf/src/main/java/ch/epfl/bbp/uima/pdf/cr/PdfCollectionReader.java#L392-L398
train
BlueBrain/bluima
modules/bluima_jsre/src/main/java/org/itc/irst/tcc/sre/CompareExampleSet.java
CompareExampleSet.createFeatureIndex
private FeatureIndex[] createFeatureIndex(int subspaceCount) // throws // Exception { logger.info("create feature index"); FeatureIndex[] index = new FeatureIndex[subspaceCount]; for (int i = 0; i < subspaceCount; i++) index[i] = new FeatureIndex(false, 1); return index; }
java
private FeatureIndex[] createFeatureIndex(int subspaceCount) // throws // Exception { logger.info("create feature index"); FeatureIndex[] index = new FeatureIndex[subspaceCount]; for (int i = 0; i < subspaceCount; i++) index[i] = new FeatureIndex(false, 1); return index; }
[ "private", "FeatureIndex", "[", "]", "createFeatureIndex", "(", "int", "subspaceCount", ")", "// throws", "// Exception", "{", "logger", ".", "info", "(", "\"create feature index\"", ")", ";", "FeatureIndex", "[", "]", "index", "=", "new", "FeatureIndex", "[", "...
create feature index
[ "create", "feature", "index" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_jsre/src/main/java/org/itc/irst/tcc/sre/CompareExampleSet.java#L166-L176
train
BlueBrain/bluima
modules/bluima_corpora/src/main/java/ch/epfl/bbp/uima/cr/GeniaCorpusCollectionReader.java
GeniaCorpusCollectionReader.annotatateContent
private static String annotatateContent(JCas jcas, Object contentObj, int start) { LOG.trace("annotate: " + reflectionToString(contentObj)); int end = start; StringBuilder internalSb = new StringBuilder(); if (contentObj instanceof String) { String c = (String) contentObj; internalSb.append(c); end += c.length(); } else if (contentObj instanceof Cons) { Cons cons = (Cons) contentObj; for (Object o : cons.getContent()) { String parse = annotatateContent(jcas, o, end); end += parse.length(); internalSb.append(parse); } BioEntityMention entity = new BioEntityMention(jcas, start, end); entity.setSpecificType(cons.getSem()); entity.setComponentId(GeniaCorpusCollectionReader.COMPONENT_ID); entity.setTextualRepresentation(cons.getLex()); entity.addToIndexes(); } return internalSb.toString(); }
java
private static String annotatateContent(JCas jcas, Object contentObj, int start) { LOG.trace("annotate: " + reflectionToString(contentObj)); int end = start; StringBuilder internalSb = new StringBuilder(); if (contentObj instanceof String) { String c = (String) contentObj; internalSb.append(c); end += c.length(); } else if (contentObj instanceof Cons) { Cons cons = (Cons) contentObj; for (Object o : cons.getContent()) { String parse = annotatateContent(jcas, o, end); end += parse.length(); internalSb.append(parse); } BioEntityMention entity = new BioEntityMention(jcas, start, end); entity.setSpecificType(cons.getSem()); entity.setComponentId(GeniaCorpusCollectionReader.COMPONENT_ID); entity.setTextualRepresentation(cons.getLex()); entity.addToIndexes(); } return internalSb.toString(); }
[ "private", "static", "String", "annotatateContent", "(", "JCas", "jcas", ",", "Object", "contentObj", ",", "int", "start", ")", "{", "LOG", ".", "trace", "(", "\"annotate: \"", "+", "reflectionToString", "(", "contentObj", ")", ")", ";", "int", "end", "=", ...
Recursive, since annotations can overlap
[ "Recursive", "since", "annotations", "can", "overlap" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_corpora/src/main/java/ch/epfl/bbp/uima/cr/GeniaCorpusCollectionReader.java#L115-L144
train