idx int64 0 41.2k | question stringlengths 74 4.04k | target stringlengths 7 750 |
|---|---|---|
20,300 | public void setHighLevelMeta ( int i ) { String meta = "<Table>\n" ; meta = meta + "<pageNumInDoc>" + ( i + 1 ) + "</pageNumInDoc>\n" ; m_caption = replaceAllSpecialChracters ( m_caption ) ; meta = meta + "<TableCaption>" + m_caption + "</TableCaption>\n" ; String location = "" ; if ( m_topCaptionLocation ) location = ... | Sets the high - level table metadata |
20,301 | public void setEmptyMetadataStructureLevel ( int YNum , int cc , List < TextPiece > wordsOfAPage , DocInfo m_docInfo ) { String meta = "" ; meta = "<TableColumnHeading>\n" + "</TableColumnHeading>" + "\n" ; meta = meta + "<TableContent>\n" ; meta = meta + "</TableContent>" + "\n" ; meta = meta + "<TableRowHeading>" + "... | Sets an empty metadata file |
20,302 | public static String replaceAllSpecialChracters ( String toBeReplaced ) { toBeReplaced = toBeReplaced . replaceAll ( "&" , "&" ) ; toBeReplaced = toBeReplaced . replaceAll ( "<" , "<" ) ; toBeReplaced = toBeReplaced . replaceAll ( ">" , ">" ) ; toBeReplaced = toBeReplaced . replaceAll ( "\"" , """ ) ; to... | Replaces all special characters in a given string |
20,303 | public void addPreviousPunctuation ( Parse punct ) { if ( this . prevPunctSet == null ) { this . prevPunctSet = new LinkedHashSet ( ) ; } prevPunctSet . add ( punct ) ; } | Designates that the specifed punctuation should is prior to this parse . |
20,304 | public void addNextPunctuation ( Parse punct ) { if ( this . nextPunctSet == null ) { this . nextPunctSet = new LinkedHashSet ( ) ; } nextPunctSet . add ( punct ) ; } | Designates that the specifed punctuation follows this parse . |
20,305 | public void insert ( final Parse constituent ) { Span ic = constituent . span ; if ( span . contains ( ic ) ) { int pi = 0 ; int pn = parts . size ( ) ; for ( ; pi < pn ; pi ++ ) { Parse subPart = ( Parse ) parts . get ( pi ) ; Span sp = subPart . span ; if ( sp . getStart ( ) >= ic . getEnd ( ) ) { break ; } else if (... | Inserts the specified constituent into this parse based on its text span . This method assumes that the specified constituent can be inserted into this parse . |
20,306 | public double getTagSequenceProb ( ) { if ( parts . size ( ) == 1 && ( ( Parse ) parts . get ( 0 ) ) . type . equals ( ParserME . TOK_NODE ) ) { return ( Math . log ( prob ) ) ; } else if ( parts . size ( ) == 0 ) { System . err . println ( "Parse.getTagSequenceProb: Wrong base case!" ) ; return ( 0.0 ) ; } else { doub... | Returns the probability associed with the pos - tag sequence assigned to this parse . |
20,307 | public void updateHeads ( HeadRules rules ) { if ( parts != null && parts . size ( ) != 0 ) { for ( int pi = 0 , pn = parts . size ( ) ; pi < pn ; pi ++ ) { Parse c = ( Parse ) parts . get ( pi ) ; c . updateHeads ( rules ) ; } this . head = rules . getHead ( ( Parse [ ] ) parts . toArray ( new Parse [ parts . size ( )... | Computes the head parses for this parse and its sub - parses and stores this information in the parse data structure . |
20,308 | public boolean isPosTag ( ) { return ( parts . size ( ) == 1 && ( ( Parse ) parts . get ( 0 ) ) . getType ( ) . equals ( ParserME . TOK_NODE ) ) ; } | Indicates wether this parse node is a pos - tag . |
20,309 | public Parse getCommonParent ( Parse node ) { if ( this == node ) { return parent ; } Set parents = new HashSet ( ) ; Parse cparent = this ; while ( cparent != null ) { parents . add ( cparent ) ; cparent = cparent . getParent ( ) ; } while ( node != null ) { if ( parents . contains ( node ) ) { return node ; } node = ... | Returns the deepest shared parent of this node and the specified node . If the nodes are identical then their parent is returned . If one node is the parent of the other then the parent node is returned . |
20,310 | protected int countCorrectPairs ( MatchData data ) { Map counter = new HashMap ( ) ; for ( int i = 0 ; i < data . numSources ( ) ; i ++ ) { String src = data . getSource ( i ) ; for ( int j = 0 ; j < data . numInstances ( src ) ; j ++ ) { String id = data . getInstance ( src , j ) . getId ( ) ; if ( id != null ) { IdKe... | Compute number of correct pairs betwn src1 and src2 where src2 > src1 |
20,311 | protected void loadGrams ( DataInputStream input ) throws IOException { gramSet = new HashSet ( ) ; try { while ( true ) { int gramLength = input . readInt ( ) ; int [ ] words = new int [ gramLength ] ; for ( int wi = 0 ; wi < gramLength ; wi ++ ) { words [ wi ] = input . readInt ( ) ; } gramSet . add ( new NGram ( wor... | Loads the contents of the specified input stream into this dictionary . |
20,312 | public boolean contains ( String [ ] words ) { if ( words . length == 1 ) { return wordMap . contains ( words [ 0 ] ) ; } else { NGram ngram = nGramFactory . createNGram ( words ) ; if ( ngram == null ) { return false ; } else { return gramSet . contains ( ngram ) ; } } } | Returns true if this dictionary contains the n - gram consisting of the specified words . |
20,313 | public static void main ( String [ ] args ) throws IOException { if ( args . length == 0 ) { System . err . println ( "Usage: Dictionary dictionary_file" ) ; System . exit ( 0 ) ; } Dictionary dict = new Dictionary ( args [ 0 ] ) ; BufferedReader in = new BufferedReader ( new InputStreamReader ( System . in ) ) ; Strin... | Allows a dictionery to be queried for specific n - grams from the command - line from statndard in using space delimited n - grams on a single line . |
20,314 | public Title getSectionHeading ( ) { if ( Section_Type . featOkTst && ( ( Section_Type ) jcasType ) . casFeat_sectionHeading == null ) jcasType . jcas . throwFeatMissing ( "sectionHeading" , "de.julielab.jules.types.Section" ) ; return ( Title ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ... | getter for sectionHeading - gets the title of the section |
20,315 | public void setSectionHeading ( Title v ) { if ( Section_Type . featOkTst && ( ( Section_Type ) jcasType ) . casFeat_sectionHeading == null ) jcasType . jcas . throwFeatMissing ( "sectionHeading" , "de.julielab.jules.types.Section" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( Section_Type ) jcasType ) . casFeatC... | setter for sectionHeading - sets the title of the section |
20,316 | public String getSectionId ( ) { if ( Section_Type . featOkTst && ( ( Section_Type ) jcasType ) . casFeat_sectionId == null ) jcasType . jcas . throwFeatMissing ( "sectionId" , "de.julielab.jules.types.Section" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Section_Type ) jcasType ) . casFeatCode_section... | getter for sectionId - gets the id of the section for example as mentioned in the original file or level of the section |
20,317 | public void setSectionId ( String v ) { if ( Section_Type . featOkTst && ( ( Section_Type ) jcasType ) . casFeat_sectionId == null ) jcasType . jcas . throwFeatMissing ( "sectionId" , "de.julielab.jules.types.Section" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Section_Type ) jcasType ) . casFeatCode_section... | setter for sectionId - sets the id of the section for example as mentioned in the original file or level of the section |
20,318 | final public void train ( StringWrapperIterator i ) { Set seenTokens = new HashSet ( ) ; while ( i . hasNext ( ) ) { StringWrapper s = ( StringWrapper ) i . next ( ) ; BagOfTokens bag = asBagOfTokens ( i . nextStringWrapper ( ) ) ; for ( Iterator j = bag . tokenIterator ( ) ; j . hasNext ( ) ; ) { Token tokj = ( Token ... | Accumulate statistics on how often each token occurs . |
20,319 | final public StringWrapper prepare ( String s ) { BagOfTokens bag = new BagOfTokens ( s , tokenizer . tokenize ( s ) ) ; double totalWeight = bag . getTotalWeight ( ) ; for ( Iterator i = bag . tokenIterator ( ) ; i . hasNext ( ) ; ) { Token tok = ( Token ) i . next ( ) ; double freq = bag . getWeight ( tok ) ; bag . s... | Preprocess a string by finding tokens and giving them weights W such that W is the smoothed probability of the token appearing in the document . |
20,320 | protected double backgroundProb ( Token tok ) { Integer freqInteger = ( Integer ) backgroundFrequency . get ( tok ) ; double freq = freqInteger == null ? 0 : freqInteger . intValue ( ) ; return freq / totalTokens ; } | Probability of token in the background language model |
20,321 | final public double score ( StringWrapper s , StringWrapper t ) { BagOfTokens sBag = ( BagOfTokens ) s ; BagOfTokens tBag = ( BagOfTokens ) t ; double sum = 0 ; for ( Iterator i = sBag . tokenIterator ( ) ; i . hasNext ( ) ; ) { Token tok = ( Token ) i . next ( ) ; if ( tBag . contains ( tok ) ) { double ps = sBag . ge... | Jensen - Shannon distance between distributions . |
20,322 | public void prepare ( StringDistance [ ] innerDistances ) { if ( ! fieldsPrepared ) { for ( int i = 0 ; i < size ( ) ; i ++ ) { StringDistance d = innerDistances [ getDistanceLearnerIndex ( i ) ] ; set ( i , d . prepare ( get ( i ) . unwrap ( ) ) ) ; } } } | Prepare each field with the appropriate distance |
20,323 | public String getMod ( ) { if ( Timex2_Type . featOkTst && ( ( Timex2_Type ) jcasType ) . casFeat_mod == null ) jcasType . jcas . throwFeatMissing ( "mod" , "de.julielab.jules.types.ace.Timex2" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex2_Type ) jcasType ) . casFeatCode_mod ) ; } | getter for mod - gets |
20,324 | public void setMod ( String v ) { if ( Timex2_Type . featOkTst && ( ( Timex2_Type ) jcasType ) . casFeat_mod == null ) jcasType . jcas . throwFeatMissing ( "mod" , "de.julielab.jules.types.ace.Timex2" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Timex2_Type ) jcasType ) . casFeatCode_mod , v ) ; } | setter for mod - sets |
20,325 | public String getComment ( ) { if ( Timex2_Type . featOkTst && ( ( Timex2_Type ) jcasType ) . casFeat_comment == null ) jcasType . jcas . throwFeatMissing ( "comment" , "de.julielab.jules.types.ace.Timex2" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex2_Type ) jcasType ) . casFeatCode_comment ) ; } | getter for comment - gets |
20,326 | public void setComment ( String v ) { if ( Timex2_Type . featOkTst && ( ( Timex2_Type ) jcasType ) . casFeat_comment == null ) jcasType . jcas . throwFeatMissing ( "comment" , "de.julielab.jules.types.ace.Timex2" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Timex2_Type ) jcasType ) . casFeatCode_comment , v )... | setter for comment - sets |
20,327 | public String getAnchor_val ( ) { if ( Timex2_Type . featOkTst && ( ( Timex2_Type ) jcasType ) . casFeat_anchor_val == null ) jcasType . jcas . throwFeatMissing ( "anchor_val" , "de.julielab.jules.types.ace.Timex2" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex2_Type ) jcasType ) . casFeatCode_anch... | getter for anchor_val - gets |
20,328 | public void setAnchor_val ( String v ) { if ( Timex2_Type . featOkTst && ( ( Timex2_Type ) jcasType ) . casFeat_anchor_val == null ) jcasType . jcas . throwFeatMissing ( "anchor_val" , "de.julielab.jules.types.ace.Timex2" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Timex2_Type ) jcasType ) . casFeatCode_anch... | setter for anchor_val - sets |
20,329 | public String getVal ( ) { if ( Timex2_Type . featOkTst && ( ( Timex2_Type ) jcasType ) . casFeat_val == null ) jcasType . jcas . throwFeatMissing ( "val" , "de.julielab.jules.types.ace.Timex2" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex2_Type ) jcasType ) . casFeatCode_val ) ; } | getter for val - gets |
20,330 | public void setVal ( String v ) { if ( Timex2_Type . featOkTst && ( ( Timex2_Type ) jcasType ) . casFeat_val == null ) jcasType . jcas . throwFeatMissing ( "val" , "de.julielab.jules.types.ace.Timex2" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Timex2_Type ) jcasType ) . casFeatCode_val , v ) ; } | setter for val - sets |
20,331 | public String getSet ( ) { if ( Timex2_Type . featOkTst && ( ( Timex2_Type ) jcasType ) . casFeat_set == null ) jcasType . jcas . throwFeatMissing ( "set" , "de.julielab.jules.types.ace.Timex2" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex2_Type ) jcasType ) . casFeatCode_set ) ; } | getter for set - gets |
20,332 | public void setSet ( String v ) { if ( Timex2_Type . featOkTst && ( ( Timex2_Type ) jcasType ) . casFeat_set == null ) jcasType . jcas . throwFeatMissing ( "set" , "de.julielab.jules.types.ace.Timex2" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Timex2_Type ) jcasType ) . casFeatCode_set , v ) ; } | setter for set - sets |
20,333 | public String getNon_specific ( ) { if ( Timex2_Type . featOkTst && ( ( Timex2_Type ) jcasType ) . casFeat_non_specific == null ) jcasType . jcas . throwFeatMissing ( "non_specific" , "de.julielab.jules.types.ace.Timex2" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex2_Type ) jcasType ) . casFeatCod... | getter for non_specific - gets |
20,334 | public void setNon_specific ( String v ) { if ( Timex2_Type . featOkTst && ( ( Timex2_Type ) jcasType ) . casFeat_non_specific == null ) jcasType . jcas . throwFeatMissing ( "non_specific" , "de.julielab.jules.types.ace.Timex2" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Timex2_Type ) jcasType ) . casFeatCod... | setter for non_specific - sets |
20,335 | public String getAnchor_dir ( ) { if ( Timex2_Type . featOkTst && ( ( Timex2_Type ) jcasType ) . casFeat_anchor_dir == null ) jcasType . jcas . throwFeatMissing ( "anchor_dir" , "de.julielab.jules.types.ace.Timex2" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex2_Type ) jcasType ) . casFeatCode_anch... | getter for anchor_dir - gets |
20,336 | public void setAnchor_dir ( String v ) { if ( Timex2_Type . featOkTst && ( ( Timex2_Type ) jcasType ) . casFeat_anchor_dir == null ) jcasType . jcas . throwFeatMissing ( "anchor_dir" , "de.julielab.jules.types.ace.Timex2" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Timex2_Type ) jcasType ) . casFeatCode_anch... | setter for anchor_dir - sets |
20,337 | public String getEvent_type ( ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_event_type == null ) jcasType . jcas . throwFeatMissing ( "event_type" , "ch.epfl.bbp.uima.genia.Event" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Event_Type ) jcasType ) . casFeatCode_event_type ) ... | getter for event_type - gets |
20,338 | public void setEvent_type ( String v ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_event_type == null ) jcasType . jcas . throwFeatMissing ( "event_type" , "ch.epfl.bbp.uima.genia.Event" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Event_Type ) jcasType ) . casFeatCode_event_type , ... | setter for event_type - sets |
20,339 | public FSArray getThemes_protein ( ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_themes_protein == null ) jcasType . jcas . throwFeatMissing ( "themes_protein" , "ch.epfl.bbp.uima.genia.Event" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( a... | getter for themes_protein - gets |
20,340 | public void setThemes_protein ( FSArray v ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_themes_protein == null ) jcasType . jcas . throwFeatMissing ( "themes_protein" , "ch.epfl.bbp.uima.genia.Event" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( Event_Type ) jcasType ) . casFeatCode_the... | setter for themes_protein - sets |
20,341 | public Protein getThemes_protein ( int i ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_themes_protein == null ) jcasType . jcas . throwFeatMissing ( "themes_protein" , "ch.epfl.bbp.uima.genia.Event" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Event... | indexed getter for themes_protein - gets an indexed value - |
20,342 | public void setThemes_protein ( int i , Protein v ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_themes_protein == null ) jcasType . jcas . throwFeatMissing ( "themes_protein" , "ch.epfl.bbp.uima.genia.Event" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ... | indexed setter for themes_protein - sets an indexed value - |
20,343 | public FSArray getCauses_protein ( ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_causes_protein == null ) jcasType . jcas . throwFeatMissing ( "causes_protein" , "ch.epfl.bbp.uima.genia.Event" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( a... | getter for causes_protein - gets |
20,344 | public void setCauses_protein ( FSArray v ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_causes_protein == null ) jcasType . jcas . throwFeatMissing ( "causes_protein" , "ch.epfl.bbp.uima.genia.Event" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( Event_Type ) jcasType ) . casFeatCode_cau... | setter for causes_protein - sets |
20,345 | public Protein getCauses_protein ( int i ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_causes_protein == null ) jcasType . jcas . throwFeatMissing ( "causes_protein" , "ch.epfl.bbp.uima.genia.Event" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Event... | indexed getter for causes_protein - gets an indexed value - |
20,346 | public void setCauses_protein ( int i , Protein v ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_causes_protein == null ) jcasType . jcas . throwFeatMissing ( "causes_protein" , "ch.epfl.bbp.uima.genia.Event" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ... | indexed setter for causes_protein - sets an indexed value - |
20,347 | public String getSite ( ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_site == null ) jcasType . jcas . throwFeatMissing ( "site" , "ch.epfl.bbp.uima.genia.Event" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Event_Type ) jcasType ) . casFeatCode_site ) ; } | getter for site - gets |
20,348 | public void setSite ( String v ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_site == null ) jcasType . jcas . throwFeatMissing ( "site" , "ch.epfl.bbp.uima.genia.Event" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Event_Type ) jcasType ) . casFeatCode_site , v ) ; } | setter for site - sets |
20,349 | public FSArray getThemes_event ( ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_themes_event == null ) jcasType . jcas . throwFeatMissing ( "themes_event" , "ch.epfl.bbp.uima.genia.Event" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ... | getter for themes_event - gets |
20,350 | public void setThemes_event ( FSArray v ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_themes_event == null ) jcasType . jcas . throwFeatMissing ( "themes_event" , "ch.epfl.bbp.uima.genia.Event" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( Event_Type ) jcasType ) . casFeatCode_themes_ev... | setter for themes_event - sets |
20,351 | public Event getThemes_event ( int i ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_themes_event == null ) jcasType . jcas . throwFeatMissing ( "themes_event" , "ch.epfl.bbp.uima.genia.Event" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Event_Type ) ... | indexed getter for themes_event - gets an indexed value - |
20,352 | public void setThemes_event ( int i , Event v ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_themes_event == null ) jcasType . jcas . throwFeatMissing ( "themes_event" , "ch.epfl.bbp.uima.genia.Event" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Even... | indexed setter for themes_event - sets an indexed value - |
20,353 | public FSArray getCauses_event ( ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_causes_event == null ) jcasType . jcas . throwFeatMissing ( "causes_event" , "ch.epfl.bbp.uima.genia.Event" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ... | getter for causes_event - gets |
20,354 | public void setCauses_event ( FSArray v ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_causes_event == null ) jcasType . jcas . throwFeatMissing ( "causes_event" , "ch.epfl.bbp.uima.genia.Event" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( Event_Type ) jcasType ) . casFeatCode_causes_ev... | setter for causes_event - sets |
20,355 | public Event getCauses_event ( int i ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_causes_event == null ) jcasType . jcas . throwFeatMissing ( "causes_event" , "ch.epfl.bbp.uima.genia.Event" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Event_Type ) ... | indexed getter for causes_event - gets an indexed value - |
20,356 | public void setCauses_event ( int i , Event v ) { if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_causes_event == null ) jcasType . jcas . throwFeatMissing ( "causes_event" , "ch.epfl.bbp.uima.genia.Event" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Even... | indexed setter for causes_event - sets an indexed value - |
20,357 | private String punct ( Parse punct , int i ) { StringBuffer feat = new StringBuffer ( 5 ) ; feat . append ( i ) . append ( "=" ) ; feat . append ( punct . getType ( ) ) ; return ( feat . toString ( ) ) ; } | Creates punctuation feature for the specified punctuation at the specfied index . |
20,358 | public String getGender ( ) { if ( NounFeats_Type . featOkTst && ( ( NounFeats_Type ) jcasType ) . casFeat_gender == null ) jcasType . jcas . throwFeatMissing ( "gender" , "de.julielab.jules.types.NounFeats" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( NounFeats_Type ) jcasType ) . casFeatCode_gender )... | getter for gender - gets Gender C |
20,359 | public String getLdcatr ( ) { if ( EntityMention_Type . featOkTst && ( ( EntityMention_Type ) jcasType ) . casFeat_ldcatr == null ) jcasType . jcas . throwFeatMissing ( "ldcatr" , "de.julielab.jules.types.ace.EntityMention" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( EntityMention_Type ) jcasType ) . ... | getter for ldcatr - gets |
20,360 | public void setLdcatr ( String v ) { if ( EntityMention_Type . featOkTst && ( ( EntityMention_Type ) jcasType ) . casFeat_ldcatr == null ) jcasType . jcas . throwFeatMissing ( "ldcatr" , "de.julielab.jules.types.ace.EntityMention" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( EntityMention_Type ) jcasType ) . ... | setter for ldcatr - sets |
20,361 | public String getRole ( ) { if ( EntityMention_Type . featOkTst && ( ( EntityMention_Type ) jcasType ) . casFeat_role == null ) jcasType . jcas . throwFeatMissing ( "role" , "de.julielab.jules.types.ace.EntityMention" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( EntityMention_Type ) jcasType ) . casFea... | getter for role - gets |
20,362 | public String getMetonymy_mention ( ) { if ( EntityMention_Type . featOkTst && ( ( EntityMention_Type ) jcasType ) . casFeat_metonymy_mention == null ) jcasType . jcas . throwFeatMissing ( "metonymy_mention" , "de.julielab.jules.types.ace.EntityMention" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Enti... | getter for metonymy_mention - gets |
20,363 | public void setMetonymy_mention ( String v ) { if ( EntityMention_Type . featOkTst && ( ( EntityMention_Type ) jcasType ) . casFeat_metonymy_mention == null ) jcasType . jcas . throwFeatMissing ( "metonymy_mention" , "de.julielab.jules.types.ace.EntityMention" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Enti... | setter for metonymy_mention - sets |
20,364 | public String getMention_type ( ) { if ( EntityMention_Type . featOkTst && ( ( EntityMention_Type ) jcasType ) . casFeat_mention_type == null ) jcasType . jcas . throwFeatMissing ( "mention_type" , "de.julielab.jules.types.ace.EntityMention" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( EntityMention_Ty... | getter for mention_type - gets |
20,365 | public void setMention_type ( String v ) { if ( EntityMention_Type . featOkTst && ( ( EntityMention_Type ) jcasType ) . casFeat_mention_type == null ) jcasType . jcas . throwFeatMissing ( "mention_type" , "de.julielab.jules.types.ace.EntityMention" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( EntityMention_Ty... | setter for mention_type - sets |
20,366 | public String getMention_ldctype ( ) { if ( EntityMention_Type . featOkTst && ( ( EntityMention_Type ) jcasType ) . casFeat_mention_ldctype == null ) jcasType . jcas . throwFeatMissing ( "mention_ldctype" , "de.julielab.jules.types.ace.EntityMention" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( EntityM... | getter for mention_ldctype - gets |
20,367 | public void setMention_ldctype ( String v ) { if ( EntityMention_Type . featOkTst && ( ( EntityMention_Type ) jcasType ) . casFeat_mention_ldctype == null ) jcasType . jcas . throwFeatMissing ( "mention_ldctype" , "de.julielab.jules.types.ace.EntityMention" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( EntityM... | setter for mention_ldctype - sets |
20,368 | public Entity getEntity_ref ( ) { if ( EntityMention_Type . featOkTst && ( ( EntityMention_Type ) jcasType ) . casFeat_entity_ref == null ) jcasType . jcas . throwFeatMissing ( "entity_ref" , "de.julielab.jules.types.ace.EntityMention" ) ; return ( Entity ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_... | getter for entity_ref - gets |
20,369 | public void setEntity_ref ( Entity v ) { if ( EntityMention_Type . featOkTst && ( ( EntityMention_Type ) jcasType ) . casFeat_entity_ref == null ) jcasType . jcas . throwFeatMissing ( "entity_ref" , "de.julielab.jules.types.ace.EntityMention" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( EntityMention_Type ) jcas... | setter for entity_ref - sets |
20,370 | public String getSpecificType ( ) { if ( ConceptMention_Type . featOkTst && ( ( ConceptMention_Type ) jcasType ) . casFeat_specificType == null ) jcasType . jcas . throwFeatMissing ( "specificType" , "de.julielab.jules.types.ConceptMention" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( ConceptMention_Ty... | getter for specificType - gets |
20,371 | public void setSpecificType ( String v ) { if ( ConceptMention_Type . featOkTst && ( ( ConceptMention_Type ) jcasType ) . casFeat_specificType == null ) jcasType . jcas . throwFeatMissing ( "specificType" , "de.julielab.jules.types.ConceptMention" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( ConceptMention_Ty... | setter for specificType - sets |
20,372 | public TOP getRef ( ) { if ( ConceptMention_Type . featOkTst && ( ( ConceptMention_Type ) jcasType ) . casFeat_ref == null ) jcasType . jcas . throwFeatMissing ( "ref" , "de.julielab.jules.types.ConceptMention" ) ; return ( TOP ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Con... | getter for ref - gets The reference to the Concept we use here the super type TOP in order to avoid the recursive dependencies between type systems |
20,373 | public void setRef ( TOP v ) { if ( ConceptMention_Type . featOkTst && ( ( ConceptMention_Type ) jcasType ) . casFeat_ref == null ) jcasType . jcas . throwFeatMissing ( "ref" , "de.julielab.jules.types.ConceptMention" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( ConceptMention_Type ) jcasType ) . casFeatCode_ref... | setter for ref - sets The reference to the Concept we use here the super type TOP in order to avoid the recursive dependencies between type systems |
20,374 | public FSArray getResourceEntryList ( ) { if ( ConceptMention_Type . featOkTst && ( ( ConceptMention_Type ) jcasType ) . casFeat_resourceEntryList == null ) jcasType . jcas . throwFeatMissing ( "resourceEntryList" , "de.julielab.jules.types.ConceptMention" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( j... | getter for resourceEntryList - gets |
20,375 | public void setResourceEntryList ( FSArray v ) { if ( ConceptMention_Type . featOkTst && ( ( ConceptMention_Type ) jcasType ) . casFeat_resourceEntryList == null ) jcasType . jcas . throwFeatMissing ( "resourceEntryList" , "de.julielab.jules.types.ConceptMention" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( Conc... | setter for resourceEntryList - sets |
20,376 | public ResourceEntry getResourceEntryList ( int i ) { if ( ConceptMention_Type . featOkTst && ( ( ConceptMention_Type ) jcasType ) . casFeat_resourceEntryList == null ) jcasType . jcas . throwFeatMissing ( "resourceEntryList" , "de.julielab.jules.types.ConceptMention" ) ; jcasType . jcas . checkArrayBounds ( jcasType .... | indexed getter for resourceEntryList - gets an indexed value - |
20,377 | public void setResourceEntryList ( int i , ResourceEntry v ) { if ( ConceptMention_Type . featOkTst && ( ( ConceptMention_Type ) jcasType ) . casFeat_resourceEntryList == null ) jcasType . jcas . throwFeatMissing ( "resourceEntryList" , "de.julielab.jules.types.ConceptMention" ) ; jcasType . jcas . checkArrayBounds ( j... | indexed setter for resourceEntryList - sets an indexed value - |
20,378 | @ SuppressWarnings ( "unchecked" ) public ArrayList < ArrayList < TextPiece > > getTextPiecesByPage ( File pdfFile ) { assert ( pdfFile . exists ( ) ) : "pdfFile does not exist" ; m_wordsByPage = new ArrayList < ArrayList < TextPiece > > ( ) ; PDDocument document = null ; try { document = PDDocument . load ( pdfFile ) ... | Get text pieces from a PDF document |
20,379 | public String stem ( String token ) { if ( token != null && token . length ( ) > 3 && token . endsWith ( "s" ) ) { return token . substring ( 0 , token . length ( ) - 1 ) ; } return token ; } | Removes ending s of words longer than 3 chars |
20,380 | private static File materializeDescriptor ( ResourceSpecifier resource ) throws IOException , SAXException { File tempDesc = File . createTempFile ( "desc" , ".xml" ) ; BufferedWriter out = new BufferedWriter ( new OutputStreamWriter ( new FileOutputStream ( tempDesc ) , "UTF-8" ) ) ; resource . toXML ( out ) ; out . c... | Writes a temporary file containing a xml descriptor of the given resource . Returns the file . |
20,381 | public String getCat ( ) { if ( CoordinationElement_Type . featOkTst && ( ( CoordinationElement_Type ) jcasType ) . casFeat_cat == null ) jcasType . jcas . throwFeatMissing ( "cat" , "de.julielab.jules.types.CoordinationElement" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( CoordinationElement_Type ) jc... | getter for cat - gets |
20,382 | public void setCat ( String v ) { if ( CoordinationElement_Type . featOkTst && ( ( CoordinationElement_Type ) jcasType ) . casFeat_cat == null ) jcasType . jcas . throwFeatMissing ( "cat" , "de.julielab.jules.types.CoordinationElement" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( CoordinationElement_Type ) jc... | setter for cat - sets |
20,383 | public Set < String > getSynonyms ( final String canonical ) { Set < String > syn = Sets . newHashSet ( ) ; for ( Map < String , Concept > lexica : lexicon ) { for ( String lexCanonical : lexica . keySet ( ) ) { Set < String > variants = lexica . get ( lexCanonical ) . getVariants ( ) ; for ( String variant : variants ... | given a canonical form ( found with a lex - NER return all variants if any |
20,384 | public int codePointConversion ( String fontName , int codePoint ) { NonStandardFontFamily nonStandardFontFamily = get ( fontName ) ; if ( nonStandardFontFamily == null ) return codePoint ; CodePointSet codePointSet = nonStandardFontFamily . getCodePointSet ( ) ; if ( codePointSet == null ) return codePoint ; CodePoint... | Takes in argument a codepoint . If for the given police the codepoint doesn t correspond to what the font actually displays the conversion is made . Otherwise the old codepoint is return . |
20,385 | public String getPerson ( ) { if ( VerbFeats_Type . featOkTst && ( ( VerbFeats_Type ) jcasType ) . casFeat_person == null ) jcasType . jcas . throwFeatMissing ( "person" , "de.julielab.jules.types.VerbFeats" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( VerbFeats_Type ) jcasType ) . casFeatCode_person )... | getter for person - gets Person |
20,386 | public void setPerson ( String v ) { if ( VerbFeats_Type . featOkTst && ( ( VerbFeats_Type ) jcasType ) . casFeat_person == null ) jcasType . jcas . throwFeatMissing ( "person" , "de.julielab.jules.types.VerbFeats" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( VerbFeats_Type ) jcasType ) . casFeatCode_person ,... | setter for person - sets Person |
20,387 | public String getVoice ( ) { if ( VerbFeats_Type . featOkTst && ( ( VerbFeats_Type ) jcasType ) . casFeat_voice == null ) jcasType . jcas . throwFeatMissing ( "voice" , "de.julielab.jules.types.VerbFeats" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( VerbFeats_Type ) jcasType ) . casFeatCode_voice ) ; } | getter for voice - gets Voice |
20,388 | public void setVoice ( String v ) { if ( VerbFeats_Type . featOkTst && ( ( VerbFeats_Type ) jcasType ) . casFeat_voice == null ) jcasType . jcas . throwFeatMissing ( "voice" , "de.julielab.jules.types.VerbFeats" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( VerbFeats_Type ) jcasType ) . casFeatCode_voice , v )... | setter for voice - sets Voice |
20,389 | public String getAspect ( ) { if ( VerbFeats_Type . featOkTst && ( ( VerbFeats_Type ) jcasType ) . casFeat_aspect == null ) jcasType . jcas . throwFeatMissing ( "aspect" , "de.julielab.jules.types.VerbFeats" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( VerbFeats_Type ) jcasType ) . casFeatCode_aspect )... | getter for aspect - gets Aspect |
20,390 | public void setAspect ( String v ) { if ( VerbFeats_Type . featOkTst && ( ( VerbFeats_Type ) jcasType ) . casFeat_aspect == null ) jcasType . jcas . throwFeatMissing ( "aspect" , "de.julielab.jules.types.VerbFeats" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( VerbFeats_Type ) jcasType ) . casFeatCode_aspect ,... | setter for aspect - sets Aspect |
20,391 | public FSArray getFullTextLinks ( ) { if ( FullTextLinkList_Type . featOkTst && ( ( FullTextLinkList_Type ) jcasType ) . casFeat_fullTextLinks == null ) jcasType . jcas . throwFeatMissing ( "fullTextLinks" , "de.julielab.jules.types.FullTextLinkList" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasTyp... | getter for fullTextLinks - gets |
20,392 | public void setFullTextLinks ( FSArray v ) { if ( FullTextLinkList_Type . featOkTst && ( ( FullTextLinkList_Type ) jcasType ) . casFeat_fullTextLinks == null ) jcasType . jcas . throwFeatMissing ( "fullTextLinks" , "de.julielab.jules.types.FullTextLinkList" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( FullTextLi... | setter for fullTextLinks - sets |
20,393 | public FullTextLink getFullTextLinks ( int i ) { if ( FullTextLinkList_Type . featOkTst && ( ( FullTextLinkList_Type ) jcasType ) . casFeat_fullTextLinks == null ) jcasType . jcas . throwFeatMissing ( "fullTextLinks" , "de.julielab.jules.types.FullTextLinkList" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas... | indexed getter for fullTextLinks - gets an indexed value - |
20,394 | public void setFullTextLinks ( int i , FullTextLink v ) { if ( FullTextLinkList_Type . featOkTst && ( ( FullTextLinkList_Type ) jcasType ) . casFeat_fullTextLinks == null ) jcasType . jcas . throwFeatMissing ( "fullTextLinks" , "de.julielab.jules.types.FullTextLinkList" ) ; jcasType . jcas . checkArrayBounds ( jcasType... | indexed setter for fullTextLinks - sets an indexed value - |
20,395 | public void read ( File f ) throws IOException { FileInputStream fis = new FileInputStream ( f ) ; try { read ( new BufferedReader ( new InputStreamReader ( fis , "UTF-8" ) ) ) ; } finally { IOUtils . closeQuietly ( fis ) ; } } | Read a . obo file |
20,396 | public void addTerm ( OntologyTerm term ) { terms . put ( term . getId ( ) , term ) ; indexTerm ( term ) ; isTypeOfIsBuilt = false ; } | Add a single OntologyTerm to the ontology . |
20,397 | public void addOntology ( OBOOntology ont ) { for ( String id : ont . terms . keySet ( ) ) { addTerm ( ont . terms . get ( id ) ) ; } } | Merge a whole ontology into the current one . |
20,398 | public void writeOntTxt ( PrintWriter pw ) { for ( String id : terms . keySet ( ) ) { OntologyTerm term = terms . get ( id ) ; Set < String > synSet = new HashSet < String > ( ) ; synSet . add ( term . getName ( ) ) ; for ( Synonym s : term . getSynonyms ( ) ) { String st = s . getType ( ) ; if ( id . startsWith ( "PTC... | Writes a file suitable for use as onotology . txt . |
20,399 | public Set < String > getIdsForIdsWithAncestors ( Collection < String > termIds ) { Stack < String > idsToConsider = new Stack < String > ( ) ; idsToConsider . addAll ( termIds ) ; Set < String > resultIds = new HashSet < String > ( ) ; while ( ! idsToConsider . isEmpty ( ) ) { String id = idsToConsider . pop ( ) ; if ... | Given a set of IDs return a set that contains all of the IDs the parents of those IDs the grandparents etc . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.