idx int64 0 165k | question stringlengths 73 4.15k | target stringlengths 5 918 | len_question int64 21 890 | len_target int64 3 255 |
|---|---|---|---|---|
20,400 | private double [ ] getIDFArray ( BagOfTokens bag ) { double [ ] idfArray = new double [ bag . size ( ) ] ; Iterator it = bag . tokenIterator ( ) ; int i = 0 ; while ( it . hasNext ( ) ) { Token tok = ( Token ) it . next ( ) ; idfArray [ i ] = bag . getWeight ( tok ) ; i ++ ; } return idfArray ; } | getIDFArray normalize a vector of IDF weights . | 97 | 12 |
20,401 | private double algorithm1 ( String [ ] tTokens , String [ ] uTokens , double [ ] tIdfArray , double [ ] uIdfArray ) { ArrayList candidateList = obtainCandidateList ( tTokens , uTokens , tIdfArray , uIdfArray ) ; sortCandidateList ( candidateList ) ; double scoreValue = 0.0 ; HashMap tMap = new HashMap ( ) , uMap = new HashMap ( ) ; Iterator it = candidateList . iterator ( ) ; while ( it . hasNext ( ) ) { Candidates actualCandidates = ( Candidates ) it . next ( ) ; Integer tPos = new Integer ( actualCandidates . getTPos ( ) ) ; Integer uPos = new Integer ( actualCandidates . getUPos ( ) ) ; if ( ( ! tMap . containsKey ( tPos ) ) && ( ! uMap . containsKey ( uPos ) ) ) { double actualScore = actualCandidates . getScore ( ) ; scoreValue += actualScore ; tMap . put ( tPos , null ) ; uMap . put ( uPos , null ) ; } } return scoreValue ; } | algorithm1 select the considered most appropiate token pairs and compute the sum of the selected pairs . | 248 | 21 |
20,402 | private ArrayList obtainCandidateList ( String [ ] tTokens , String [ ] uTokens , double [ ] tIdfArray , double [ ] uIdfArray ) { ArrayList candidateList = new ArrayList ( ) ; double minStringSize = getMinStringSize ( tTokens , uTokens ) ; for ( int t = 0 ; t < tTokens . length ; t ++ ) { int lastTr = - 1 ; for ( int u = 0 , flag = 0 ; u < uTokens . length && flag == 0 ; u ++ ) { int tr = Math . abs ( t - u ) ; if ( lastTr >= 0 && lastTr < tr ) { flag = 1 ; } else { String tTok = tTokens [ t ] , uTok = uTokens [ u ] ; double innerScore = tokenDistance . score ( tTok , uTok ) ; if ( innerScore >= 0.0 ) { double matched = 0.0 ; if ( innerScore == 1.0 ) { matched = tTokens [ t ] . length ( ) ; } else { matched = ( ( TagLinkToken ) tokenDistance ) . getMatched ( ) ; } double weightMatched = matched / minStringSize , weightTFIDF = tIdfArray [ t ] * uIdfArray [ u ] , weight = ( weightTFIDF + weightMatched ) / 2.0 ; if ( innerScore == 1 ) { lastTr = tr ; } candidateList . add ( new Candidates ( t , u , innerScore * weight ) ) ; } } } } return candidateList ; } | obtainCandidateList set a candidate list of pair of tokens . Sometimes it will not compute all candidate pairs in oder to reduce the computational cost . | 336 | 31 |
20,403 | private void sortCandidateList ( ArrayList list ) { java . util . Collections . sort ( list , new java . util . Comparator ( ) { public int compare ( Object o1 , Object o2 ) { // First sort, by score in index double scoreT = ( ( Candidates ) o1 ) . getScore ( ) , scoreU = ( ( Candidates ) o2 ) . getScore ( ) ; if ( scoreU > scoreT ) { return 1 ; } if ( scoreU < scoreT ) { return - 1 ; } return 0 ; } } ) ; } | sortCandidateList sort a list of candidate pair of tokens . | 123 | 13 |
20,404 | private double round ( double number ) { int round = ( int ) ( number * 1000.00 ) ; double rest = ( number * 1000.00 ) - round ; if ( rest >= 0.5 ) { round ++ ; } return ( round / 1000.00 ) ; } | round a double number . | 58 | 5 |
20,405 | SourcedToken getEquivalentToken ( Token tok ) { if ( unsourcedTokens . contains ( tok . getValue ( ) ) ) { for ( int i = 0 ; i < tokens . length ; i ++ ) { if ( tokens [ i ] . getValue ( ) . equals ( tok . getValue ( ) ) ) { return tokens [ i ] ; } } System . out . println ( "This is a problem" ) ; return null ; } else { return null ; } } | Test if this token appears at least once . | 105 | 9 |
20,406 | public FSArray getArguments ( ) { if ( Relation_Type . featOkTst && ( ( Relation_Type ) jcasType ) . casFeat_arguments == null ) jcasType . jcas . throwFeatMissing ( "arguments" , "de.julielab.jules.types.ace.Relation" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Relation_Type ) jcasType ) . casFeatCode_arguments ) ) ) ; } | getter for arguments - gets | 140 | 6 |
20,407 | public String getEntryId ( ) { if ( ResourceEntry_Type . featOkTst && ( ( ResourceEntry_Type ) jcasType ) . casFeat_entryId == null ) jcasType . jcas . throwFeatMissing ( "entryId" , "de.julielab.jules.types.ResourceEntry" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( ResourceEntry_Type ) jcasType ) . casFeatCode_entryId ) ; } | getter for entryId - gets The identifier of the entry C | 115 | 13 |
20,408 | public void setEntryId ( String v ) { if ( ResourceEntry_Type . featOkTst && ( ( ResourceEntry_Type ) jcasType ) . casFeat_entryId == null ) jcasType . jcas . throwFeatMissing ( "entryId" , "de.julielab.jules.types.ResourceEntry" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( ResourceEntry_Type ) jcasType ) . casFeatCode_entryId , v ) ; } | setter for entryId - sets The identifier of the entry C | 118 | 13 |
20,409 | public String getVersion ( ) { if ( ResourceEntry_Type . featOkTst && ( ( ResourceEntry_Type ) jcasType ) . casFeat_version == null ) jcasType . jcas . throwFeatMissing ( "version" , "de.julielab.jules.types.ResourceEntry" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( ResourceEntry_Type ) jcasType ) . casFeatCode_version ) ; } | getter for version - gets The version of the resource C | 111 | 12 |
20,410 | public void setVersion ( String v ) { if ( ResourceEntry_Type . featOkTst && ( ( ResourceEntry_Type ) jcasType ) . casFeat_version == null ) jcasType . jcas . throwFeatMissing ( "version" , "de.julielab.jules.types.ResourceEntry" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( ResourceEntry_Type ) jcasType ) . casFeatCode_version , v ) ; } | setter for version - sets The version of the resource C | 114 | 12 |
20,411 | public int getLevel ( ) { if ( ListItem_Type . featOkTst && ( ( ListItem_Type ) jcasType ) . casFeat_level == null ) jcasType . jcas . throwFeatMissing ( "level" , "de.julielab.jules.types.ListItem" ) ; return jcasType . ll_cas . ll_getIntValue ( addr , ( ( ListItem_Type ) jcasType ) . casFeatCode_level ) ; } | getter for level - gets Level of indentation of the list item . | 111 | 15 |
20,412 | public void setLevel ( int v ) { if ( ListItem_Type . featOkTst && ( ( ListItem_Type ) jcasType ) . casFeat_level == null ) jcasType . jcas . throwFeatMissing ( "level" , "de.julielab.jules.types.ListItem" ) ; jcasType . ll_cas . ll_setIntValue ( addr , ( ( ListItem_Type ) jcasType ) . casFeatCode_level , v ) ; } | setter for level - sets Level of indentation of the list item . | 114 | 15 |
20,413 | public java . util . List < Object > getListItemOrX ( ) { if ( listItemOrX == null ) { listItemOrX = new ArrayList < Object > ( ) ; } return this . listItemOrX ; } | Gets the value of the listItemOrX property . | 51 | 12 |
20,414 | public void setPolarity ( String v ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_polarity == null ) jcasType . jcas . throwFeatMissing ( "polarity" , "de.julielab.jules.types.ace.Event" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Event_Type ) jcasType ) . casFeatCode_polarity , v ) ; } | setter for polarity - sets | 120 | 7 |
20,415 | public String getGenericity ( ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_genericity == null ) jcasType . jcas . throwFeatMissing ( "genericity" , "de.julielab.jules.types.ace.Event" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Event_Type ) jcasType ) . casFeatCode_genericity ) ; } | getter for genericity - gets | 113 | 7 |
20,416 | public void setGenericity ( String v ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_genericity == null ) jcasType . jcas . throwFeatMissing ( "genericity" , "de.julielab.jules.types.ace.Event" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Event_Type ) jcasType ) . casFeatCode_genericity , v ) ; } | setter for genericity - sets | 116 | 7 |
20,417 | public void setMentions ( int i , EventMention v ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_mentions == null ) jcasType . jcas . throwFeatMissing ( "mentions" , "de.julielab.jules.types.ace.Event" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Event_Type ) jcasType ) . casFeatCode_mentions ) , i ) ; jcasType . ll_cas . ll_setRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Event_Type ) jcasType ) . casFeatCode_mentions ) , i , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | indexed setter for mentions - sets an indexed value - | 206 | 12 |
20,418 | public static void printTableMeta ( String outputDirPath , File pdfFile , String meta ) { try { File middleDir = new File ( outputDirPath , "metadata" ) ; if ( ! middleDir . exists ( ) ) { middleDir . mkdirs ( ) ; } File tableMetaFile = new File ( middleDir , pdfFile . getName ( ) + ".metadata" ) ; BufferedWriter bw0 = new BufferedWriter ( new FileWriter ( tableMetaFile ) ) ; //System.out.println(meta); bw0 . write ( meta ) ; bw0 . close ( ) ; } catch ( IOException e ) { System . out . printf ( "[Debug Error] IOException\n" ) ; } } | After detecting and extracting a table this method enables us to save the table metadata file locally for later performance evaluation . | 158 | 22 |
20,419 | public static void printStatInfo ( String outputDirPath , File pdfFile , int pageNum , int tableNum ) { try { File classificationData = new File ( outputDirPath , "statInfo" ) ; if ( ! classificationData . exists ( ) ) { classificationData . mkdirs ( ) ; } File fileName = new File ( classificationData , "tableNumStatInfo.txt" ) ; BufferedWriter bw0 = new BufferedWriter ( new FileWriter ( fileName , true ) ) ; bw0 . append ( outputDirPath + pdfFile . getName ( ) + "\t\t" + pageNum + " PAGES\t\t" + tableNum + " TABLES\n" ) ; bw0 . close ( ) ; } catch ( IOException e ) { System . out . printf ( "[Debug Error] IOException\n" ) ; } } | After processing all the PDF documents this method helps us to get the statistic information of all the PDF documents such as the total number of pages tables etc . | 191 | 30 |
20,420 | public String getRelatedArticle ( ) { if ( RelatedArticle_Type . featOkTst && ( ( RelatedArticle_Type ) jcasType ) . casFeat_relatedArticle == null ) jcasType . jcas . throwFeatMissing ( "relatedArticle" , "de.julielab.jules.types.RelatedArticle" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( RelatedArticle_Type ) jcasType ) . casFeatCode_relatedArticle ) ; } | getter for relatedArticle - gets | 115 | 7 |
20,421 | public void setRelatedArticle ( String v ) { if ( RelatedArticle_Type . featOkTst && ( ( RelatedArticle_Type ) jcasType ) . casFeat_relatedArticle == null ) jcasType . jcas . throwFeatMissing ( "relatedArticle" , "de.julielab.jules.types.RelatedArticle" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( RelatedArticle_Type ) jcasType ) . casFeatCode_relatedArticle , v ) ; } | setter for relatedArticle - sets | 118 | 7 |
20,422 | public FSArray getMeSHList ( ) { if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_meSHList == null ) jcasType . jcas . throwFeatMissing ( "meSHList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_meSHList ) ) ) ; } | getter for meSHList - gets A collection of objects of type uima . julielab . uima . MeSHHeading O | 158 | 31 |
20,423 | public void setMeSHList ( FSArray v ) { if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_meSHList == null ) jcasType . jcas . throwFeatMissing ( "meSHList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_meSHList , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | setter for meSHList - sets A collection of objects of type uima . julielab . uima . MeSHHeading O | 154 | 31 |
20,424 | public MeshHeading getMeSHList ( int i ) { if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_meSHList == null ) jcasType . jcas . throwFeatMissing ( "meSHList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_meSHList ) , i ) ; return ( MeshHeading ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_meSHList ) , i ) ) ) ; } | indexed getter for meSHList - gets an indexed value - A collection of objects of type uima . julielab . uima . MeSHHeading O | 236 | 37 |
20,425 | public void setMeSHList ( int i , MeshHeading v ) { if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_meSHList == null ) jcasType . jcas . throwFeatMissing ( "meSHList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_meSHList ) , i ) ; jcasType . ll_cas . ll_setRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_meSHList ) , i , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | indexed setter for meSHList - sets an indexed value - A collection of objects of type uima . julielab . uima . MeSHHeading O | 232 | 37 |
20,426 | public FSArray getChemicalList ( ) { if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_chemicalList == null ) jcasType . jcas . throwFeatMissing ( "chemicalList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_chemicalList ) ) ) ; } | getter for chemicalList - gets A collection of objects of type uima . julielab . uima . Chemical O | 151 | 26 |
20,427 | public void setChemicalList ( FSArray v ) { if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_chemicalList == null ) jcasType . jcas . throwFeatMissing ( "chemicalList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_chemicalList , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | setter for chemicalList - sets A collection of objects of type uima . julielab . uima . Chemical O | 147 | 26 |
20,428 | public Chemical getChemicalList ( int i ) { if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_chemicalList == null ) jcasType . jcas . throwFeatMissing ( "chemicalList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_chemicalList ) , i ) ; return ( Chemical ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_chemicalList ) , i ) ) ) ; } | indexed getter for chemicalList - gets an indexed value - A collection of objects of type uima . julielab . uima . Chemical O | 223 | 32 |
20,429 | public void setChemicalList ( int i , Chemical v ) { if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_chemicalList == null ) jcasType . jcas . throwFeatMissing ( "chemicalList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_chemicalList ) , i ) ; jcasType . ll_cas . ll_setRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_chemicalList ) , i , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | indexed setter for chemicalList - sets an indexed value - A collection of objects of type uima . julielab . uima . Chemical O | 221 | 32 |
20,430 | public FSArray getDBInfoList ( ) { if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_dBInfoList == null ) jcasType . jcas . throwFeatMissing ( "dBInfoList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_dBInfoList ) ) ) ; } | getter for dBInfoList - gets A collection of objects of type uima . julielab . uima . DBInfo O | 154 | 28 |
20,431 | public void setDBInfoList ( FSArray v ) { if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_dBInfoList == null ) jcasType . jcas . throwFeatMissing ( "dBInfoList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_dBInfoList , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | setter for dBInfoList - sets A collection of objects of type uima . julielab . uima . DBInfo O | 150 | 28 |
20,432 | public DBInfo getDBInfoList ( int i ) { if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_dBInfoList == null ) jcasType . jcas . throwFeatMissing ( "dBInfoList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_dBInfoList ) , i ) ; return ( DBInfo ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_dBInfoList ) , i ) ) ) ; } | indexed getter for dBInfoList - gets an indexed value - A collection of objects of type uima . julielab . uima . DBInfo O | 229 | 34 |
20,433 | public void setDBInfoList ( int i , DBInfo v ) { if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_dBInfoList == null ) jcasType . jcas . throwFeatMissing ( "dBInfoList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_dBInfoList ) , i ) ; jcasType . ll_cas . ll_setRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_dBInfoList ) , i , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | indexed setter for dBInfoList - sets an indexed value - A collection of objects of type uima . julielab . uima . DBInfo O | 226 | 34 |
20,434 | public FSArray getKeywordList ( ) { if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_keywordList == null ) jcasType . jcas . throwFeatMissing ( "keywordList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_keywordList ) ) ) ; } | getter for keywordList - gets A collection of objects of type uima . julielab . uima . Keyword O | 154 | 27 |
20,435 | public void setKeywordList ( FSArray v ) { if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_keywordList == null ) jcasType . jcas . throwFeatMissing ( "keywordList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_keywordList , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | setter for keywordList - sets A collection of objects of type uima . julielab . uima . Keyword O | 150 | 27 |
20,436 | public Keyword getKeywordList ( int i ) { if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_keywordList == null ) jcasType . jcas . throwFeatMissing ( "keywordList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_keywordList ) , i ) ; return ( Keyword ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_keywordList ) , i ) ) ) ; } | indexed getter for keywordList - gets an indexed value - A collection of objects of type uima . julielab . uima . Keyword O | 229 | 33 |
20,437 | public void setKeywordList ( int i , Keyword v ) { if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_keywordList == null ) jcasType . jcas . throwFeatMissing ( "keywordList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_keywordList ) , i ) ; jcasType . ll_cas . ll_setRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_keywordList ) , i , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | indexed setter for keywordList - sets an indexed value - A collection of objects of type uima . julielab . uima . Keyword O | 226 | 33 |
20,438 | public StringArray getGeneSymbolList ( ) { if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_geneSymbolList == null ) jcasType . jcas . throwFeatMissing ( "geneSymbolList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; return ( StringArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_geneSymbolList ) ) ) ; } | getter for geneSymbolList - gets GeneSymbolList in PubMed | 161 | 15 |
20,439 | public void setGeneSymbolList ( StringArray v ) { if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_geneSymbolList == null ) jcasType . jcas . throwFeatMissing ( "geneSymbolList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_geneSymbolList , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | setter for geneSymbolList - sets GeneSymbolList in PubMed | 157 | 15 |
20,440 | public String getGeneSymbolList ( int i ) { if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_geneSymbolList == null ) jcasType . jcas . throwFeatMissing ( "geneSymbolList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_geneSymbolList ) , i ) ; return jcasType . ll_cas . ll_getStringArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_geneSymbolList ) , i ) ; } | indexed getter for geneSymbolList - gets an indexed value - GeneSymbolList in PubMed | 215 | 21 |
20,441 | public void setGeneSymbolList ( int i , String v ) { if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_geneSymbolList == null ) jcasType . jcas . throwFeatMissing ( "geneSymbolList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_geneSymbolList ) , i ) ; jcasType . ll_cas . ll_setStringArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type ) jcasType ) . casFeatCode_geneSymbolList ) , i , v ) ; } | indexed setter for geneSymbolList - sets an indexed value - GeneSymbolList in PubMed | 219 | 21 |
20,442 | public Event nextEvent ( ) { while ( _next == null && _ds . hasNext ( ) ) _next = createEvent ( ( String ) _ds . nextToken ( ) ) ; Event current = _next ; if ( _ds . hasNext ( ) ) { _next = createEvent ( ( String ) _ds . nextToken ( ) ) ; } else { _next = null ; } return current ; } | Returns the next Event object held in this EventStream . Each call to nextEvent advances the EventStream . | 88 | 21 |
20,443 | public boolean hasNext ( ) { while ( _next == null && _ds . hasNext ( ) ) _next = createEvent ( ( String ) _ds . nextToken ( ) ) ; return _next != null ; } | Test whether there are any Events remaining in this EventStream . | 47 | 12 |
20,444 | public String getTextValue ( ) { if ( BodyCitation_Type . featOkTst && ( ( BodyCitation_Type ) jcasType ) . casFeat_textValue == null ) jcasType . jcas . throwFeatMissing ( "textValue" , "ch.epfl.bbp.uima.types.BodyCitation" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( BodyCitation_Type ) jcasType ) . casFeatCode_textValue ) ; } | getter for textValue - gets | 120 | 7 |
20,445 | public void setTextValue ( String v ) { if ( BodyCitation_Type . featOkTst && ( ( BodyCitation_Type ) jcasType ) . casFeat_textValue == null ) jcasType . jcas . throwFeatMissing ( "textValue" , "ch.epfl.bbp.uima.types.BodyCitation" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( BodyCitation_Type ) jcasType ) . casFeatCode_textValue , v ) ; } | setter for textValue - sets | 123 | 7 |
20,446 | public String getCitationStatus ( ) { if ( Header_Type . featOkTst && ( ( Header_Type ) jcasType ) . casFeat_citationStatus == null ) jcasType . jcas . throwFeatMissing ( "citationStatus" , "de.julielab.jules.types.pubmed.Header" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Header_Type ) jcasType ) . casFeatCode_citationStatus ) ; } | getter for citationStatus - gets Indicates the status of citation of a PubMed document O | 118 | 18 |
20,447 | public void setCitationStatus ( String v ) { if ( Header_Type . featOkTst && ( ( Header_Type ) jcasType ) . casFeat_citationStatus == null ) jcasType . jcas . throwFeatMissing ( "citationStatus" , "de.julielab.jules.types.pubmed.Header" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Header_Type ) jcasType ) . casFeatCode_citationStatus , v ) ; } | setter for citationStatus - sets Indicates the status of citation of a PubMed document O | 121 | 18 |
20,448 | public Anchor getAnchor ( ) { if ( EventMention_Type . featOkTst && ( ( EventMention_Type ) jcasType ) . casFeat_anchor == null ) jcasType . jcas . throwFeatMissing ( "anchor" , "de.julielab.jules.types.ace.EventMention" ) ; return ( Anchor ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( EventMention_Type ) jcasType ) . casFeatCode_anchor ) ) ) ; } | getter for anchor - gets | 145 | 6 |
20,449 | public void setAnchor ( Anchor v ) { if ( EventMention_Type . featOkTst && ( ( EventMention_Type ) jcasType ) . casFeat_anchor == null ) jcasType . jcas . throwFeatMissing ( "anchor" , "de.julielab.jules.types.ace.EventMention" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( EventMention_Type ) jcasType ) . casFeatCode_anchor , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | setter for anchor - sets | 141 | 6 |
20,450 | public String getLevel ( ) { if ( EventMention_Type . featOkTst && ( ( EventMention_Type ) jcasType ) . casFeat_level == null ) jcasType . jcas . throwFeatMissing ( "level" , "de.julielab.jules.types.ace.EventMention" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( EventMention_Type ) jcasType ) . casFeatCode_level ) ; } | getter for level - gets | 117 | 6 |
20,451 | public void setLevel ( String v ) { if ( EventMention_Type . featOkTst && ( ( EventMention_Type ) jcasType ) . casFeat_level == null ) jcasType . jcas . throwFeatMissing ( "level" , "de.julielab.jules.types.ace.EventMention" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( EventMention_Type ) jcasType ) . casFeatCode_level , v ) ; } | setter for level - sets | 120 | 6 |
20,452 | public LDC_Scope getLdc_scope ( ) { if ( EventMention_Type . featOkTst && ( ( EventMention_Type ) jcasType ) . casFeat_ldc_scope == null ) jcasType . jcas . throwFeatMissing ( "ldc_scope" , "de.julielab.jules.types.ace.EventMention" ) ; return ( LDC_Scope ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( EventMention_Type ) jcasType ) . casFeatCode_ldc_scope ) ) ) ; } | getter for ldc_scope - gets | 156 | 9 |
20,453 | public void setLdc_scope ( LDC_Scope v ) { if ( EventMention_Type . featOkTst && ( ( EventMention_Type ) jcasType ) . casFeat_ldc_scope == null ) jcasType . jcas . throwFeatMissing ( "ldc_scope" , "de.julielab.jules.types.ace.EventMention" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( EventMention_Type ) jcasType ) . casFeatCode_ldc_scope , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | setter for ldc_scope - sets | 150 | 9 |
20,454 | public Event getEvent_ref ( ) { if ( EventMention_Type . featOkTst && ( ( EventMention_Type ) jcasType ) . casFeat_event_ref == null ) jcasType . jcas . throwFeatMissing ( "event_ref" , "de.julielab.jules.types.ace.EventMention" ) ; return ( Event ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( EventMention_Type ) jcasType ) . casFeatCode_event_ref ) ) ) ; } | getter for event_ref - gets | 146 | 8 |
20,455 | public void setEvent_ref ( Event v ) { if ( EventMention_Type . featOkTst && ( ( EventMention_Type ) jcasType ) . casFeat_event_ref == null ) jcasType . jcas . throwFeatMissing ( "event_ref" , "de.julielab.jules.types.ace.EventMention" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( EventMention_Type ) jcasType ) . casFeatCode_event_ref , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | setter for event_ref - sets | 143 | 8 |
20,456 | public static void fixNoSentences ( JCas jCas ) { Collection < Sentence > sentences = select ( jCas , Sentence . class ) ; if ( sentences . size ( ) == 0 ) { String text = jCas . getDocumentText ( ) ; Sentence sentence = new Sentence ( jCas , 0 , text . length ( ) ) ; sentence . addToIndexes ( ) ; } } | If this cas has no Sentence annotation creates one with the whole cas text | 86 | 15 |
20,457 | public String getSyn ( ) { if ( GENIAConstituent_Type . featOkTst && ( ( GENIAConstituent_Type ) jcasType ) . casFeat_syn == null ) jcasType . jcas . throwFeatMissing ( "syn" , "de.julielab.jules.types.GENIAConstituent" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( GENIAConstituent_Type ) jcasType ) . casFeatCode_syn ) ; } | getter for syn - gets Marks coordinations O | 131 | 10 |
20,458 | public void setSyn ( String v ) { if ( GENIAConstituent_Type . featOkTst && ( ( GENIAConstituent_Type ) jcasType ) . casFeat_syn == null ) jcasType . jcas . throwFeatMissing ( "syn" , "de.julielab.jules.types.GENIAConstituent" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( GENIAConstituent_Type ) jcasType ) . casFeatCode_syn , v ) ; } | setter for syn - sets Marks coordinations O | 134 | 10 |
20,459 | public void writeInferredDistributions ( InstanceList instances , File distributionsFile , int numIterations , int thinning , int burnIn , double threshold , int max ) throws IOException { PrintWriter out = new PrintWriter ( distributionsFile ) ; out . print ( "#doc source topic proportion ...\n" ) ; IDSorter [ ] sortedTopics = new IDSorter [ numTopics ] ; for ( int topic = 0 ; topic < numTopics ; topic ++ ) { // Initialize the sorters with dummy values sortedTopics [ topic ] = new IDSorter ( topic , topic ) ; } if ( max < 0 || max > numTopics ) { max = numTopics ; } int doc = 0 ; for ( Instance instance : instances ) { double [ ] topicDistribution = getSampledDistribution ( instance , numIterations , thinning , burnIn ) ; out . print ( doc ) ; out . print ( ' ' ) ; // Print the Source field of the instance if ( instance . getSource ( ) != null ) { out . print ( instance . getSource ( ) ) ; } else { out . print ( "null-source" ) ; } out . print ( ' ' ) ; for ( int topic = 0 ; topic < numTopics ; topic ++ ) { sortedTopics [ topic ] . set ( topic , topicDistribution [ topic ] ) ; } Arrays . sort ( sortedTopics ) ; for ( int i = 0 ; i < max ; i ++ ) { if ( sortedTopics [ i ] . getWeight ( ) < threshold ) { break ; } out . print ( sortedTopics [ i ] . getID ( ) + " " + sortedTopics [ i ] . getWeight ( ) + " " ) ; } out . print ( " \n" ) ; doc ++ ; } out . close ( ) ; } | Infer topics for the provided instances and write distributions to the provided file . | 388 | 15 |
20,460 | public String getAuthor ( ) { if ( SourceFile_Type . featOkTst && ( ( SourceFile_Type ) jcasType ) . casFeat_author == null ) jcasType . jcas . throwFeatMissing ( "author" , "de.julielab.jules.types.ace.SourceFile" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( SourceFile_Type ) jcasType ) . casFeatCode_author ) ; } | getter for author - gets | 112 | 6 |
20,461 | public void setAuthor ( String v ) { if ( SourceFile_Type . featOkTst && ( ( SourceFile_Type ) jcasType ) . casFeat_author == null ) jcasType . jcas . throwFeatMissing ( "author" , "de.julielab.jules.types.ace.SourceFile" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( SourceFile_Type ) jcasType ) . casFeatCode_author , v ) ; } | setter for author - sets | 115 | 6 |
20,462 | public void setUri ( String v ) { if ( SourceFile_Type . featOkTst && ( ( SourceFile_Type ) jcasType ) . casFeat_uri == null ) jcasType . jcas . throwFeatMissing ( "uri" , "de.julielab.jules.types.ace.SourceFile" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( SourceFile_Type ) jcasType ) . casFeatCode_uri , v ) ; } | setter for uri - sets | 116 | 7 |
20,463 | public String getEncoding ( ) { if ( SourceFile_Type . featOkTst && ( ( SourceFile_Type ) jcasType ) . casFeat_encoding == null ) jcasType . jcas . throwFeatMissing ( "encoding" , "de.julielab.jules.types.ace.SourceFile" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( SourceFile_Type ) jcasType ) . casFeatCode_encoding ) ; } | getter for encoding - gets | 116 | 6 |
20,464 | public void setEncoding ( String v ) { if ( SourceFile_Type . featOkTst && ( ( SourceFile_Type ) jcasType ) . casFeat_encoding == null ) jcasType . jcas . throwFeatMissing ( "encoding" , "de.julielab.jules.types.ace.SourceFile" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( SourceFile_Type ) jcasType ) . casFeatCode_encoding , v ) ; } | setter for encoding - sets | 119 | 6 |
20,465 | public FSArray getDocuments ( ) { if ( SourceFile_Type . featOkTst && ( ( SourceFile_Type ) jcasType ) . casFeat_documents == null ) jcasType . jcas . throwFeatMissing ( "documents" , "de.julielab.jules.types.ace.SourceFile" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( SourceFile_Type ) jcasType ) . casFeatCode_documents ) ) ) ; } | getter for documents - gets | 138 | 6 |
20,466 | public void setDocuments ( FSArray v ) { if ( SourceFile_Type . featOkTst && ( ( SourceFile_Type ) jcasType ) . casFeat_documents == null ) jcasType . jcas . throwFeatMissing ( "documents" , "de.julielab.jules.types.ace.SourceFile" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( SourceFile_Type ) jcasType ) . casFeatCode_documents , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | setter for documents - sets | 134 | 6 |
20,467 | public Document getDocuments ( int i ) { if ( SourceFile_Type . featOkTst && ( ( SourceFile_Type ) jcasType ) . casFeat_documents == null ) jcasType . jcas . throwFeatMissing ( "documents" , "de.julielab.jules.types.ace.SourceFile" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( SourceFile_Type ) jcasType ) . casFeatCode_documents ) , i ) ; return ( Document ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( SourceFile_Type ) jcasType ) . casFeatCode_documents ) , i ) ) ) ; } | indexed getter for documents - gets an indexed value - | 208 | 12 |
20,468 | public void setDocuments ( int i , Document v ) { if ( SourceFile_Type . featOkTst && ( ( SourceFile_Type ) jcasType ) . casFeat_documents == null ) jcasType . jcas . throwFeatMissing ( "documents" , "de.julielab.jules.types.ace.SourceFile" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( SourceFile_Type ) jcasType ) . casFeatCode_documents ) , i ) ; jcasType . ll_cas . ll_setRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( SourceFile_Type ) jcasType ) . casFeatCode_documents ) , i , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | indexed setter for documents - sets an indexed value - | 206 | 12 |
20,469 | public String getAce_type ( ) { if ( SourceFile_Type . featOkTst && ( ( SourceFile_Type ) jcasType ) . casFeat_ace_type == null ) jcasType . jcas . throwFeatMissing ( "ace_type" , "de.julielab.jules.types.ace.SourceFile" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( SourceFile_Type ) jcasType ) . casFeatCode_ace_type ) ; } | getter for ace_type - gets | 121 | 8 |
20,470 | public void setAce_type ( String v ) { if ( SourceFile_Type . featOkTst && ( ( SourceFile_Type ) jcasType ) . casFeat_ace_type == null ) jcasType . jcas . throwFeatMissing ( "ace_type" , "de.julielab.jules.types.ace.SourceFile" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( SourceFile_Type ) jcasType ) . casFeatCode_ace_type , v ) ; } | setter for ace_type - sets | 124 | 8 |
20,471 | public void addAll ( ExampleSet data ) { for ( int i = 0 ; i < data . size ( ) ; i ++ ) add ( data . x ( i ) , data . y ( i ) , data . id ( i ) ) ; } | Appends all of the elements in the specified example set to the end of this example set . | 53 | 19 |
20,472 | public String getAnnotationLevel ( ) { if ( MMAXAnnotation_Type . featOkTst && ( ( MMAXAnnotation_Type ) jcasType ) . casFeat_annotationLevel == null ) jcasType . jcas . throwFeatMissing ( "annotationLevel" , "de.julielab.jules.types.mmax.MMAXAnnotation" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_annotationLevel ) ; } | getter for annotationLevel - gets The MMAX annotation level . | 130 | 13 |
20,473 | public void setAnnotationLevel ( String v ) { if ( MMAXAnnotation_Type . featOkTst && ( ( MMAXAnnotation_Type ) jcasType ) . casFeat_annotationLevel == null ) jcasType . jcas . throwFeatMissing ( "annotationLevel" , "de.julielab.jules.types.mmax.MMAXAnnotation" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_annotationLevel , v ) ; } | setter for annotationLevel - sets The MMAX annotation level . | 133 | 13 |
20,474 | public FSArray getSegmentList ( ) { if ( MMAXAnnotation_Type . featOkTst && ( ( MMAXAnnotation_Type ) jcasType ) . casFeat_segmentList == null ) jcasType . jcas . throwFeatMissing ( "segmentList" , "de.julielab.jules.types.mmax.MMAXAnnotation" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_segmentList ) ) ) ; } | getter for segmentList - gets List of MMAX annotation segements that make up the MMAX annotation . | 153 | 22 |
20,475 | public void setSegmentList ( FSArray v ) { if ( MMAXAnnotation_Type . featOkTst && ( ( MMAXAnnotation_Type ) jcasType ) . casFeat_segmentList == null ) jcasType . jcas . throwFeatMissing ( "segmentList" , "de.julielab.jules.types.mmax.MMAXAnnotation" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_segmentList , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | setter for segmentList - sets List of MMAX annotation segements that make up the MMAX annotation . | 149 | 22 |
20,476 | public AnnotationSegment getSegmentList ( int i ) { if ( MMAXAnnotation_Type . featOkTst && ( ( MMAXAnnotation_Type ) jcasType ) . casFeat_segmentList == null ) jcasType . jcas . throwFeatMissing ( "segmentList" , "de.julielab.jules.types.mmax.MMAXAnnotation" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_segmentList ) , i ) ; return ( AnnotationSegment ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_segmentList ) , i ) ) ) ; } | indexed getter for segmentList - gets an indexed value - List of MMAX annotation segements that make up the MMAX annotation . | 232 | 28 |
20,477 | public void setSegmentList ( int i , AnnotationSegment v ) { if ( MMAXAnnotation_Type . featOkTst && ( ( MMAXAnnotation_Type ) jcasType ) . casFeat_segmentList == null ) jcasType . jcas . throwFeatMissing ( "segmentList" , "de.julielab.jules.types.mmax.MMAXAnnotation" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_segmentList ) , i ) ; jcasType . ll_cas . ll_setRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_segmentList ) , i , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | indexed setter for segmentList - sets an indexed value - List of MMAX annotation segements that make up the MMAX annotation . | 227 | 28 |
20,478 | public FSArray getAttributeList ( ) { if ( MMAXAnnotation_Type . featOkTst && ( ( MMAXAnnotation_Type ) jcasType ) . casFeat_attributeList == null ) jcasType . jcas . throwFeatMissing ( "attributeList" , "de.julielab.jules.types.mmax.MMAXAnnotation" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_attributeList ) ) ) ; } | getter for attributeList - gets List of attributes of the MMAX annotation . | 149 | 16 |
20,479 | public void setAttributeList ( FSArray v ) { if ( MMAXAnnotation_Type . featOkTst && ( ( MMAXAnnotation_Type ) jcasType ) . casFeat_attributeList == null ) jcasType . jcas . throwFeatMissing ( "attributeList" , "de.julielab.jules.types.mmax.MMAXAnnotation" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_attributeList , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | setter for attributeList - sets List of attributes of the MMAX annotation . | 145 | 16 |
20,480 | public MMAXAttribute getAttributeList ( int i ) { if ( MMAXAnnotation_Type . featOkTst && ( ( MMAXAnnotation_Type ) jcasType ) . casFeat_attributeList == null ) jcasType . jcas . throwFeatMissing ( "attributeList" , "de.julielab.jules.types.mmax.MMAXAnnotation" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_attributeList ) , i ) ; return ( MMAXAttribute ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_attributeList ) , i ) ) ) ; } | indexed getter for attributeList - gets an indexed value - List of attributes of the MMAX annotation . | 225 | 22 |
20,481 | public void setAttributeList ( int i , MMAXAttribute v ) { if ( MMAXAnnotation_Type . featOkTst && ( ( MMAXAnnotation_Type ) jcasType ) . casFeat_attributeList == null ) jcasType . jcas . throwFeatMissing ( "attributeList" , "de.julielab.jules.types.mmax.MMAXAnnotation" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_attributeList ) , i ) ; jcasType . ll_cas . ll_setRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_attributeList ) , i , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | indexed setter for attributeList - sets an indexed value - List of attributes of the MMAX annotation . | 221 | 22 |
20,482 | public FSArray getPointerList ( ) { if ( MMAXAnnotation_Type . featOkTst && ( ( MMAXAnnotation_Type ) jcasType ) . casFeat_pointerList == null ) jcasType . jcas . throwFeatMissing ( "pointerList" , "de.julielab.jules.types.mmax.MMAXAnnotation" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_pointerList ) ) ) ; } | getter for pointerList - gets The list of MMAX pointers of the MMAX annotation . | 150 | 19 |
20,483 | public void setPointerList ( FSArray v ) { if ( MMAXAnnotation_Type . featOkTst && ( ( MMAXAnnotation_Type ) jcasType ) . casFeat_pointerList == null ) jcasType . jcas . throwFeatMissing ( "pointerList" , "de.julielab.jules.types.mmax.MMAXAnnotation" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_pointerList , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | setter for pointerList - sets The list of MMAX pointers of the MMAX annotation . | 146 | 19 |
20,484 | public MMAXPointer getPointerList ( int i ) { if ( MMAXAnnotation_Type . featOkTst && ( ( MMAXAnnotation_Type ) jcasType ) . casFeat_pointerList == null ) jcasType . jcas . throwFeatMissing ( "pointerList" , "de.julielab.jules.types.mmax.MMAXAnnotation" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_pointerList ) , i ) ; return ( MMAXPointer ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_pointerList ) , i ) ) ) ; } | indexed getter for pointerList - gets an indexed value - The list of MMAX pointers of the MMAX annotation . | 228 | 25 |
20,485 | public void setPointerList ( int i , MMAXPointer v ) { if ( MMAXAnnotation_Type . featOkTst && ( ( MMAXAnnotation_Type ) jcasType ) . casFeat_pointerList == null ) jcasType . jcas . throwFeatMissing ( "pointerList" , "de.julielab.jules.types.mmax.MMAXAnnotation" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_pointerList ) , i ) ; jcasType . ll_cas . ll_setRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_pointerList ) , i , jcasType . ll_cas . ll_getFSRef ( v ) ) ; } | indexed setter for pointerList - sets an indexed value - The list of MMAX pointers of the MMAX annotation . | 223 | 25 |
20,486 | public String getAdaptedCoveredText ( ) { if ( MMAXAnnotation_Type . featOkTst && ( ( MMAXAnnotation_Type ) jcasType ) . casFeat_adaptedCoveredText == null ) jcasType . jcas . throwFeatMissing ( "adaptedCoveredText" , "de.julielab.jules.types.mmax.MMAXAnnotation" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_adaptedCoveredText ) ; } | getter for adaptedCoveredText - gets Text covered by the annotation . This feature is helpful if the annotations is discontinuous ... | 138 | 26 |
20,487 | public void setAdaptedCoveredText ( String v ) { if ( MMAXAnnotation_Type . featOkTst && ( ( MMAXAnnotation_Type ) jcasType ) . casFeat_adaptedCoveredText == null ) jcasType . jcas . throwFeatMissing ( "adaptedCoveredText" , "de.julielab.jules.types.mmax.MMAXAnnotation" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( MMAXAnnotation_Type ) jcasType ) . casFeatCode_adaptedCoveredText , v ) ; } | setter for adaptedCoveredText - sets Text covered by the annotation . This feature is helpful if the annotations is discontinuous ... | 141 | 26 |
20,488 | public void initializationComplete ( ) { if ( UIMAFramework . getLogger ( ) . isLoggable ( Level . CONFIG ) ) { UIMAFramework . getLogger ( this . getClass ( ) ) . logrb ( Level . CONFIG , this . getClass ( ) . getName ( ) , "process" , CPMUtils . CPM_LOG_RESOURCE_BUNDLE , "UIMA_CPM_cpm_init_complete__CONFIG" , new Object [ ] { Thread . currentThread ( ) . getName ( ) } ) ; } } | Called when the initialization is completed . | 131 | 8 |
20,489 | public synchronized void batchProcessComplete ( ) { if ( UIMAFramework . getLogger ( ) . isLoggable ( Level . FINEST ) ) { UIMAFramework . getLogger ( this . getClass ( ) ) . logrb ( Level . FINEST , this . getClass ( ) . getName ( ) , "process" , CPMUtils . CPM_LOG_RESOURCE_BUNDLE , "UIMA_CPM_method_ping__FINEST" , new Object [ ] { Thread . currentThread ( ) . getName ( ) } ) ; } } | Called when the batchProcessing is completed . | 131 | 10 |
20,490 | private TreeObject createDummyModel ( ) { TreeObject to1 = new TreeObject ( "Inbox" ) ; TreeObject to2 = new TreeObject ( "Drafts" ) ; TreeObject to3 = new TreeObject ( "Sent" ) ; TreeParent p1 = new TreeParent ( "me@this.com" ) ; p1 . addChild ( to1 ) ; p1 . addChild ( to2 ) ; p1 . addChild ( to3 ) ; TreeObject to4 = new TreeObject ( "Inbox" ) ; TreeParent p2 = new TreeParent ( "other@aol.com" ) ; p2 . addChild ( to4 ) ; TreeParent root = new TreeParent ( "" ) ; root . addChild ( p1 ) ; root . addChild ( p2 ) ; return root ; } | We will set up a dummy model to initialize tree heararchy . In real code you will connect to a real model and expose its hierarchy . | 179 | 28 |
20,491 | public static void runPipeline ( File scriptFile , List < String > cliArgs ) throws IOException , UIMAException , ParseException { if ( ! scriptFile . exists ( ) ) { throw new IOException ( "Script file does not exist (" + scriptFile . getAbsolutePath ( ) + ")" ) ; } LOG . info ( "Parsing pipeline script at '{}'" , scriptFile . getAbsolutePath ( ) + " \n with CLI parameters: " + join ( cliArgs , ", " ) ) ; Pipeline pipeline = null ; try { pipeline = PipelineScriptParser . parse ( scriptFile , cliArgs ) ; } catch ( ParseException e ) { throw new ParseException ( "\nERROR parsing '" + scriptFile . getName ( ) + "'\n" + e . getMessage ( ) + "\n(see the README.txt for the pipeline script format)" , e . getErrorOffset ( ) ) ; } LOG . info ( "Successfully parsed pipeline script, now starting pipeline..." ) ; LOG . info ( "*************************************************************" ) ; pipeline . run ( ) ; // will be printed if no exception. // used in pipeline tests, do not change System . out . println ( OK_MESSAGE ) ; } | Parse this pipeline and run it | 276 | 7 |
20,492 | public MaxentModel getModel ( ModelDomain domain ) { if ( map . containsKey ( domain ) ) { return ( MaxentModel ) map . get ( domain ) ; } else { throw new NoSuchElementException ( "No model has been created for " + "domain: " + domain ) ; } } | Get the model mapped to by the given ModelDomain key . | 65 | 12 |
20,493 | public String getBuilding ( ) { if ( RoomNumber_Type . featOkTst && ( ( RoomNumber_Type ) jcasType ) . casFeat_building == null ) jcasType . jcas . throwFeatMissing ( "building" , "org.apache.uima.examples.RoomNumber" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( RoomNumber_Type ) jcasType ) . casFeatCode_building ) ; } | getter for building - gets | 109 | 6 |
20,494 | public void setBuilding ( String v ) { if ( RoomNumber_Type . featOkTst && ( ( RoomNumber_Type ) jcasType ) . casFeat_building == null ) jcasType . jcas . throwFeatMissing ( "building" , "org.apache.uima.examples.RoomNumber" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( RoomNumber_Type ) jcasType ) . casFeatCode_building , v ) ; } | setter for building - sets | 112 | 6 |
20,495 | @ Deprecated ( /* Use script directly with appropriate paths */ ) public static AnalysisEngineDescription getBrainregionRules ( ) throws ResourceInitializationException { return createEngineDescription ( RutaEngine . class , // PARAM_MAIN_SCRIPT , "Main" , // PARAM_SCRIPT_PATHS , BRAIN_REGIONS_HOME + RESOURCES_PATH + "ruta" , // PARAM_RESOURCE_PATHS , LEXICON_HOME ) ; } | Many pre - and postprocessing needed see the tests | 106 | 10 |
20,496 | public static String cleanBlockText ( String text ) { // only keep text longer that 5 if ( text == null || text . length ( ) < 6 ) return null ; // only keep text longer that 5 if ( text . length ( ) < 6 ) { return null ; } // keep only 1st line int firstReturn = text . indexOf ( "\n" ) ; if ( firstReturn > - 1 ) { text = text . substring ( 0 , firstReturn ) ; } // remove double spaces text = text . replaceAll ( " +" , " " ) . trim ( ) ; // remove numbers at beg, tabs text = text . replaceAll ( "^\\d*" , "" ) . replaceAll ( "\t" , " " ) . trim ( ) ; // then, remove dot at beg if ( text . length ( ) > 0 && text . charAt ( 0 ) == ' ' ) { text = text . substring ( 1 ) . trim ( ) ; } // check that at least 50% of chars are letters double letters = 0 ; for ( int i = 0 ; i < text . length ( ) ; i ++ ) { if ( Character . isLetter ( text . charAt ( i ) ) ) letters ++ ; } if ( ( letters / ( text . length ( ) + 0d ) ) < 0.5d ) { return null ; } // stemming String stemmed = "" ; for ( String token : text . trim ( ) . split ( " " ) ) { stemmed += stemmer . stem ( token ) + " " ; } // trim at 30 chars String snippet = StringUtils . snippetize ( stemmed . trim ( ) , 30 ) ; return snippet . trim ( ) ; } | Used to identify block titles like Introduction References | 359 | 8 |
20,497 | public java . util . List < Sec > getSec ( ) { if ( sec == null ) { sec = new ArrayList < Sec > ( ) ; } return this . sec ; } | Gets the value of the sec property . | 39 | 9 |
20,498 | public java . util . List < Object > getNotesOrFnGroupOrGlossary ( ) { if ( notesOrFnGroupOrGlossary == null ) { notesOrFnGroupOrGlossary = new ArrayList < Object > ( ) ; } return this . notesOrFnGroupOrGlossary ; } | Gets the value of the notesOrFnGroupOrGlossary property . | 71 | 17 |
20,499 | public void addInstance ( String src , String id , String text ) { Instance inst = new Instance ( src , id , text ) ; ArrayList list = ( ArrayList ) sourceLists . get ( src ) ; if ( list == null ) { list = new ArrayList ( ) ; sourceLists . put ( src , list ) ; sourceNames . add ( src ) ; } list . add ( inst ) ; } | Add a single instance with given src and id to the datafile | 90 | 13 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.