idx
int64
0
165k
question
stringlengths
73
5.81k
target
stringlengths
5
918
20,100
private static Object digIn ( Object target , String field ) { if ( target instanceof List ) { @ SuppressWarnings ( "unchecked" ) List < Object > list = ( List < Object > ) target ; return digInList ( list , field ) ; } else if ( target instanceof Map ) { @ SuppressWarnings ( "unchecked" ) Map < String , Object > map = ( Map < String , Object > ) target ; return digInMap ( map , field ) ; } else { return digInObject ( target , field ) ; } }
Uses reflection to dig into a chain of objects in preparation for setting a value somewhere within the tree . Gets the value of the given property of the target object and if it is null creates a new instance of the appropriate type and sets it on the target object . Returns the gotten or created value .
20,101
private static void setValue ( Object target , String field , Object value ) { if ( "0" . equals ( field ) ) { if ( ! ( target instanceof Collection ) ) { throw new IllegalArgumentException ( "Cannot evaluate '0' on object " + target ) ; } @ SuppressWarnings ( "unchecked" ) Collection < Object > collection = ( Collection < Object > ) target ; collection . add ( value ) ; } else { Method setter = findMethod ( target , "set" + field , value . getClass ( ) ) ; try { setter . invoke ( target , value ) ; } catch ( IllegalAccessException exception ) { throw new IllegalStateException ( "Unable to access setter method" , exception ) ; } catch ( InvocationTargetException exception ) { if ( exception . getCause ( ) instanceof RuntimeException ) { throw ( RuntimeException ) exception . getCause ( ) ; } throw new IllegalStateException ( "Checked exception thrown from setter method" , exception ) ; } } }
Uses reflection to set the value of the given property on the target object .
20,102
private static Method findMethod ( Object target , String name , Class < ? > parameterType ) { for ( Method method : target . getClass ( ) . getMethods ( ) ) { if ( ! method . getName ( ) . equals ( name ) ) { continue ; } Class < ? > [ ] parameters = method . getParameterTypes ( ) ; if ( parameters . length != 1 ) { continue ; } if ( parameters [ 0 ] . isAssignableFrom ( parameterType ) ) { return method ; } } throw new IllegalStateException ( "No method '" + name + "(" + parameterType + ") on type " + target . getClass ( ) ) ; }
Finds a method of the given name that will accept a parameter of the given type . If more than one method matches returns the first such method found .
20,103
public static boolean isMultiValuedPath ( List < String > expression ) { for ( String element : expression ) { if ( "*" . equals ( element ) || element . startsWith ( "*:" ) ) { return true ; } } return false ; }
Returns true if the given path expression contains wildcards and could be expanded to match multiple values .
20,104
public synchronized boolean load ( AmazonWebServiceRequest request , ResultCapture < ? > extractor ) { if ( attributes != null ) { return false ; } ActionModel action = resourceModel . getLoadAction ( ) ; if ( action == null ) { throw new UnsupportedOperationException ( "This resource does not support being loaded." ) ; } @ SuppressWarnings ( "unchecked" ) ResultCapture < Object > erasedExtractor = ( ResultCapture < Object > ) extractor ; ActionResult result = ActionUtils . perform ( this , action , request , erasedExtractor ) ; this . attributes = parseAttributes ( resourceModel , result . getData ( ) ) ; return true ; }
Explicitly loads a representation of this resource by calling the service to retrieve a new set of attributes .
20,105
public ActionResult performAction ( String name , AmazonWebServiceRequest request , ResultCapture < ? > extractor ) { ActionModel action = resourceModel . getAction ( name ) ; if ( action == null ) { throw new UnsupportedOperationException ( "Resource does not support the action " + name ) ; } @ SuppressWarnings ( "unchecked" ) ResultCapture < Object > erasedExtractor = ( ResultCapture < Object > ) extractor ; return ActionUtils . perform ( this , action , request , erasedExtractor ) ; }
Performs the given action on this resource . This always involves a request to the service . It may mark the cached attributes of this resource object dirty .
20,106
public T build ( ) { C clientObject = client ; if ( clientObject == null ) { clientObject = createClient ( ) ; } return factory . create ( clientObject ) ; }
Builds a new service object with the given parameters .
20,107
public ResourcePageImpl nextPage ( ResultCapture < Object > extractor ) { if ( getNextToken ( ) == null ) { throw new NoSuchElementException ( "There is no next page" ) ; } ActionResult result = ActionUtils . perform ( context , listActionModel , request , extractor , getNextToken ( ) ) ; return new ResourcePageImpl ( context , listActionModel , request , result ) ; }
Makes a request to the service to retrieve the next page of resources in the collection .
20,108
public Lemma getLemma ( ) { if ( Token_Type . featOkTst && ( ( Token_Type ) jcasType ) . casFeat_lemma == null ) jcasType . jcas . throwFeatMissing ( "lemma" , "de.julielab.jules.types.Token" ) ; return ( Lemma ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_lemma ) ) ) ; }
getter for lemma - gets the lemma information O
20,109
public void setLemma ( Lemma v ) { if ( Token_Type . featOkTst && ( ( Token_Type ) jcasType ) . casFeat_lemma == null ) jcasType . jcas . throwFeatMissing ( "lemma" , "de.julielab.jules.types.Token" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_lemma , jcasType . ll_cas . ll_getFSRef ( v ) ) ; }
setter for lemma - sets the lemma information O
20,110
public String getOrthogr ( ) { if ( Token_Type . featOkTst && ( ( Token_Type ) jcasType ) . casFeat_orthogr == null ) jcasType . jcas . throwFeatMissing ( "orthogr" , "de.julielab.jules.types.Token" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_orthogr ) ; }
getter for orthogr - gets see de . julielab . jules . types . Orthogrpahy
20,111
public void setOrthogr ( String v ) { if ( Token_Type . featOkTst && ( ( Token_Type ) jcasType ) . casFeat_orthogr == null ) jcasType . jcas . throwFeatMissing ( "orthogr" , "de.julielab.jules.types.Token" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_orthogr , v ) ; }
setter for orthogr - sets see de . julielab . jules . types . Orthogrpahy
20,112
public FSArray getDepRel ( ) { if ( Token_Type . featOkTst && ( ( Token_Type ) jcasType ) . casFeat_depRel == null ) jcasType . jcas . throwFeatMissing ( "depRel" , "de.julielab.jules.types.Token" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_depRel ) ) ) ; }
getter for depRel - gets Contains a list of syntactical dependencies see DependencyRelation O
20,113
public void setDepRel ( FSArray v ) { if ( Token_Type . featOkTst && ( ( Token_Type ) jcasType ) . casFeat_depRel == null ) jcasType . jcas . throwFeatMissing ( "depRel" , "de.julielab.jules.types.Token" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_depRel , jcasType . ll_cas . ll_getFSRef ( v ) ) ; }
setter for depRel - sets Contains a list of syntactical dependencies see DependencyRelation O
20,114
public DependencyRelation getDepRel ( int i ) { if ( Token_Type . featOkTst && ( ( Token_Type ) jcasType ) . casFeat_depRel == null ) jcasType . jcas . throwFeatMissing ( "depRel" , "de.julielab.jules.types.Token" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_depRel ) , i ) ; return ( DependencyRelation ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_depRel ) , i ) ) ) ; }
indexed getter for depRel - gets an indexed value - Contains a list of syntactical dependencies see DependencyRelation O
20,115
public void setDepRel ( int i , DependencyRelation v ) { if ( Token_Type . featOkTst && ( ( Token_Type ) jcasType ) . casFeat_depRel == null ) jcasType . jcas . throwFeatMissing ( "depRel" , "de.julielab.jules.types.Token" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_depRel ) , i ) ; jcasType . ll_cas . ll_setRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_depRel ) , i , jcasType . ll_cas . ll_getFSRef ( v ) ) ; }
indexed setter for depRel - sets an indexed value - Contains a list of syntactical dependencies see DependencyRelation O
20,116
public String getLemmaStr ( ) { if ( Token_Type . featOkTst && ( ( Token_Type ) jcasType ) . casFeat_lemmaStr == null ) jcasType . jcas . throwFeatMissing ( "lemmaStr" , "de.julielab.jules.types.Token" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_lemmaStr ) ; }
getter for lemmaStr - gets
20,117
public void setLemmaStr ( String v ) { if ( Token_Type . featOkTst && ( ( Token_Type ) jcasType ) . casFeat_lemmaStr == null ) jcasType . jcas . throwFeatMissing ( "lemmaStr" , "de.julielab.jules.types.Token" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_lemmaStr , v ) ; }
setter for lemmaStr - sets
20,118
public String getTopicIds ( ) { if ( Token_Type . featOkTst && ( ( Token_Type ) jcasType ) . casFeat_topicIds == null ) jcasType . jcas . throwFeatMissing ( "topicIds" , "de.julielab.jules.types.Token" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_topicIds ) ; }
getter for topicIds - gets topic model ids separated by spaces
20,119
public void setTopicIds ( String v ) { if ( Token_Type . featOkTst && ( ( Token_Type ) jcasType ) . casFeat_topicIds == null ) jcasType . jcas . throwFeatMissing ( "topicIds" , "de.julielab.jules.types.Token" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_topicIds , v ) ; }
setter for topicIds - sets topic model ids separated by spaces
20,120
public void setArguments ( FSArray v ) { if ( RelationMention_Type . featOkTst && ( ( RelationMention_Type ) jcasType ) . casFeat_arguments == null ) jcasType . jcas . throwFeatMissing ( "arguments" , "de.julielab.jules.types.RelationMention" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( RelationMention_Type ) jcasType ) . casFeatCode_arguments , jcasType . ll_cas . ll_getFSRef ( v ) ) ; }
setter for arguments - sets
20,121
public void setArguments ( int i , ArgumentMention v ) { if ( RelationMention_Type . featOkTst && ( ( RelationMention_Type ) jcasType ) . casFeat_arguments == null ) jcasType . jcas . throwFeatMissing ( "arguments" , "de.julielab.jules.types.RelationMention" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( RelationMention_Type ) jcasType ) . casFeatCode_arguments ) , i ) ; jcasType . ll_cas . ll_setRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( RelationMention_Type ) jcasType ) . casFeatCode_arguments ) , i , jcasType . ll_cas . ll_getFSRef ( v ) ) ; }
indexed setter for arguments - sets an indexed value -
20,122
public Set < String > editMention ( String mention ) { Set < String > result = new HashSet < String > ( ) ; StringTokenizer tokens = new StringTokenizer ( mention , delims , false ) ; List < String > tokenList = new LinkedList < String > ( ) ; if ( tokens . countTokens ( ) < 3 ) return result ; while ( tokens . hasMoreTokens ( ) ) { tokenList . add ( tokens . nextToken ( ) ) ; } String first = tokenList . get ( 0 ) ; String second = tokenList . get ( 1 ) ; String third = tokenList . get ( 2 ) ; if ( second . equals ( "and" ) || second . equals ( "or" ) || second . equals ( "to" ) ) { if ( directions . contains ( first ) && directions . contains ( third ) ) { int spot = mention . indexOf ( third ) + third . length ( ) ; result . add ( first + mention . substring ( spot ) ) ; result . add ( third + mention . substring ( spot ) ) ; } } return result ; }
split the mention using the directions
20,123
public String getResolved ( ) { if ( Coordination_Type . featOkTst && ( ( Coordination_Type ) jcasType ) . casFeat_resolved == null ) jcasType . jcas . throwFeatMissing ( "resolved" , "de.julielab.jules.types.Coordination" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Coordination_Type ) jcasType ) . casFeatCode_resolved ) ; }
getter for resolved - gets
20,124
public void setResolved ( String v ) { if ( Coordination_Type . featOkTst && ( ( Coordination_Type ) jcasType ) . casFeat_resolved == null ) jcasType . jcas . throwFeatMissing ( "resolved" , "de.julielab.jules.types.Coordination" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Coordination_Type ) jcasType ) . casFeatCode_resolved , v ) ; }
setter for resolved - sets
20,125
public boolean getElliptical ( ) { if ( Coordination_Type . featOkTst && ( ( Coordination_Type ) jcasType ) . casFeat_elliptical == null ) jcasType . jcas . throwFeatMissing ( "elliptical" , "de.julielab.jules.types.Coordination" ) ; return jcasType . ll_cas . ll_getBooleanValue ( addr , ( ( Coordination_Type ) jcasType ) . casFeatCode_elliptical ) ; }
getter for elliptical - gets
20,126
public void setElliptical ( boolean v ) { if ( Coordination_Type . featOkTst && ( ( Coordination_Type ) jcasType ) . casFeat_elliptical == null ) jcasType . jcas . throwFeatMissing ( "elliptical" , "de.julielab.jules.types.Coordination" ) ; jcasType . ll_cas . ll_setBooleanValue ( addr , ( ( Coordination_Type ) jcasType ) . casFeatCode_elliptical , v ) ; }
setter for elliptical - sets
20,127
public void log ( ) { System . out . println ( "Lemmatiser: " + ( lemmatiser == null ? null : lemmatiser . getClass ( ) . getName ( ) ) ) ; System . out . println ( "POSTagger: " + ( posTagger == null ? null : posTagger . getClass ( ) . getName ( ) ) ) ; System . out . println ( "Tokenizer: " + tokenizer . getClass ( ) . getName ( ) ) ; System . out . println ( "Tag format: " + tagFormat . name ( ) ) ; System . out . println ( "PostProcessor: " + ( postProcessor == null ? null : postProcessor . getClass ( ) . getName ( ) ) ) ; System . out . println ( "Using numeric normalization: " + useNumericNormalization ) ; System . out . println ( "CRF order is " + order ) ; System . out . println ( "Using feature induction: " + useFeatureInduction ) ; System . out . println ( "Text textDirection: " + textDirection ) ; }
Outputs the settings for this configuration to the console very useful for ensuring the configuration is set as desired prior to a training run
20,128
protected double scoreCombination ( double [ ] multiScore ) { double sum = 0.0 ; for ( int i = 0 ; i < multiScore . length ; i ++ ) { sum += multiScore [ i ] ; } return sum / multiScore . length ; }
Combine the scores for each primitive distance function on each field .
20,129
protected String explainScoreCombination ( double [ ] multiScore ) { StringBuffer buf = new StringBuffer ( "" ) ; PrintfFormat fmt = new PrintfFormat ( " %.3f" ) ; buf . append ( "field-level scores [" ) ; for ( int i = 0 ; i < multiScore . length ; i ++ ) { buf . append ( fmt . sprintf ( multiScore [ i ] ) ) ; } buf . append ( "] Average score:" ) ; buf . append ( fmt . sprintf ( scoreCombination ( multiScore ) ) ) ; return buf . toString ( ) ; }
Explain how to combine the scores for each primitive distance function on each field .
20,130
public boolean accept ( File f ) { if ( f . isDirectory ( ) ) { return false ; } String name = f . getName ( ) . toLowerCase ( ) ; return name . endsWith ( ".pdf" ) ; }
Judges whether a file is a PDF document or not
20,131
public Annotation getFirstEntity ( ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_firstEntity == null ) jcasType . jcas . throwFeatMissing ( "firstEntity" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; return ( Annotation ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_firstEntity ) ) ) ; }
getter for firstEntity - gets
20,132
public void setFirstEntity ( Annotation v ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_firstEntity == null ) jcasType . jcas . throwFeatMissing ( "firstEntity" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_firstEntity , jcasType . ll_cas . ll_getFSRef ( v ) ) ; }
setter for firstEntity - sets
20,133
public Annotation getSecondEntity ( ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_secondEntity == null ) jcasType . jcas . throwFeatMissing ( "secondEntity" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; return ( Annotation ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_secondEntity ) ) ) ; }
getter for secondEntity - gets
20,134
public void setSecondEntity ( Annotation v ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_secondEntity == null ) jcasType . jcas . throwFeatMissing ( "secondEntity" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_secondEntity , jcasType . ll_cas . ll_getFSRef ( v ) ) ; }
setter for secondEntity - sets
20,135
public int getSnippetBegin ( ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_snippetBegin == null ) jcasType . jcas . throwFeatMissing ( "snippetBegin" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; return jcasType . ll_cas . ll_getIntValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_snippetBegin ) ; }
getter for snippetBegin - gets
20,136
public void setSnippetBegin ( int v ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_snippetBegin == null ) jcasType . jcas . throwFeatMissing ( "snippetBegin" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; jcasType . ll_cas . ll_setIntValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_snippetBegin , v ) ; }
setter for snippetBegin - sets
20,137
public int getSnippetEnd ( ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_snippetEnd == null ) jcasType . jcas . throwFeatMissing ( "snippetEnd" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; return jcasType . ll_cas . ll_getIntValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_snippetEnd ) ; }
getter for snippetEnd - gets
20,138
public void setSnippetEnd ( int v ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_snippetEnd == null ) jcasType . jcas . throwFeatMissing ( "snippetEnd" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; jcasType . ll_cas . ll_setIntValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_snippetEnd , v ) ; }
setter for snippetEnd - sets
20,139
public StringArray getFirstIds ( ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_firstIds == null ) jcasType . jcas . throwFeatMissing ( "firstIds" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; return ( StringArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_firstIds ) ) ) ; }
getter for firstIds - gets A list of string ids to identify the first occurrence
20,140
public void setFirstIds ( StringArray v ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_firstIds == null ) jcasType . jcas . throwFeatMissing ( "firstIds" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_firstIds , jcasType . ll_cas . ll_getFSRef ( v ) ) ; }
setter for firstIds - sets A list of string ids to identify the first occurrence
20,141
public String getFirstIds ( int i ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_firstIds == null ) jcasType . jcas . throwFeatMissing ( "firstIds" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_firstIds ) , i ) ; return jcasType . ll_cas . ll_getStringArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_firstIds ) , i ) ; }
indexed getter for firstIds - gets an indexed value - A list of string ids to identify the first occurrence
20,142
public void setFirstIds ( int i , String v ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_firstIds == null ) jcasType . jcas . throwFeatMissing ( "firstIds" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_firstIds ) , i ) ; jcasType . ll_cas . ll_setStringArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_firstIds ) , i , v ) ; }
indexed setter for firstIds - sets an indexed value - A list of string ids to identify the first occurrence
20,143
public StringArray getSecondIds ( ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_secondIds == null ) jcasType . jcas . throwFeatMissing ( "secondIds" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; return ( StringArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_secondIds ) ) ) ; }
getter for secondIds - gets a list of string ids to identify the second occurrence
20,144
public void setSecondIds ( StringArray v ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_secondIds == null ) jcasType . jcas . throwFeatMissing ( "secondIds" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_secondIds , jcasType . ll_cas . ll_getFSRef ( v ) ) ; }
setter for secondIds - sets a list of string ids to identify the second occurrence
20,145
public String getSecondIds ( int i ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_secondIds == null ) jcasType . jcas . throwFeatMissing ( "secondIds" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_secondIds ) , i ) ; return jcasType . ll_cas . ll_getStringArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_secondIds ) , i ) ; }
indexed getter for secondIds - gets an indexed value - a list of string ids to identify the second occurrence
20,146
public void setSecondIds ( int i , String v ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_secondIds == null ) jcasType . jcas . throwFeatMissing ( "secondIds" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_secondIds ) , i ) ; jcasType . ll_cas . ll_setStringArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_secondIds ) , i , v ) ; }
indexed setter for secondIds - sets an indexed value - a list of string ids to identify the second occurrence
20,147
public String getCooccurrenceType ( ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_cooccurrenceType == null ) jcasType . jcas . throwFeatMissing ( "cooccurrenceType" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_cooccurrenceType ) ; }
getter for cooccurrenceType - gets
20,148
public void setCooccurrenceType ( String v ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_cooccurrenceType == null ) jcasType . jcas . throwFeatMissing ( "cooccurrenceType" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_cooccurrenceType , v ) ; }
setter for cooccurrenceType - sets
20,149
public float getConfidence ( ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_confidence == null ) jcasType . jcas . throwFeatMissing ( "confidence" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; return jcasType . ll_cas . ll_getFloatValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_confidence ) ; }
getter for confidence - gets To which degree we are confident about this being a true co - occurrence
20,150
public void setConfidence ( float v ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_confidence == null ) jcasType . jcas . throwFeatMissing ( "confidence" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; jcasType . ll_cas . ll_setFloatValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_confidence , v ) ; }
setter for confidence - sets To which degree we are confident about this being a true co - occurrence
20,151
public boolean getHasInteraction ( ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_hasInteraction == null ) jcasType . jcas . throwFeatMissing ( "hasInteraction" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; return jcasType . ll_cas . ll_getBooleanValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_hasInteraction ) ; }
getter for hasInteraction - gets whether this cooccurrence signals an interaction between the two entities . This is relevant for the Whitetext corpus in particular .
20,152
public void setHasInteraction ( boolean v ) { if ( Cooccurrence_Type . featOkTst && ( ( Cooccurrence_Type ) jcasType ) . casFeat_hasInteraction == null ) jcasType . jcas . throwFeatMissing ( "hasInteraction" , "ch.epfl.bbp.uima.types.Cooccurrence" ) ; jcasType . ll_cas . ll_setBooleanValue ( addr , ( ( Cooccurrence_Type ) jcasType ) . casFeatCode_hasInteraction , v ) ; }
setter for hasInteraction - sets whether this cooccurrence signals an interaction between the two entities . This is relevant for the Whitetext corpus in particular .
20,153
public int getPresent ( ) { if ( MultipleProteins_Type . featOkTst && ( ( MultipleProteins_Type ) jcasType ) . casFeat_present == null ) jcasType . jcas . throwFeatMissing ( "present" , "ch.epfl.bbp.uima.types.MultipleProteins" ) ; return jcasType . ll_cas . ll_getIntValue ( addr , ( ( MultipleProteins_Type ) jcasType ) . casFeatCode_present ) ; }
getter for present - gets 1 if present
20,154
public void setPresent ( int v ) { if ( MultipleProteins_Type . featOkTst && ( ( MultipleProteins_Type ) jcasType ) . casFeat_present == null ) jcasType . jcas . throwFeatMissing ( "present" , "ch.epfl.bbp.uima.types.MultipleProteins" ) ; jcasType . ll_cas . ll_setIntValue ( addr , ( ( MultipleProteins_Type ) jcasType ) . casFeatCode_present , v ) ; }
setter for present - sets 1 if present
20,155
public void persist ( File file ) throws IOException { DataOutputStream output = new DataOutputStream ( new GZIPOutputStream ( new FileOutputStream ( file ) ) ) ; output . writeUTF ( FILE_TYPE ) ; System . err . println ( "pruning from " + wordMap . size ( ) ) ; for ( Iterator ki = wordMap . iterator ( ) ; ki . hasNext ( ) ; ) { String key = ( String ) ki . next ( ) ; if ( ( ( CountedNumberedSet ) wordMap ) . getCount ( key ) < cutoff ) { ki . remove ( ) ; } } System . err . println ( "pruning to " + wordMap . size ( ) ) ; output . writeInt ( wordMap . size ( ) ) ; for ( Iterator ki = wordMap . iterator ( ) ; ki . hasNext ( ) ; ) { String key = ( String ) ki . next ( ) ; output . writeUTF ( key ) ; output . writeInt ( wordMap . getIndex ( key ) ) ; } CountedSet cset = ( CountedSet ) gramSet ; int gramCount = 0 ; for ( Iterator gi = gramSet . iterator ( ) ; gi . hasNext ( ) ; ) { NGram ngram = ( NGram ) gi . next ( ) ; if ( cset . getCount ( ngram ) >= cutoff ) { int [ ] words = ngram . getWords ( ) ; output . writeInt ( words . length ) ; for ( int wi = 0 ; wi < words . length ; wi ++ ) { output . writeInt ( words [ wi ] ) ; } gramCount ++ ; } else { } } System . err . println ( "Wrote out " + gramCount + " n-grams" ) ; output . close ( ) ; }
Save this n - gram dictionary to the specified file .
20,156
public String getAce_subtype ( ) { if ( Value_Type . featOkTst && ( ( Value_Type ) jcasType ) . casFeat_ace_subtype == null ) jcasType . jcas . throwFeatMissing ( "ace_subtype" , "de.julielab.jules.types.ace.Value" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Value_Type ) jcasType ) . casFeatCode_ace_subtype ) ; }
getter for ace_subtype - gets
20,157
public static < T > T deserialize ( byte [ ] b , Class < T > clazz ) { try ( Pool < Kryo , RuntimeException > . Entry entry = kryoPool . borrow ( ) ; Input input = new Input ( b ) ; ) { T t = entry . getObject ( ) . readObject ( input , clazz ) ; entry . setValid ( true ) ; return t ; } catch ( KryoException e ) { Log . w ( e . getMessage ( ) ) ; return null ; } }
Be sure to do null pointer check on return value !!!
20,158
public static StringDistance [ ] buildArray ( String classNames ) { String classNamesArray [ ] = split ( classNames ) ; StringDistance learners [ ] = new StringDistance [ classNamesArray . length ] ; for ( int i = 0 ; i < classNamesArray . length ; i ++ ) { learners [ i ] = build ( classNamesArray [ i ] ) . getDistance ( ) ; } return learners ; }
Generate a StringDistanceArray given a sequence of classnames separated by slashes .
20,159
static public void main ( String [ ] args ) { try { if ( args [ 0 ] . indexOf ( '/' ) > 0 ) { System . out . println ( build ( args [ 0 ] ) ) ; } else { System . out . println ( build ( args ) ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; } }
Test routine .
20,160
public FSArray getRelatedArticles ( ) { if ( RelatedArticleList_Type . featOkTst && ( ( RelatedArticleList_Type ) jcasType ) . casFeat_relatedArticles == null ) jcasType . jcas . throwFeatMissing ( "relatedArticles" , "de.julielab.jules.types.RelatedArticleList" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( RelatedArticleList_Type ) jcasType ) . casFeatCode_relatedArticles ) ) ) ; }
getter for relatedArticles - gets
20,161
public void setRelatedArticles ( FSArray v ) { if ( RelatedArticleList_Type . featOkTst && ( ( RelatedArticleList_Type ) jcasType ) . casFeat_relatedArticles == null ) jcasType . jcas . throwFeatMissing ( "relatedArticles" , "de.julielab.jules.types.RelatedArticleList" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( RelatedArticleList_Type ) jcasType ) . casFeatCode_relatedArticles , jcasType . ll_cas . ll_getFSRef ( v ) ) ; }
setter for relatedArticles - sets
20,162
public RelatedArticle getRelatedArticles ( int i ) { if ( RelatedArticleList_Type . featOkTst && ( ( RelatedArticleList_Type ) jcasType ) . casFeat_relatedArticles == null ) jcasType . jcas . throwFeatMissing ( "relatedArticles" , "de.julielab.jules.types.RelatedArticleList" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( RelatedArticleList_Type ) jcasType ) . casFeatCode_relatedArticles ) , i ) ; return ( RelatedArticle ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( RelatedArticleList_Type ) jcasType ) . casFeatCode_relatedArticles ) , i ) ) ) ; }
indexed getter for relatedArticles - gets an indexed value -
20,163
public void setRelatedArticles ( int i , RelatedArticle v ) { if ( RelatedArticleList_Type . featOkTst && ( ( RelatedArticleList_Type ) jcasType ) . casFeat_relatedArticles == null ) jcasType . jcas . throwFeatMissing ( "relatedArticles" , "de.julielab.jules.types.RelatedArticleList" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( RelatedArticleList_Type ) jcasType ) . casFeatCode_relatedArticles ) , i ) ; jcasType . ll_cas . ll_setRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( RelatedArticleList_Type ) jcasType ) . casFeatCode_relatedArticles ) , i , jcasType . ll_cas . ll_getFSRef ( v ) ) ; }
indexed setter for relatedArticles - sets an indexed value -
20,164
public FSArray getItemList ( ) { if ( List_Type . featOkTst && ( ( List_Type ) jcasType ) . casFeat_itemList == null ) jcasType . jcas . throwFeatMissing ( "itemList" , "de.julielab.jules.types.List" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( List_Type ) jcasType ) . casFeatCode_itemList ) ) ) ; }
getter for itemList - gets contains items of the level 1 . The items of the level 1 could contain further items of next level and so on in order to represent an iterative structure of list items .
20,165
public void setItemList ( FSArray v ) { if ( List_Type . featOkTst && ( ( List_Type ) jcasType ) . casFeat_itemList == null ) jcasType . jcas . throwFeatMissing ( "itemList" , "de.julielab.jules.types.List" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( List_Type ) jcasType ) . casFeatCode_itemList , jcasType . ll_cas . ll_getFSRef ( v ) ) ; }
setter for itemList - sets contains items of the level 1 . The items of the level 1 could contain further items of next level and so on in order to represent an iterative structure of list items .
20,166
public ListItem getItemList ( int i ) { if ( List_Type . featOkTst && ( ( List_Type ) jcasType ) . casFeat_itemList == null ) jcasType . jcas . throwFeatMissing ( "itemList" , "de.julielab.jules.types.List" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( List_Type ) jcasType ) . casFeatCode_itemList ) , i ) ; return ( ListItem ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( List_Type ) jcasType ) . casFeatCode_itemList ) , i ) ) ) ; }
indexed getter for itemList - gets an indexed value - contains items of the level 1 . The items of the level 1 could contain further items of next level and so on in order to represent an iterative structure of list items .
20,167
public void setItemList ( int i , ListItem v ) { if ( List_Type . featOkTst && ( ( List_Type ) jcasType ) . casFeat_itemList == null ) jcasType . jcas . throwFeatMissing ( "itemList" , "de.julielab.jules.types.List" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( List_Type ) jcasType ) . casFeatCode_itemList ) , i ) ; jcasType . ll_cas . ll_setRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( List_Type ) jcasType ) . casFeatCode_itemList ) , i , jcasType . ll_cas . ll_getFSRef ( v ) ) ; }
indexed setter for itemList - sets an indexed value - contains items of the level 1 . The items of the level 1 could contain further items of next level and so on in order to represent an iterative structure of list items .
20,168
public void setAce_subtype ( String v ) { if ( Entity_Type . featOkTst && ( ( Entity_Type ) jcasType ) . casFeat_ace_subtype == null ) jcasType . jcas . throwFeatMissing ( "ace_subtype" , "de.julielab.jules.types.ace.Entity" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Entity_Type ) jcasType ) . casFeatCode_ace_subtype , v ) ; }
setter for ace_subtype - sets
20,169
public String getAce_class ( ) { if ( Entity_Type . featOkTst && ( ( Entity_Type ) jcasType ) . casFeat_ace_class == null ) jcasType . jcas . throwFeatMissing ( "ace_class" , "de.julielab.jules.types.ace.Entity" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Entity_Type ) jcasType ) . casFeatCode_ace_class ) ; }
getter for ace_class - gets
20,170
public void setAce_class ( String v ) { if ( Entity_Type . featOkTst && ( ( Entity_Type ) jcasType ) . casFeat_ace_class == null ) jcasType . jcas . throwFeatMissing ( "ace_class" , "de.julielab.jules.types.ace.Entity" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Entity_Type ) jcasType ) . casFeatCode_ace_class , v ) ; }
setter for ace_class - sets
20,171
public FSArray getEntity_mentions ( ) { if ( Entity_Type . featOkTst && ( ( Entity_Type ) jcasType ) . casFeat_entity_mentions == null ) jcasType . jcas . throwFeatMissing ( "entity_mentions" , "de.julielab.jules.types.ace.Entity" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Entity_Type ) jcasType ) . casFeatCode_entity_mentions ) ) ) ; }
getter for entity_mentions - gets
20,172
public void setEntity_mentions ( FSArray v ) { if ( Entity_Type . featOkTst && ( ( Entity_Type ) jcasType ) . casFeat_entity_mentions == null ) jcasType . jcas . throwFeatMissing ( "entity_mentions" , "de.julielab.jules.types.ace.Entity" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( Entity_Type ) jcasType ) . casFeatCode_entity_mentions , jcasType . ll_cas . ll_getFSRef ( v ) ) ; }
setter for entity_mentions - sets
20,173
public EntityMention getEntity_mentions ( int i ) { if ( Entity_Type . featOkTst && ( ( Entity_Type ) jcasType ) . casFeat_entity_mentions == null ) jcasType . jcas . throwFeatMissing ( "entity_mentions" , "de.julielab.jules.types.ace.Entity" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Entity_Type ) jcasType ) . casFeatCode_entity_mentions ) , i ) ; return ( EntityMention ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Entity_Type ) jcasType ) . casFeatCode_entity_mentions ) , i ) ) ) ; }
indexed getter for entity_mentions - gets an indexed value -
20,174
public void setEntity_mentions ( int i , EntityMention v ) { if ( Entity_Type . featOkTst && ( ( Entity_Type ) jcasType ) . casFeat_entity_mentions == null ) jcasType . jcas . throwFeatMissing ( "entity_mentions" , "de.julielab.jules.types.ace.Entity" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Entity_Type ) jcasType ) . casFeatCode_entity_mentions ) , i ) ; jcasType . ll_cas . ll_setRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Entity_Type ) jcasType ) . casFeatCode_entity_mentions ) , i , jcasType . ll_cas . ll_getFSRef ( v ) ) ; }
indexed setter for entity_mentions - sets an indexed value -
20,175
public FSArray getEntity_attributes ( ) { if ( Entity_Type . featOkTst && ( ( Entity_Type ) jcasType ) . casFeat_entity_attributes == null ) jcasType . jcas . throwFeatMissing ( "entity_attributes" , "de.julielab.jules.types.ace.Entity" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Entity_Type ) jcasType ) . casFeatCode_entity_attributes ) ) ) ; }
getter for entity_attributes - gets
20,176
public void setEntity_attributes ( FSArray v ) { if ( Entity_Type . featOkTst && ( ( Entity_Type ) jcasType ) . casFeat_entity_attributes == null ) jcasType . jcas . throwFeatMissing ( "entity_attributes" , "de.julielab.jules.types.ace.Entity" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( Entity_Type ) jcasType ) . casFeatCode_entity_attributes , jcasType . ll_cas . ll_getFSRef ( v ) ) ; }
setter for entity_attributes - sets
20,177
public EntityAttribute getEntity_attributes ( int i ) { if ( Entity_Type . featOkTst && ( ( Entity_Type ) jcasType ) . casFeat_entity_attributes == null ) jcasType . jcas . throwFeatMissing ( "entity_attributes" , "de.julielab.jules.types.ace.Entity" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Entity_Type ) jcasType ) . casFeatCode_entity_attributes ) , i ) ; return ( EntityAttribute ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Entity_Type ) jcasType ) . casFeatCode_entity_attributes ) , i ) ) ) ; }
indexed getter for entity_attributes - gets an indexed value -
20,178
public void setEntity_attributes ( int i , EntityAttribute v ) { if ( Entity_Type . featOkTst && ( ( Entity_Type ) jcasType ) . casFeat_entity_attributes == null ) jcasType . jcas . throwFeatMissing ( "entity_attributes" , "de.julielab.jules.types.ace.Entity" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Entity_Type ) jcasType ) . casFeatCode_entity_attributes ) , i ) ; jcasType . ll_cas . ll_setRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Entity_Type ) jcasType ) . casFeatCode_entity_attributes ) , i , jcasType . ll_cas . ll_getFSRef ( v ) ) ; }
indexed setter for entity_attributes - sets an indexed value -
20,179
public String getTarget ( ) { if ( Link_Type . featOkTst && ( ( Link_Type ) jcasType ) . casFeat_target == null ) jcasType . jcas . throwFeatMissing ( "target" , "de.julielab.jules.types.wikipedia.Link" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Link_Type ) jcasType ) . casFeatCode_target ) ; }
getter for target - gets Title of the Wikipedia page to which the link is pointing to .
20,180
public void setTarget ( String v ) { if ( Link_Type . featOkTst && ( ( Link_Type ) jcasType ) . casFeat_target == null ) jcasType . jcas . throwFeatMissing ( "target" , "de.julielab.jules.types.wikipedia.Link" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Link_Type ) jcasType ) . casFeatCode_target , v ) ; }
setter for target - sets Title of the Wikipedia page to which the link is pointing to .
20,181
private String [ ] getLoadline ( Pair < BrainRegionDictTerm , BrainRegionDictTerm > pair , int pmId ) { BrainRegionDictTerm br1 = pair . getKey ( ) ; BrainRegionDictTerm br2 = pair . getValue ( ) ; return new String [ ] { pmId + "" , br1 . getEntityId ( ) , br1 . getBegin ( ) + "" , br1 . getEnd ( ) + "" , br2 . getEntityId ( ) , br2 . getBegin ( ) + "" , br2 . getEnd ( ) + "" } ; }
pubmed_id region_1_id region_1_start region_1_end region_2_id region_2_start region_2_end
20,182
public void setOntologyId ( String v ) { if ( NeurotransmitterProp_Type . featOkTst && ( ( NeurotransmitterProp_Type ) jcasType ) . casFeat_ontologyId == null ) jcasType . jcas . throwFeatMissing ( "ontologyId" , "neuroner.NeuroNER.NeurotransmitterProp" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( NeurotransmitterProp_Type ) jcasType ) . casFeatCode_ontologyId , v ) ; }
setter for ontologyId - sets ontologyId
20,183
public Span [ ] tokenizePos ( String d ) { Span [ ] tokens = split ( d ) ; newTokens . clear ( ) ; tokProbs . clear ( ) ; for ( int i = 0 , il = tokens . length ; i < il ; i ++ ) { Span s = tokens [ i ] ; String tok = d . substring ( s . getStart ( ) , s . getEnd ( ) ) ; if ( tok . length ( ) < 2 ) { newTokens . add ( s ) ; tokProbs . add ( ONE ) ; } else if ( useAlphaNumericOptimization ( ) && alphaNumeric . matcher ( tok ) . matches ( ) ) { newTokens . add ( s ) ; tokProbs . add ( ONE ) ; } else { int start = s . getStart ( ) ; int end = s . getEnd ( ) ; final int origStart = s . getStart ( ) ; double tokenProb = 1.0 ; for ( int j = origStart + 1 ; j < end ; j ++ ) { double [ ] probs = model . eval ( cg . getContext ( new ObjectIntPair ( tok , j - origStart ) ) ) ; String best = model . getBestOutcome ( probs ) ; tokenProb *= probs [ model . getIndex ( best ) ] ; if ( best . equals ( TokContextGenerator . SPLIT ) ) { newTokens . add ( new Span ( start , j ) ) ; tokProbs . add ( new Double ( tokenProb ) ) ; start = j ; tokenProb = 1.0 ; } } newTokens . add ( new Span ( start , end ) ) ; tokProbs . add ( new Double ( tokenProb ) ) ; } } Span [ ] spans = new Span [ newTokens . size ( ) ] ; newTokens . toArray ( spans ) ; return spans ; }
Tokenizes the string .
20,184
public String [ ] tokenize ( String s ) { Span [ ] spans = tokenizePos ( s ) ; String [ ] toks = new String [ spans . length ] ; for ( int ti = 0 , tl = toks . length ; ti < tl ; ti ++ ) { toks [ ti ] = s . substring ( spans [ ti ] . getStart ( ) , spans [ ti ] . getEnd ( ) ) ; } return toks ; }
Tokenize a String .
20,185
private Mention getMention ( int tokenIndex ) { Mention mention = null ; for ( Mention mention2 : mentions ) { if ( mention2 . contains ( tokenIndex ) ) if ( mention == null ) mention = mention2 ; else throw new IllegalArgumentException ( ) ; } return mention ; }
Assumes that each token is tagged either 0 or 1 times
20,186
public String [ ] getContext ( Object o ) { String sb = ( String ) ( ( ObjectIntPair ) o ) . a ; int id = ( ( ObjectIntPair ) o ) . b ; List preds = new ArrayList ( ) ; preds . add ( "p=" + sb . substring ( 0 , id ) ) ; preds . add ( "s=" + sb . substring ( id ) ) ; if ( id > 0 ) { addCharPreds ( "p1" , sb . charAt ( id - 1 ) , preds ) ; if ( id > 1 ) { addCharPreds ( "p2" , sb . charAt ( id - 2 ) , preds ) ; preds . add ( "p21=" + sb . charAt ( id - 2 ) + sb . charAt ( id - 1 ) ) ; } else { preds . add ( "p2=bok" ) ; } preds . add ( "p1f1=" + sb . charAt ( id - 1 ) + sb . charAt ( id ) ) ; } else { preds . add ( "p1=bok" ) ; } addCharPreds ( "f1" , sb . charAt ( id ) , preds ) ; if ( id + 1 < sb . length ( ) ) { addCharPreds ( "f2" , sb . charAt ( id + 1 ) , preds ) ; preds . add ( "f12=" + sb . charAt ( id ) + sb . charAt ( id + 1 ) ) ; } else { preds . add ( "f2=bok" ) ; } if ( sb . charAt ( 0 ) == '&' && sb . charAt ( sb . length ( ) - 1 ) == ';' ) { preds . add ( "cc" ) ; } String [ ] context = new String [ preds . size ( ) ] ; preds . toArray ( context ) ; return context ; }
Builds up the list of features based on the information in the Object which is a pair containing a String and and Integer which indicates the index of the position we are investigating .
20,187
public String getMin ( ) { if ( TIMEX_Type . featOkTst && ( ( TIMEX_Type ) jcasType ) . casFeat_min == null ) jcasType . jcas . throwFeatMissing ( "min" , "de.julielab.jules.types.muc7.TIMEX" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( TIMEX_Type ) jcasType ) . casFeatCode_min ) ; }
getter for min - gets the minimal head of the named entity
20,188
public Map < String , String > extractAbbrPairs ( String inputText , boolean isFileName ) { if ( isFileName ) { return extractAbbrPairs ( inputText ) ; } StringReader sr = new StringReader ( inputText ) ; return extractAbbrPairs ( sr ) ; }
Extract abbreviation pairs directly from input text .
20,189
public List < java . lang . Object > getLastNameOrForeNameOrInitialsOrSuffixOrNameIDOrCollectiveName ( ) { if ( lastNameOrForeNameOrInitialsOrSuffixOrNameIDOrCollectiveName == null ) { lastNameOrForeNameOrInitialsOrSuffixOrNameIDOrCollectiveName = new ArrayList < java . lang . Object > ( ) ; } return this . lastNameOrForeNameOrInitialsOrSuffixOrNameIDOrCollectiveName ; }
Gets the value of the lastNameOrForeNameOrInitialsOrSuffixOrNameIDOrCollectiveName property .
20,190
public Protein getProtein ( ) { if ( CellTypeProteinConcentration_Type . featOkTst && ( ( CellTypeProteinConcentration_Type ) jcasType ) . casFeat_protein == null ) jcasType . jcas . throwFeatMissing ( "protein" , "ch.epfl.bbp.uima.types.CellTypeProteinConcentration" ) ; return ( Protein ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( CellTypeProteinConcentration_Type ) jcasType ) . casFeatCode_protein ) ) ) ; }
getter for protein - gets
20,191
public void setProtein ( Protein v ) { if ( CellTypeProteinConcentration_Type . featOkTst && ( ( CellTypeProteinConcentration_Type ) jcasType ) . casFeat_protein == null ) jcasType . jcas . throwFeatMissing ( "protein" , "ch.epfl.bbp.uima.types.CellTypeProteinConcentration" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( CellTypeProteinConcentration_Type ) jcasType ) . casFeatCode_protein , jcasType . ll_cas . ll_getFSRef ( v ) ) ; }
setter for protein - sets
20,192
public Concentration getConcentration ( ) { if ( CellTypeProteinConcentration_Type . featOkTst && ( ( CellTypeProteinConcentration_Type ) jcasType ) . casFeat_concentration == null ) jcasType . jcas . throwFeatMissing ( "concentration" , "ch.epfl.bbp.uima.types.CellTypeProteinConcentration" ) ; return ( Concentration ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( CellTypeProteinConcentration_Type ) jcasType ) . casFeatCode_concentration ) ) ) ; }
getter for concentration - gets
20,193
public void setConcentration ( Concentration v ) { if ( CellTypeProteinConcentration_Type . featOkTst && ( ( CellTypeProteinConcentration_Type ) jcasType ) . casFeat_concentration == null ) jcasType . jcas . throwFeatMissing ( "concentration" , "ch.epfl.bbp.uima.types.CellTypeProteinConcentration" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( CellTypeProteinConcentration_Type ) jcasType ) . casFeatCode_concentration , jcasType . ll_cas . ll_getFSRef ( v ) ) ; }
setter for concentration - sets
20,194
public CellType getCelltype ( ) { if ( CellTypeProteinConcentration_Type . featOkTst && ( ( CellTypeProteinConcentration_Type ) jcasType ) . casFeat_celltype == null ) jcasType . jcas . throwFeatMissing ( "celltype" , "ch.epfl.bbp.uima.types.CellTypeProteinConcentration" ) ; return ( CellType ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( CellTypeProteinConcentration_Type ) jcasType ) . casFeatCode_celltype ) ) ) ; }
getter for celltype - gets
20,195
public void setCelltype ( CellType v ) { if ( CellTypeProteinConcentration_Type . featOkTst && ( ( CellTypeProteinConcentration_Type ) jcasType ) . casFeat_celltype == null ) jcasType . jcas . throwFeatMissing ( "celltype" , "ch.epfl.bbp.uima.types.CellTypeProteinConcentration" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( CellTypeProteinConcentration_Type ) jcasType ) . casFeatCode_celltype , jcasType . ll_cas . ll_getFSRef ( v ) ) ; }
setter for celltype - sets
20,196
public boolean getProjective ( ) { if ( DependencyRelation_Type . featOkTst && ( ( DependencyRelation_Type ) jcasType ) . casFeat_projective == null ) jcasType . jcas . throwFeatMissing ( "projective" , "de.julielab.jules.types.DependencyRelation" ) ; return jcasType . ll_cas . ll_getBooleanValue ( addr , ( ( DependencyRelation_Type ) jcasType ) . casFeatCode_projective ) ; }
getter for projective - gets The dependency relations can be projective or not C
20,197
public void setProjective ( boolean v ) { if ( DependencyRelation_Type . featOkTst && ( ( DependencyRelation_Type ) jcasType ) . casFeat_projective == null ) jcasType . jcas . throwFeatMissing ( "projective" , "de.julielab.jules.types.DependencyRelation" ) ; jcasType . ll_cas . ll_setBooleanValue ( addr , ( ( DependencyRelation_Type ) jcasType ) . casFeatCode_projective , v ) ; }
setter for projective - sets The dependency relations can be projective or not C
20,198
public java . util . List < Object > getAddressOrAlternativesOrArray ( ) { if ( addressOrAlternativesOrArray == null ) { addressOrAlternativesOrArray = new ArrayList < Object > ( ) ; } return this . addressOrAlternativesOrArray ; }
Gets the value of the addressOrAlternativesOrArray property .
20,199
public java . util . List < RefList > getRefList ( ) { if ( refList == null ) { refList = new ArrayList < RefList > ( ) ; } return this . refList ; }
Gets the value of the refList property .