idx
int64
0
41.2k
question
stringlengths
74
4.04k
target
stringlengths
7
750
20,700
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 ) . casF...
indexed getter for scores - gets an indexed value -
20,701
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...
indexed setter for scores - sets an indexed value -
20,702
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_most...
getter for mostLikelyTopic - gets The most likely topic id for this topic
20,703
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_most...
setter for mostLikelyTopic - sets The most likely topic id for this topic
20,704
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 , Transi...
Enumerates the possible transitions into state M .
20,705
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 , Transition...
Enumerates the possible transitions into state D .
20,706
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 , Trans...
Enumerates the possible transitions into state DL .
20,707
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 , ...
Enumerates the possible transitions into state END .
20,708
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 ) ; }
getter for rule - gets
20,709
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 ) ; }
setter for rule - sets
20,710
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 , ( (...
getter for subclauses - gets array of subelements . contains WordForms or Clauses
20,711
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 ...
setter for subclauses - sets array of subelements . contains WordForms or Clauses
20,712
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...
indexed getter for subclauses - gets an indexed value - array of subelements . contains WordForms or Clauses
20,713
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 , ( ( Cl...
indexed setter for subclauses - sets an indexed value - array of subelements . contains WordForms or Clauses
20,714
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 ) jcasTy...
getter for probability - gets probability of this trigger to be an event or relation trigger
20,715
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 ) jcasTy...
setter for probability - sets probability of this trigger to be an event or relation trigger
20,716
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 ) ....
getter for specifity - gets specifity to be an event trigger compare with using in other context
20,717
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 ) ....
setter for specifity - sets specifity to be an event trigger compare with using in other context
20,718
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 ...
getter for importance - gets how important is this trigger for the event
20,719
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 ...
setter for importance - sets how important is this trigger for the event
20,720
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 ) . casFeatC...
getter for storyID - gets the storyID of the MUC7 documents
20,721
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 ) . casFeatC...
setter for storyID - sets the storyID of the MUC7 documents
20,722
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 ( ) ;...
Explain how the distance was computed .
20,723
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 (...
Convert a model created with Maxent 1 . 0 to a format used with Maxent 1 . 2 .
20,724
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 ) ; }
Insert a string into the dictionary and associate it with the given value .
20,725
public void freeze ( ) { if ( frozen ) return ; trainDistances ( ) ; if ( DEBUG ) System . out . println ( "computing maxScore of " + tokenizer . maxTokenIndex ( ) + " tokens" ) ; invertedIndex = new Set [ tokenizer . maxTokenIndex ( ) + 1 ] ; maxTFIDFScore = new double [ tokenizer . maxTokenIndex ( ) + 1 ] ; for ( Ite...
Make it impossible to add new values but possible to perform lookups .
20,726
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 >= m...
position of s in the list allTokens
20,727
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 = (...
Exactly like lookup but works by exhaustively checking every stored string .
20,728
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 " + to...
subroutine of lookup
20,729
public void addLine ( String line ) { try { writer . append ( line ) ; writer . newLine ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } }
add text and a new line
20,730
public void addText ( String text ) { try { writer . append ( text ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } }
add text without new line
20,731
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 ] = ...
Compute the scores for each primitive distance function on each field .
20,732
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 .
20,733
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 .
20,734
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 , getDi...
Prepare a string .
20,735
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 ] ) ) ; } }
Default main routine for testing
20,736
public int getAlignedChar ( int iMinusOne , boolean preferHigherIndices ) { 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...
Find a character in the first string s that can be aligned with the i - th character in the second string t .
20,737
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 )...
getter for copyright - gets Copyright information C
20,738
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 ,...
setter for copyright - sets Copyright information C
20,739
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...
getter for truncated - gets Indicates whether the document is truncated C
20,740
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...
setter for truncated - sets Indicates whether the document is truncated C
20,741
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_...
getter for authors - gets The authors of the document O
20,742
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 ...
setter for authors - sets The authors of the document O
20,743
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 ) jcasT...
indexed getter for authors - gets an indexed value - The authors of the document O
20,744
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_Typ...
indexed setter for authors - sets an indexed value - The authors of the document O
20,745
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 ,...
getter for pubTypeList - gets The list of the publication types O
20,746
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_pubType...
setter for pubTypeList - sets The list of the publication types O
20,747
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_Typ...
indexed getter for pubTypeList - gets an indexed value - The list of the publication types O
20,748
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 , ( ( H...
indexed setter for pubTypeList - sets an indexed value - The list of the publication types O
20,749
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 ) ; }
getter for language - gets The language of the document O
20,750
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 )...
setter for language - sets The language of the document O
20,751
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 ) ; }
getter for doi - gets document object identifier
20,752
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 ) ; }
setter for doi - sets document object identifier
20,753
public int getDocumentFrequency ( Token token ) { Integer df = ( Integer ) documentFrequency . get ( token ) ; if ( df == null ) return 0 ; else return df . intValue ( ) ; }
Get the document frequency of the token .
20,754
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 ) . casFeatC...
setter for gender - sets Gender
20,755
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_ca...
getter for case - gets Case
20,756
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_ca...
setter for case - sets Case
20,757
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 ) . casFeatC...
getter for number - gets Number
20,758
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 ) . casFeatC...
setter for number - sets Number
20,759
public java . util . List < Object > getHeaders ( ) { if ( headers == null ) { headers = new ArrayList < Object > ( ) ; } return this . headers ; }
Gets the value of the headers property .
20,760
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 ) . c...
getter for componentId - gets Indicates which NLP component has been used to derive the annotation C
20,761
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 ) . c...
setter for componentId - sets Indicates which NLP component has been used to derive the annotation C
20,762
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 ) ; }
Adds a single entry to the dictionary . The text is processed by the tokenizer and the resulting tokens are stored .
20,763
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 ] ) ; } writer . close ...
one entry per line . word first then tab then frequency
20,764
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_getRefV...
getter for names - gets
20,765
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 )...
setter for names - sets
20,766
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 , ( ( ...
indexed getter for names - gets an indexed value -
20,767
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 ( ad...
indexed setter for names - sets an indexed value -
20,768
private boolean judgeHTMLCode ( ArrayList < ArrayList < TextPiece > > wordsByPage ) { ArrayList < TextPiece > wordsOfPageOne = wordsByPage . get ( 0 ) ; boolean isHTMLCode = true ; int i = 0 ; while ( i < Math . min ( 20 , wordsOfPageOne . size ( ) ) ) { TextPiece currentWord = wordsOfPageOne . get ( i ) ; String thisT...
Detects documents encoded in HTML code
20,769
private void extractFiguresFromAPage ( ArrayList < TextPiece > linesOfAPage , ArrayList < TextPiece > wordsOfAPage , int i , File pdfFile , ArrayList < ArrayList < TextPiece > > linesByPage ) { if ( linesOfAPage . size ( ) > 30 ) { boolean figureKwdExist = false ; int prevTableEndIndex = 0 ; int k = - 1 ; for ( TextPie...
Extracts figures from ONE page
20,770
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 ( ...
Extracts a table if detecting a potential table caption
20,771
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 ( ) > ...
Judges whether a table is a wide table or not by considering the width of the table
20,772
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 >...
Organizes cells into rows based on the coordinate information
20,773
public void getRowHeadingBasedOnCells ( TableCandidate tc ) { String rowHeadingThisTable = "" ; int footnoteLineIndex = tc . getFootnoteBeginRow ( ) ; String [ ] [ ] cells = tc . getCells ( ) ; for ( int j = 0 ; j < footnoteLineIndex ; j ++ ) { if ( cells [ j ] [ 0 ] . length ( ) > 0 ) rowHeadingThisTable = rowHeadingT...
Get the table row headings based on the cell information
20,774
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_de...
getter for deptype - gets
20,775
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_de...
setter for deptype - sets
20,776
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_su...
getter for subtype - gets
20,777
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_su...
setter for subtype - sets
20,778
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 , ( ( Depend...
getter for dep - gets
20,779
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 ...
setter for dep - sets
20,780
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 ) ; }
setter for value - sets The value of lemma C
20,781
protected boolean trainCorpus ( List < List < Acronym > > corpus , List < Map < String , String > > trueLabels ) { boolean converge = false ; trueLabels = null ; initModelParamsAndCounters ( ) ; int n = corpus . size ( ) ; int c = 1 ; Double change ; LOG . debug ( "Training abbreviations..." ) ; while ( ! converge ) { ...
Gets training examples separated by documents
20,782
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 ; }
Takes a string and returns it without ligatures in it
20,783
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 ....
getter for value - gets Annotations to be chained .
20,784
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 , ( ( Discontinuous...
setter for value - sets Annotations to be chained .
20,785
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...
indexed getter for value - gets an indexed value - Annotations to be chained .
20,786
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...
indexed setter for value - sets an indexed value - Annotations to be chained .
20,787
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 ( ...
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 .
20,788
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 ( ...
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 .
20,789
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_getBooleanVal...
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 .
20,790
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_setBooleanVal...
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 .
20,791
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 ) ; }
getter for lemma - gets lemma of the Form
20,792
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 ) ; }
setter for lemma - sets lemma of the Form
20,793
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 ) ; }
getter for POS - gets POS tag for a given form
20,794
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 ) ; }
setter for POS - sets POS tag for a given form
20,795
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 ) ; }
getter for suffix - gets
20,796
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 ) ...
setter for suffix - sets
20,797
public static void serializeXMLDocument ( Document doc , Writer output ) throws TransformerException { Transformer trans = TransformerFactory . newInstance ( ) . newTransformer ( ) ; DOMSource source = new DOMSource ( doc ) ; StreamResult result = new StreamResult ( output ) ; trans . transform ( source , result ) ; }
Writes the given Document to the given Writer using a no - op XSL transformation .
20,798
private FeatureIndex [ ] createFeatureIndex ( int subspaceCount ) { 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 ; }
create feature index
20,799
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...
Recursive since annotations can overlap