idx int64 0 165k | question stringlengths 73 4.15k | target stringlengths 5 918 | len_question int64 21 890 | len_target int64 3 255 |
|---|---|---|---|---|
38,000 | public void setTense ( String v ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_tense == null ) jcasType . jcas . throwFeatMissing ( "tense" , "de.unihd.dbs.uima.types.heideltime.Event" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Event_Type ) jcasType ) . casFeatCode_tense , v ) ; } | setter for tense - sets | 120 | 6 |
38,001 | public void setToken ( Token v ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_token == null ) jcasType . jcas . throwFeatMissing ( "token" , "de.unihd.dbs.uima.types.heideltime.Event" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( Event_Type ) jcasType ) . casFeatCode_token , jcasType . l... | setter for token - sets | 131 | 6 |
38,002 | public void addTWord ( String word , String tag ) { TWord tword = new TWord ( word , tag ) ; sentence . add ( tword ) ; } | Adds the t word . | 36 | 5 |
38,003 | public void initialize ( Language language , String hunpos_path , String hunpos_model_path , Boolean annotateTokens , Boolean annotateSentences , Boolean annotatePOS ) { this . initialize ( new HunPosTaggerContext ( language , hunpos_path , hunpos_model_path , annotateTokens , annotateSentences , annotatePOS ) ) ; } | Initializes the wrapper with the given language and settings what to annotate . Sentences will not be annotated even if set to True unless POS annotation occurs . | 79 | 32 |
38,004 | public void initialize ( UimaContext aContext ) { annotate_tokens = ( Boolean ) aContext . getConfigParameterValue ( PARAM_ANNOTATE_TOKENS ) ; annotate_sentences = ( Boolean ) aContext . getConfigParameterValue ( PARAM_ANNOTATE_SENTENCES ) ; annotate_pos = ( Boolean ) aContext . getConfigParameterValue ( PARAM_ANNOTATE... | Initializes the wrapper from UIMA context . See other initialize method for parameters required within context . | 191 | 20 |
38,005 | public boolean init ( String modelDir ) { try { classifier = new Classification ( modelDir ) ; feaGen = new FeatureGenerator ( ) ; classifier . init ( ) ; return true ; } catch ( Exception e ) { System . out . println ( "Error while initilizing classifier: " + e . getMessage ( ) ) ; return false ; } } | Creates a new instance of JVnSenSegmenter . | 79 | 14 |
38,006 | public static void main ( String args [ ] ) { if ( args . length != 4 ) { displayHelp ( ) ; System . exit ( 1 ) ; } try { JVnSenSegmenter senSegmenter = new JVnSenSegmenter ( ) ; senSegmenter . init ( args [ 1 ] ) ; String option = args [ 2 ] ; if ( option . equalsIgnoreCase ( "-inputfile" ) ) { senSegmentFile ( args [... | main method of JVnSenSegmenter to use this tool from command line . | 314 | 18 |
38,007 | private static void senSegmentFile ( String infile , String outfile , JVnSenSegmenter senSegmenter ) { try { BufferedReader in = new BufferedReader ( new InputStreamReader ( new FileInputStream ( infile ) , "UTF-8" ) ) ; BufferedWriter out = new BufferedWriter ( new OutputStreamWriter ( new FileOutputStream ( outfile )... | Segment sentences . | 271 | 4 |
38,008 | public static void loadVietnameseDict ( String filename ) { try { FileInputStream in = new FileInputStream ( filename ) ; if ( hsVietnameseDict == null ) { hsVietnameseDict = new HashSet ( ) ; BufferedReader reader = new BufferedReader ( new InputStreamReader ( in , "UTF-8" ) ) ; String line ; while ( ( line = reader .... | Load vietnamese dict . | 203 | 6 |
38,009 | public static void loadViPersonalNames ( String filename ) { try { FileInputStream in = new FileInputStream ( filename ) ; if ( hsViFamilyNames == null ) { hsViFamilyNames = new HashSet ( ) ; hsViLastNames = new HashSet ( ) ; hsViMiddleNames = new HashSet ( ) ; BufferedReader reader = new BufferedReader ( new InputStre... | Load vi personal names . | 369 | 5 |
38,010 | public static void loadViLocationList ( String filename ) { try { FileInputStream in = new FileInputStream ( filename ) ; if ( hsViLocations == null ) { hsViLocations = new HashSet ( ) ; BufferedReader reader = new BufferedReader ( new InputStreamReader ( in , "UTF-8" ) ) ; String line ; while ( ( line = reader . readL... | Load vi location list . | 139 | 5 |
38,011 | public String getFilename ( ) { if ( Token_Type . featOkTst && ( ( Token_Type ) jcasType ) . casFeat_filename == null ) jcasType . jcas . throwFeatMissing ( "filename" , "de.unihd.dbs.uima.types.heideltime.Token" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_filenam... | getter for filename - gets | 113 | 6 |
38,012 | public int getTokenId ( ) { if ( Token_Type . featOkTst && ( ( Token_Type ) jcasType ) . casFeat_tokenId == null ) jcasType . jcas . throwFeatMissing ( "tokenId" , "de.unihd.dbs.uima.types.heideltime.Token" ) ; return jcasType . ll_cas . ll_getIntValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_tokenId ) ; } | getter for tokenId - gets | 117 | 7 |
38,013 | public void setTokenId ( int v ) { if ( Token_Type . featOkTst && ( ( Token_Type ) jcasType ) . casFeat_tokenId == null ) jcasType . jcas . throwFeatMissing ( "tokenId" , "de.unihd.dbs.uima.types.heideltime.Token" ) ; jcasType . ll_cas . ll_setIntValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_tokenId , v ) ; ... | setter for tokenId - sets | 120 | 7 |
38,014 | public void setSentId ( int v ) { if ( Token_Type . featOkTst && ( ( Token_Type ) jcasType ) . casFeat_sentId == null ) jcasType . jcas . throwFeatMissing ( "sentId" , "de.unihd.dbs.uima.types.heideltime.Token" ) ; jcasType . ll_cas . ll_setIntValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_sentId , v ) ; } | setter for sentId - sets | 120 | 7 |
38,015 | public String getPos ( ) { if ( Token_Type . featOkTst && ( ( Token_Type ) jcasType ) . casFeat_pos == null ) jcasType . jcas . throwFeatMissing ( "pos" , "de.unihd.dbs.uima.types.heideltime.Token" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_pos ) ; } | getter for pos - gets | 113 | 6 |
38,016 | public void setPos ( String v ) { if ( Token_Type . featOkTst && ( ( Token_Type ) jcasType ) . casFeat_pos == null ) jcasType . jcas . throwFeatMissing ( "pos" , "de.unihd.dbs.uima.types.heideltime.Token" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_pos , v ) ; } | setter for pos - sets | 116 | 6 |
38,017 | public String getEasterSunday ( int year , int days ) { int K = year / 100 ; int M = 15 + ( ( 3 * K + 3 ) / 4 ) - ( ( 8 * K + 13 ) / 25 ) ; int S = 2 - ( ( 3 * K + 3 ) / 4 ) ; int A = year % 19 ; int D = ( 19 * A + M ) % 30 ; int R = ( D / 29 ) + ( ( D / 28 ) - ( D / 29 ) * ( A / 11 ) ) ; int OG = 21 + D - R ; int SZ =... | Get the date of a day relative to Easter Sunday in a given year . Algorithm used is from the Physikalisch - Technische Bundesanstalt Braunschweig PTB . | 331 | 40 |
38,018 | public String getShroveTideWeekOrthodox ( int year ) { String easterOrthodox = getEasterSundayOrthodox ( year ) ; SimpleDateFormat formatter = new SimpleDateFormat ( "yyyy-MM-dd" ) ; try { Calendar calendar = Calendar . getInstance ( ) ; Date date = formatter . parse ( easterOrthodox ) ; calendar . setTime ( date ) ; c... | Get the date of the Shrove - Tide week in a given year | 204 | 15 |
38,019 | public String getWeekdayOfMonth ( int number , int weekday , int month , int year ) { return getWeekdayRelativeTo ( String . format ( "%04d-%02d-01" , year , month ) , weekday , number , true ) ; } | Get the date of a the first second third etc . weekday in a month | 57 | 15 |
38,020 | public boolean containsKey ( Object key ) { // the key is a direct hit from our cache if ( cache . containsKey ( key ) ) return true ; // the key is a direct hit from our hashmap if ( container . containsKey ( key ) ) return true ; // check if the requested key is a matching string of a regex key from our container Ite... | checks whether the cache or container contain a specific key then evaluates the container s keys as regexes and checks whether they match the specific key . | 145 | 28 |
38,021 | public boolean containsValue ( Object value ) { // the value is a direct hit from our cache if ( cache . containsValue ( value ) ) return true ; // the value is a direct hit from our hashmap if ( container . containsValue ( value ) ) return true ; // otherwise, the value isn't within this object return false ; } | checks whether a specific value is container within either container or cache | 70 | 12 |
38,022 | public Set < Entry < String , T > > entrySet ( ) { // prepare the container HashSet < Entry < String , T > > set = new HashSet < Entry < String , T > > ( ) ; // add the set from our container set . addAll ( container . entrySet ( ) ) ; // add the set from our cache set . addAll ( cache . entrySet ( ) ) ; return set ; } | returns a merged entryset containing within both the container and cache entrysets | 89 | 15 |
38,023 | public T get ( Object key ) { // output for requested key null is the value null; normal Map behavior if ( key == null ) return null ; T result = null ; if ( ( result = cache . get ( key ) ) != null ) { // if the requested key maps to a value in the cache return result ; } else if ( ( result = container . get ( key ) )... | checks whether the requested key has a direct match in either cache or container and if it doesn t also evaluates the container s keyset as regexes to match against the input key and if any of those methods yield a value returns that value if a value is found doing regex evaluation use that regex - key s match as a non... | 258 | 82 |
38,024 | public Set < String > keySet ( ) { // prepare container HashSet < String > set = new HashSet < String > ( ) ; // add container keys set . addAll ( container . keySet ( ) ) ; // add cache keys set . addAll ( cache . keySet ( ) ) ; return set ; } | returns the keysets of both the container and cache hashmaps | 67 | 13 |
38,025 | public T put ( String key , T value ) { return container . put ( key , value ) ; } | associates a key with a value in the container hashmap | 22 | 13 |
38,026 | public T putCache ( String key , T value ) { return cache . put ( key , value ) ; } | associates a key with a value in the cache hashmap . | 23 | 14 |
38,027 | public Collection < T > values ( ) { // prepare set HashSet < T > set = new HashSet < T > ( ) ; // add all container values set . addAll ( container . values ( ) ) ; // add all cache values set . addAll ( cache . values ( ) ) ; return set ; } | returns the combined collection of both the values of the container as well as the cache . | 66 | 18 |
38,028 | public PrintWriter openTrainLogFile ( ) { String filename = modelDir + File . separator + trainLogFile ; PrintWriter fout = null ; try { fout = new PrintWriter ( new OutputStreamWriter ( ( new FileOutputStream ( filename ) ) , "UTF-8" ) ) ; } catch ( IOException e ) { System . out . println ( e . toString ( ) ) ; retur... | Open train log file . | 95 | 5 |
38,029 | public BufferedReader openModelFile ( ) { String filename = modelDir + File . separator + modelFile ; BufferedReader fin = null ; try { fin = new BufferedReader ( new InputStreamReader ( new FileInputStream ( filename ) , "UTF-8" ) ) ; } catch ( IOException e ) { System . out . println ( e . toString ( ) ) ; return nul... | Open model file . | 91 | 4 |
38,030 | public void writeOptions ( PrintWriter fout ) { fout . println ( "OPTION VALUES:" ) ; fout . println ( "==============" ) ; fout . println ( "Model directory: " + modelDir ) ; fout . println ( "Model file: " + modelFile ) ; fout . println ( "Option file: " + optionFile ) ; fout . println ( "Training log file: " + train... | Write options . | 538 | 3 |
38,031 | public static String getXNextDay ( String date , Integer x ) { SimpleDateFormat formatter = new SimpleDateFormat ( "yyyy-MM-dd" ) ; String newDate = "" ; Calendar c = Calendar . getInstance ( ) ; try { c . setTime ( formatter . parse ( date ) ) ; c . add ( Calendar . DAY_OF_MONTH , x ) ; c . getTime ( ) ; newDate = for... | get the x - next day of date . | 131 | 9 |
38,032 | public static String getXNextWeek ( String date , Integer x , Language language ) { NormalizationManager nm = NormalizationManager . getInstance ( language , false ) ; String date_no_W = date . replace ( "W" , "" ) ; SimpleDateFormat formatter = new SimpleDateFormat ( "yyyy-w" ) ; String newDate = "" ; Calendar c = Cal... | get the x - next week of date | 206 | 8 |
38,033 | public static int getWeekdayOfDate ( String date ) { SimpleDateFormat formatter = new SimpleDateFormat ( "yyyy-MM-dd" ) ; int weekday = 0 ; Calendar c = Calendar . getInstance ( ) ; try { c . setTime ( formatter . parse ( date ) ) ; weekday = c . get ( Calendar . DAY_OF_WEEK ) ; } catch ( ParseException e ) { e . print... | Get the weekday of date | 104 | 5 |
38,034 | public static int getWeekOfDate ( String date ) { SimpleDateFormat formatter = new SimpleDateFormat ( "yyyy-MM-dd" ) ; int week = 0 ; ; Calendar c = Calendar . getInstance ( ) ; try { c . setTime ( formatter . parse ( date ) ) ; week = c . get ( Calendar . WEEK_OF_YEAR ) ; } catch ( ParseException e ) { e . printStackT... | Get the week of date | 104 | 5 |
38,035 | public static Locale getLocaleFromString ( String locale ) throws LocaleException { for ( Locale l : Locale . getAvailableLocales ( ) ) { if ( locale . toLowerCase ( ) . equals ( l . toString ( ) . toLowerCase ( ) ) ) { return l ; } } throw new LocaleException ( ) ; } | takes a desired locale input string iterates through available locales returns a locale object | 76 | 17 |
38,036 | public void allocateMemory ( int memorySize ) { this . memorySize = memorySize ; memory = new PairDblInt [ memorySize ] [ numLabels ] ; for ( int i = 0 ; i < memorySize ; i ++ ) { for ( int j = 0 ; j < numLabels ; j ++ ) { memory [ i ] [ j ] = new PairDblInt ( ) ; } } } | Allocate memory . | 87 | 4 |
38,037 | public void computeMi ( ) { Mi . assign ( 0.0 ) ; model . taggerFGen . startScanEFeatures ( ) ; while ( model . taggerFGen . hasNextEFeature ( ) ) { Feature f = model . taggerFGen . nextEFeature ( ) ; if ( f . ftype == Feature . EDGE_FEATURE1 ) { Mi . mtrx [ f . yp ] [ f . y ] += model . lambda [ f . idx ] * f . val ; ... | Compute mi . | 180 | 4 |
38,038 | public void computeVi ( List seq , int pos , DoubleVector Vi , boolean isExp ) { Vi . assign ( 0.0 ) ; // start scan features for sequence "seq" at position "pos" model . taggerFGen . startScanSFeaturesAt ( seq , pos ) ; // examine all features at position "pos" while ( model . taggerFGen . hasNextSFeature ( ) ) { Feat... | Compute vi . | 196 | 4 |
38,039 | public int findMax ( PairDblInt [ ] cols ) { int maxIdx = 0 ; double maxVal = - 1.0 ; for ( int i = 0 ; i < numLabels ; i ++ ) { if ( cols [ i ] . first > maxVal ) { maxVal = cols [ i ] . first ; maxIdx = i ; } } return maxIdx ; } | Find max . | 87 | 3 |
38,040 | public void viterbiInference ( List seq ) { int i , j , k ; int seqLen = seq . size ( ) ; if ( seqLen <= 0 ) { return ; } if ( memorySize < seqLen ) { allocateMemory ( seqLen ) ; } // compute Vi for the first position in the sequence computeVi ( seq , 0 , Vi , true ) ; for ( j = 0 ; j < numLabels ; j ++ ) { memory [ 0 ... | Viterbi inference . | 501 | 5 |
38,041 | private void tokenize ( JCas jcas ) { // read tokenized text to add tokens to the jcas Logger . printDetail ( component , "TreeTagger (tokenization) with: " + ttprops . abbFileName ) ; EnumSet < Flag > flags = Flag . getSet ( ttprops . languageSwitch ) ; TreeTaggerTokenizer ttt ; ttprops . abbFileName = "english-abbrev... | tokenizes a given JCas object s document text using the treetagger program and adds the recognized tokens to the JCas object . | 569 | 27 |
38,042 | private void tokenizeChinese ( JCas jcas ) { try { // read tokenized text to add tokens to the jcas Process proc = ttprops . getChineseTokenizationProcess ( ) ; Logger . printDetail ( component , "Chinese tokenization: " + ttprops . chineseTokenizerPath ) ; BufferedReader in = new BufferedReader ( new InputStreamReader... | tokenizes a given JCas object s document text using the chinese tokenization script and adds the recognized tokens to the JCas object . | 493 | 28 |
38,043 | public static void readAbbrList ( String dataFile , Map map ) throws IOException { BufferedReader fin = new BufferedReader ( new FileReader ( dataFile ) ) ; String line ; while ( ( line = fin . readLine ( ) ) != null ) { StringTokenizer strTok = new StringTokenizer ( line , " \t\r\n" ) ; if ( strTok . countTokens ( ) <... | Read abbr list . | 130 | 5 |
38,044 | public static List doFeatureGen ( Map map , String text , List markList , boolean label ) { markList . clear ( ) ; //Find out positions of .!? and store them in the markList int nextPos = 0 ; while ( ( nextPos = StringUtils . findFirstOf ( text , ".!?" , nextPos + 1 ) ) != - 1 ) markList . add ( new Integer ( nextPos )... | Generate context predicates for a specified text return string representing the context predicates . | 267 | 17 |
38,045 | public void initialize ( Language language , DocumentType typeToProcess , OutputType outputType , String configPath ) { initialize ( language , typeToProcess , outputType , configPath , POSTagger . TREETAGGER ) ; } | Method that initializes all vital prerequisites | 47 | 8 |
38,046 | private void runIntervalTagger ( JCas jcas ) { logger . log ( Level . FINEST , "Running Interval Tagger..." ) ; Integer beforeAnnotations = jcas . getAnnotationIndex ( ) . size ( ) ; // Prepare the options for IntervalTagger's execution Properties settings = new Properties ( ) ; settings . put ( IntervalTagger . PARAM_... | Runs the IntervalTagger on the JCAS object . | 234 | 13 |
38,047 | @ Deprecated public Process getTokenizationProcess ( File inputFile ) throws IOException { // assemble a command line for the tokenization script and execute it ArrayList < String > command = new ArrayList < String > ( ) ; command . add ( "perl" ) ; if ( this . utf8Switch != "" ) command . add ( this . utf8Switch ) ; c... | This method creates a process with some parameters for the tokenizer script . | 280 | 14 |
38,048 | public void readDict ( BufferedReader fin ) throws IOException { dict . clear ( ) ; String line ; // get dictionary size if ( ( line = fin . readLine ( ) ) == null ) { System . out . println ( "No dictionary size information" ) ; return ; } int dictSize = Integer . parseInt ( line ) ; if ( dictSize <= 0 ) { System . ou... | Read dict . | 499 | 3 |
38,049 | public void writeDict ( PrintWriter fout ) throws IOException { Iterator it = null ; int count = 0 ; for ( it = dict . keySet ( ) . iterator ( ) ; it . hasNext ( ) ; ) { Integer cpInt = ( Integer ) it . next ( ) ; Element elem = ( Element ) dict . get ( cpInt ) ; if ( elem . chosen == 1 ) { count ++ ; } } // write the ... | Write dict . | 393 | 3 |
38,050 | public void addDict ( int cp , int label , int count ) { Element elem = ( Element ) dict . get ( new Integer ( cp ) ) ; if ( elem == null ) { // if the context predicate is not found elem = new Element ( ) ; elem . count = count ; CountFIdx cntFIdx = new CountFIdx ( count , - 1 ) ; elem . lbCntFidxes . put ( new Intege... | Adds the dict . | 268 | 4 |
38,051 | public void generateDict ( ) { if ( data . trnData == null ) { System . out . println ( "No data available for generating dictionary" ) ; return ; } // scan all data observations of the training data for ( int i = 0 ; i < data . trnData . size ( ) ; i ++ ) { Observation obsr = ( Observation ) data . trnData . get ( i )... | Generate dict . | 136 | 4 |
38,052 | public static List < String > getTokens ( String sentence ) { //Token container List < String > tokens = new ArrayList < String > ( ) ; //Token building buffer StringBuilder buff = new StringBuilder ( ) ; for ( char c : sentence . toCharArray ( ) ) { //Spaces delimit tokens (if non-empty token) if ( buff . length ( ) >... | Takes a string and returns a List of all tokens contained within it . Any non - whitespace string of characters delimited by punctuation or whitespace is considered a token . Likewise every instance of a punctuation character is also a token . | 270 | 49 |
38,053 | public Integer addTokenAnnotation ( String tokenString , String fileId , Integer sentId , Integer tokId , Integer positionCounter , JCas jcas ) { Token token = new Token ( jcas ) ; if ( ! ( ( sentId == newTokSentNumber ) && ( tokId == newTokSentNumber ) ) ) { if ( USE_SPACES ) // in chinese, there are no spaces, so the... | Add token annotation to jcas | 210 | 6 |
38,054 | private Integer getNumberOfDocuments ( List < File > inputFiles ) throws ResourceInitializationException { String directory = ( String ) getConfigParameterValue ( PARAM_INPUTDIR ) ; String filename = directory + "/" + FILE_BASE_SEGMENTATION ; for ( File file : inputFiles ) { if ( file . getAbsolutePath ( ) . equals ( f... | count the number of different documents and save doc names in filenames | 225 | 14 |
38,055 | public int strId2Idx ( Map fmap ) { Integer idxInt = ( Integer ) fmap . get ( strId ) ; if ( idxInt != null ) { this . idx = idxInt . intValue ( ) ; } return this . idx ; } | Str id2 idx . | 61 | 6 |
38,056 | public int strId2IdxAdd ( Map fmap ) { strId2Idx ( fmap ) ; if ( idx < 0 ) { idx = fmap . size ( ) ; fmap . put ( strId , new Integer ( idx ) ) ; } return idx ; } | Str id2 idx add . | 64 | 7 |
38,057 | private void readRePatternResources ( ResourceMap hmResourcesRePattern , Boolean load_temponym_resources ) { ////////////////////////////////////// // READ REGULAR EXPRESSION PATTERNS // ////////////////////////////////////// InputStream is = null ; InputStreamReader isr = null ; BufferedReader br = null ; try { for ( ... | READ THE REPATTERN FROM THE FILES . The files have to be defined in the HashMap hmResourcesRePattern . | 791 | 27 |
38,058 | private void finalizeRePattern ( String name , String rePattern ) { // create correct regular expression rePattern = rePattern . replaceFirst ( "\\|" , "" ) ; /* this was added to reduce the danger of getting unusable groups from user-made repattern * files with group-producing parentheses (i.e. "(foo|bar)" while match... | Pattern containing regular expression is finalized i . e . created correctly and added to hmAllRePattern . | 162 | 21 |
38,059 | public int getSentId ( ) { if ( Timex3_Type . featOkTst && ( ( Timex3_Type ) jcasType ) . casFeat_sentId == null ) jcasType . jcas . throwFeatMissing ( "sentId" , "de.unihd.dbs.uima.types.heideltime.Timex3" ) ; return jcasType . ll_cas . ll_getIntValue ( addr , ( ( Timex3_Type ) jcasType ) . casFeatCode_sentId ) ; } | getter for sentId - gets | 125 | 7 |
38,060 | public int getFirstTokId ( ) { if ( Timex3_Type . featOkTst && ( ( Timex3_Type ) jcasType ) . casFeat_firstTokId == null ) jcasType . jcas . throwFeatMissing ( "firstTokId" , "de.unihd.dbs.uima.types.heideltime.Timex3" ) ; return jcasType . ll_cas . ll_getIntValue ( addr , ( ( Timex3_Type ) jcasType ) . casFeatCode_fir... | getter for firstTokId - gets | 129 | 8 |
38,061 | public void setFirstTokId ( int v ) { if ( Timex3_Type . featOkTst && ( ( Timex3_Type ) jcasType ) . casFeat_firstTokId == null ) jcasType . jcas . throwFeatMissing ( "firstTokId" , "de.unihd.dbs.uima.types.heideltime.Timex3" ) ; jcasType . ll_cas . ll_setIntValue ( addr , ( ( Timex3_Type ) jcasType ) . casFeatCode_fir... | setter for firstTokId - sets | 132 | 8 |
38,062 | public String getAllTokIds ( ) { if ( Timex3_Type . featOkTst && ( ( Timex3_Type ) jcasType ) . casFeat_allTokIds == null ) jcasType . jcas . throwFeatMissing ( "allTokIds" , "de.unihd.dbs.uima.types.heideltime.Timex3" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex3_Type ) jcasType ) . casFeatCode_... | getter for allTokIds - gets | 133 | 9 |
38,063 | public void setAllTokIds ( String v ) { if ( Timex3_Type . featOkTst && ( ( Timex3_Type ) jcasType ) . casFeat_allTokIds == null ) jcasType . jcas . throwFeatMissing ( "allTokIds" , "de.unihd.dbs.uima.types.heideltime.Timex3" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Timex3_Type ) jcasType ) . casFeatCode_... | setter for allTokIds - sets | 136 | 9 |
38,064 | public int getTimexInstance ( ) { if ( Timex3_Type . featOkTst && ( ( Timex3_Type ) jcasType ) . casFeat_timexInstance == null ) jcasType . jcas . throwFeatMissing ( "timexInstance" , "de.unihd.dbs.uima.types.heideltime.Timex3" ) ; return jcasType . ll_cas . ll_getIntValue ( addr , ( ( Timex3_Type ) jcasType ) . casFea... | getter for timexInstance - gets | 129 | 8 |
38,065 | public void setTimexInstance ( int v ) { if ( Timex3_Type . featOkTst && ( ( Timex3_Type ) jcasType ) . casFeat_timexInstance == null ) jcasType . jcas . throwFeatMissing ( "timexInstance" , "de.unihd.dbs.uima.types.heideltime.Timex3" ) ; jcasType . ll_cas . ll_setIntValue ( addr , ( ( Timex3_Type ) jcasType ) . casFea... | setter for timexInstance - sets | 132 | 8 |
38,066 | public String getTimexType ( ) { if ( Timex3_Type . featOkTst && ( ( Timex3_Type ) jcasType ) . casFeat_timexType == null ) jcasType . jcas . throwFeatMissing ( "timexType" , "de.unihd.dbs.uima.types.heideltime.Timex3" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex3_Type ) jcasType ) . casFeatCode_... | getter for timexType - gets | 129 | 8 |
38,067 | public void setTimexType ( String v ) { if ( Timex3_Type . featOkTst && ( ( Timex3_Type ) jcasType ) . casFeat_timexType == null ) jcasType . jcas . throwFeatMissing ( "timexType" , "de.unihd.dbs.uima.types.heideltime.Timex3" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Timex3_Type ) jcasType ) . casFeatCode_... | setter for timexType - sets | 132 | 8 |
38,068 | public String getTimexValue ( ) { if ( Timex3_Type . featOkTst && ( ( Timex3_Type ) jcasType ) . casFeat_timexValue == null ) jcasType . jcas . throwFeatMissing ( "timexValue" , "de.unihd.dbs.uima.types.heideltime.Timex3" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex3_Type ) jcasType ) . casFeatCo... | getter for timexValue - gets | 129 | 8 |
38,069 | public void setTimexValue ( String v ) { if ( Timex3_Type . featOkTst && ( ( Timex3_Type ) jcasType ) . casFeat_timexValue == null ) jcasType . jcas . throwFeatMissing ( "timexValue" , "de.unihd.dbs.uima.types.heideltime.Timex3" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Timex3_Type ) jcasType ) . casFeatCo... | setter for timexValue - sets | 132 | 8 |
38,070 | public String getFoundByRule ( ) { if ( Timex3_Type . featOkTst && ( ( Timex3_Type ) jcasType ) . casFeat_foundByRule == null ) jcasType . jcas . throwFeatMissing ( "foundByRule" , "de.unihd.dbs.uima.types.heideltime.Timex3" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex3_Type ) jcasType ) . casFea... | getter for foundByRule - gets | 129 | 8 |
38,071 | public void setFoundByRule ( String v ) { if ( Timex3_Type . featOkTst && ( ( Timex3_Type ) jcasType ) . casFeat_foundByRule == null ) jcasType . jcas . throwFeatMissing ( "foundByRule" , "de.unihd.dbs.uima.types.heideltime.Timex3" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Timex3_Type ) jcasType ) . casFea... | setter for foundByRule - sets | 132 | 8 |
38,072 | public String getTimexQuant ( ) { if ( Timex3_Type . featOkTst && ( ( Timex3_Type ) jcasType ) . casFeat_timexQuant == null ) jcasType . jcas . throwFeatMissing ( "timexQuant" , "de.unihd.dbs.uima.types.heideltime.Timex3" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex3_Type ) jcasType ) . casFeatCo... | getter for timexQuant - gets | 129 | 8 |
38,073 | public void setTimexQuant ( String v ) { if ( Timex3_Type . featOkTst && ( ( Timex3_Type ) jcasType ) . casFeat_timexQuant == null ) jcasType . jcas . throwFeatMissing ( "timexQuant" , "de.unihd.dbs.uima.types.heideltime.Timex3" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Timex3_Type ) jcasType ) . casFeatCo... | setter for timexQuant - sets | 132 | 8 |
38,074 | public String getTimexFreq ( ) { if ( Timex3_Type . featOkTst && ( ( Timex3_Type ) jcasType ) . casFeat_timexFreq == null ) jcasType . jcas . throwFeatMissing ( "timexFreq" , "de.unihd.dbs.uima.types.heideltime.Timex3" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex3_Type ) jcasType ) . casFeatCode_... | getter for timexFreq - gets | 133 | 9 |
38,075 | public void setTimexFreq ( String v ) { if ( Timex3_Type . featOkTst && ( ( Timex3_Type ) jcasType ) . casFeat_timexFreq == null ) jcasType . jcas . throwFeatMissing ( "timexFreq" , "de.unihd.dbs.uima.types.heideltime.Timex3" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Timex3_Type ) jcasType ) . casFeatCode_... | setter for timexFreq - sets | 136 | 9 |
38,076 | public String getTimexMod ( ) { if ( Timex3_Type . featOkTst && ( ( Timex3_Type ) jcasType ) . casFeat_timexMod == null ) jcasType . jcas . throwFeatMissing ( "timexMod" , "de.unihd.dbs.uima.types.heideltime.Timex3" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex3_Type ) jcasType ) . casFeatCode_tim... | getter for timexMod - gets | 129 | 8 |
38,077 | public void setTimexMod ( String v ) { if ( Timex3_Type . featOkTst && ( ( Timex3_Type ) jcasType ) . casFeat_timexMod == null ) jcasType . jcas . throwFeatMissing ( "timexMod" , "de.unihd.dbs.uima.types.heideltime.Timex3" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Timex3_Type ) jcasType ) . casFeatCode_tim... | setter for timexMod - sets | 132 | 8 |
38,078 | public void generateFeatures ( ) { if ( features != null ) { features . clear ( ) ; } else { features = new ArrayList ( ) ; } if ( fmap != null ) { fmap . clear ( ) ; } else { fmap = new HashMap ( ) ; } if ( currentFeatures != null ) { currentFeatures . clear ( ) ; } else { currentFeatures = new ArrayList ( ) ; } if ( ... | Generate features . | 487 | 4 |
38,079 | public void readFeatures ( BufferedReader fin ) throws IOException { if ( features != null ) { features . clear ( ) ; } else { features = new ArrayList ( ) ; } if ( fmap != null ) { fmap . clear ( ) ; } else { fmap = new HashMap ( ) ; } if ( currentFeatures != null ) { currentFeatures . clear ( ) ; } else { currentFeat... | Read features . | 469 | 3 |
38,080 | public void writeFeatures ( PrintWriter fout ) throws IOException { // write the number of features fout . println ( Integer . toString ( features . size ( ) ) ) ; for ( int i = 0 ; i < features . size ( ) ; i ++ ) { Feature f = ( Feature ) features . get ( i ) ; fout . println ( f . toString ( data . cpInt2Str , data ... | Write features . | 119 | 3 |
38,081 | public void startScanFeatures ( Observation obsr ) { currentFeatures . clear ( ) ; currentFeatureIdx = 0 ; // scan over all context predicates for ( int i = 0 ; i < obsr . cps . length ; i ++ ) { Element elem = ( Element ) dict . dict . get ( new Integer ( obsr . cps [ i ] ) ) ; if ( elem == null ) { //this context pre... | Start scan features . | 327 | 4 |
38,082 | public String classify ( String cps ) { // cps contains a list of context predicates String modelLabel = "" ; int i ; intCps . clear ( ) ; StringTokenizer strTok = new StringTokenizer ( cps , " \t\r\n" ) ; int count = strTok . countTokens ( ) ; for ( i = 0 ; i < count ; i ++ ) { String cpStr = strTok . nextToken ( ) ; ... | classify an observation . | 208 | 5 |
38,083 | public List classify ( List data ) { List list = new ArrayList ( ) ; for ( int i = 0 ; i < data . size ( ) ; i ++ ) { list . add ( classify ( ( String ) data . get ( i ) ) ) ; } return list ; } | classify a list of observation . | 59 | 7 |
38,084 | public void registerProcessor ( String processor , Priority prio ) { this . processorNames . get ( prio ) . add ( processor ) ; } | method to register a processor | 31 | 5 |
38,085 | public void initializeAllProcessors ( UimaContext aContext ) { for ( Priority prio : processorNames . keySet ( ) ) { for ( String pn : processorNames . get ( prio ) ) { try { Class < ? > c = Class . forName ( pn ) ; GenericProcessor p = ( GenericProcessor ) c . newInstance ( ) ; p . initialize ( aContext ) ; processors... | Based on reflection this method instantiates and initializes all of the registered Processors . | 167 | 17 |
38,086 | public void executeProcessors ( JCas jcas , ProcessorManager . Priority prio ) { if ( ! this . initialized ) { Logger . printError ( component , "Unable to execute Processors; initialization was not concluded successfully." ) ; System . exit ( - 1 ) ; } LinkedList < GenericProcessor > myList = processors . get ( prio )... | Based on reflection this method instantiates and executes all of the registered Processors . | 169 | 16 |
38,087 | public String getTimexValueEB ( ) { if ( Timex3Interval_Type . featOkTst && ( ( Timex3Interval_Type ) jcasType ) . casFeat_TimexValueEB == null ) jcasType . jcas . throwFeatMissing ( "TimexValueEB" , "de.unihd.dbs.uima.types.heideltime.Timex3Interval" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex3... | getter for TimexValueEB - gets | 141 | 9 |
38,088 | public void setTimexValueEB ( String v ) { if ( Timex3Interval_Type . featOkTst && ( ( Timex3Interval_Type ) jcasType ) . casFeat_TimexValueEB == null ) jcasType . jcas . throwFeatMissing ( "TimexValueEB" , "de.unihd.dbs.uima.types.heideltime.Timex3Interval" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Timex3... | setter for TimexValueEB - sets | 144 | 9 |
38,089 | public String getTimexValueLE ( ) { if ( Timex3Interval_Type . featOkTst && ( ( Timex3Interval_Type ) jcasType ) . casFeat_TimexValueLE == null ) jcasType . jcas . throwFeatMissing ( "TimexValueLE" , "de.unihd.dbs.uima.types.heideltime.Timex3Interval" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex3... | getter for TimexValueLE - gets | 141 | 9 |
38,090 | public void setTimexValueLE ( String v ) { if ( Timex3Interval_Type . featOkTst && ( ( Timex3Interval_Type ) jcasType ) . casFeat_TimexValueLE == null ) jcasType . jcas . throwFeatMissing ( "TimexValueLE" , "de.unihd.dbs.uima.types.heideltime.Timex3Interval" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Timex3... | setter for TimexValueLE - sets | 144 | 9 |
38,091 | public String getTimexValueEE ( ) { if ( Timex3Interval_Type . featOkTst && ( ( Timex3Interval_Type ) jcasType ) . casFeat_TimexValueEE == null ) jcasType . jcas . throwFeatMissing ( "TimexValueEE" , "de.unihd.dbs.uima.types.heideltime.Timex3Interval" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex3... | getter for TimexValueEE - gets | 141 | 9 |
38,092 | public void setTimexValueEE ( String v ) { if ( Timex3Interval_Type . featOkTst && ( ( Timex3Interval_Type ) jcasType ) . casFeat_TimexValueEE == null ) jcasType . jcas . throwFeatMissing ( "TimexValueEE" , "de.unihd.dbs.uima.types.heideltime.Timex3Interval" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Timex3... | setter for TimexValueEE - sets | 144 | 9 |
38,093 | public String getTimexValueLB ( ) { if ( Timex3Interval_Type . featOkTst && ( ( Timex3Interval_Type ) jcasType ) . casFeat_TimexValueLB == null ) jcasType . jcas . throwFeatMissing ( "TimexValueLB" , "de.unihd.dbs.uima.types.heideltime.Timex3Interval" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex3... | getter for TimexValueLB - gets | 141 | 9 |
38,094 | public void setTimexValueLB ( String v ) { if ( Timex3Interval_Type . featOkTst && ( ( Timex3Interval_Type ) jcasType ) . casFeat_TimexValueLB == null ) jcasType . jcas . throwFeatMissing ( "TimexValueLB" , "de.unihd.dbs.uima.types.heideltime.Timex3Interval" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Timex3... | setter for TimexValueLB - sets | 144 | 9 |
38,095 | public String getEmptyValue ( ) { if ( Timex3Interval_Type . featOkTst && ( ( Timex3Interval_Type ) jcasType ) . casFeat_emptyValue == null ) jcasType . jcas . throwFeatMissing ( "emptyValue" , "de.unihd.dbs.uima.types.heideltime.Timex3Interval" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex3Interv... | getter for emptyValue - gets | 133 | 7 |
38,096 | public void setEmptyValue ( String v ) { if ( Timex3Interval_Type . featOkTst && ( ( Timex3Interval_Type ) jcasType ) . casFeat_emptyValue == null ) jcasType . jcas . throwFeatMissing ( "emptyValue" , "de.unihd.dbs.uima.types.heideltime.Timex3Interval" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Timex3Interv... | setter for emptyValue - sets | 136 | 7 |
38,097 | public String getBeginTimex ( ) { if ( Timex3Interval_Type . featOkTst && ( ( Timex3Interval_Type ) jcasType ) . casFeat_beginTimex == null ) jcasType . jcas . throwFeatMissing ( "beginTimex" , "de.unihd.dbs.uima.types.heideltime.Timex3Interval" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex3Interv... | getter for beginTimex - gets | 137 | 8 |
38,098 | public void setBeginTimex ( String v ) { if ( Timex3Interval_Type . featOkTst && ( ( Timex3Interval_Type ) jcasType ) . casFeat_beginTimex == null ) jcasType . jcas . throwFeatMissing ( "beginTimex" , "de.unihd.dbs.uima.types.heideltime.Timex3Interval" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Timex3Interv... | setter for beginTimex - sets | 140 | 8 |
38,099 | public String getEndTimex ( ) { if ( Timex3Interval_Type . featOkTst && ( ( Timex3Interval_Type ) jcasType ) . casFeat_endTimex == null ) jcasType . jcas . throwFeatMissing ( "endTimex" , "de.unihd.dbs.uima.types.heideltime.Timex3Interval" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex3Interval_Typ... | getter for endTimex - gets | 137 | 8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.