Module ImportFrom alias Import alias Import alias Import alias Import alias ClassDef bases body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Slice NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assert CompareNotIn Str AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr Assert CompareEq AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num Num body Assign NameStore Call AttributeLoad NameLoad attr Str Return Call NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list Assign NameStore Num FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num Num body Global identifier Assign NameStore ListLoad Assign TupleStore NameStore NameStore TupleLoad Num Num While CompareLt NameLoad Call NameLoad NameLoad body If CompareGtE NameLoad Call NameLoad NameLoad body Print AttributeLoad NameLoad attr Str Break Assign NameStore SubscriptLoad NameLoad Index NameLoad If Call AttributeLoad NameLoad attr Str NameLoad body AugAssignAdd NameStore Num orelse Assign NameStore Call AttributeLoad NameLoad attr Str TryExcept body Assign NameStore SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler body Print AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Raise TryExcept body Assign NameStore SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler body Print AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Raise Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assert NameLoad BinOpMod Str NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If BoolOpAnd CompareGt Call NameLoad NameLoad Num CompareEq SubscriptLoad NameLoad Index Num Str body Assign NameStore SubscriptLoad NameLoad Slice Num Assert BoolOpOr BoolOpAnd CompareEq NameLoad Str CompareEq NameLoad Str BoolOpAnd CompareNotEq NameLoad Str CompareIn NameLoad TupleLoad Str Str BinOpMod Str NameLoad While BoolOpAnd CompareLt NameLoad Call NameLoad NameLoad Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr body AugAssignAdd NameStore Num Assert CompareEq SubscriptLoad NameLoad Slice NameLoad BinOpAdd NameLoad Call NameLoad NameLoad NameLoad BinOpMod Str TupleLoad Call AttributeLoad SubscriptLoad NameLoad Slice NameLoad BinOpAdd NameLoad Call NameLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad BinOpAdd NameLoad Call NameLoad NameLoad NameLoad NameLoad AugAssignAdd NameStore Call NameLoad NameLoad AugAssignAdd NameStore Num While BoolOpAnd CompareLt NameLoad Call NameLoad NameLoad Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr body AugAssignAdd NameStore Num If BoolOpOr CompareNotEq Call NameLoad ListComp NameLoad comprehension NameStore SubscriptLoad NameLoad Slice NameLoad UnaryOpNot Call AttributeLoad NameLoad attr Num CompareNotEq Call NameLoad ListComp NameLoad comprehension NameStore SubscriptLoad NameLoad Slice NameLoad UnaryOpNot Call AttributeLoad NameLoad attr Str NameLoad Num body Assert NameLoad BinOpMod Str TupleLoad SubscriptLoad NameLoad Slice NameLoad SubscriptLoad NameLoad Slice NameLoad Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore NameLoad For TupleStore NameStore NameStore NameStore NameStore NameLoad body If BoolOpAnd CompareEq NameLoad Str CompareEq NameLoad Str body Print AttributeLoad NameLoad attr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore ListLoad Assign TupleStore NameStore NameStore TupleLoad NameLoad NameLoad For TupleStore NameStore NameStore NameStore NameStore NameLoad body If BoolOpAnd CompareIn NameLoad TupleLoad Str Str CompareEq NameLoad Str CompareNotEq NameLoad NameLoad body Print AttributeLoad NameLoad attr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore TupleLoad NameLoad NameLoad Assign NameStore NameLoad Assign TupleStore NameStore NameStore TupleLoad Str Num Assign TupleStore NameStore NameStore TupleLoad NameLoad NameLoad For TupleStore NameStore NameStore NameStore NameStore NameLoad body If BoolOpAnd CompareNotEq NameLoad Str CompareNotEq NameLoad Str body Assert BoolOpAnd CompareIsNot NameLoad NameLoad CompareIsNot NameLoad NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad AugAssignAdd NameStore Num Assign TupleStore NameStore NameStore TupleLoad NameLoad NameLoad orelse If CompareNotEq NameLoad Str body Assert CompareEq NameLoad Str BinOpMod Str NameLoad Assert CompareEq NameLoad NameLoad BinOpMod Str TupleLoad NameLoad NameLoad If CompareEq NameLoad Str body Assign TupleStore NameStore NameStore TupleLoad NameLoad NameLoad Assign TupleStore NameStore NameStore TupleLoad NameLoad NameLoad If CompareNotEq NameLoad Str body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad AugAssignAdd NameStore Num For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr Str body If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad orelse Assign TupleStore NameStore NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr For NameStore Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If BoolOpOr CompareLt Call NameLoad NameLoad Num CompareGt Call NameLoad NameLoad Num body Print AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Num Str Return Num Assign TupleStore NameStore NameStore TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Assign NameStore NameLoad If CompareGtE Call NameLoad NameLoad Num body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num Assign NameStore NameLoad If CompareGtE Call NameLoad NameLoad Num body Assign NameStore SubscriptLoad NameLoad Index Num With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad orelse If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad orelse TryExcept body Assign NameStore Call NameLoad NameLoad handlers ExceptHandler body Print AttributeLoad NameLoad attr BinOpMod Str NameLoad Return Num Assign NameStore ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad NameLoad For NameStore NameLoad body Print NameLoad Return Num decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr
N/A __future__ with_statement N/A sys N/A re N/A os N/A codecs taggedEntity N/A N/A __init__ N/A N/A self startOff endOff eType idNum fullText N/A N/A N/A N/A self startOff startOff N/A N/A self endOff endOff N/A N/A self eType eType N/A N/A self idNum idNum N/A N/A self fullText fullText N/A N/A self eText N/A fullText N/A startOff endOff N/A __str__ N/A N/A self N/A N/A N/A N/A T%d	%s %d %d	%s N/A N/A self idNum N/A self eType N/A self startOff N/A self endOff N/A self eText N/A check N/A N/A self N/A N/A N/A N/A N/A self eText N/A ERROR: newline in entity: '%s' N/A self eText N/A N/A N/A self eText N/A N/A N/A self eText strip N/A ERROR: entity contains extra whitespace: '%s' N/A self eText N/A N/A BIO_to_standoff N/A N/A BIOtext reftext tokenidx tagidx N/A 2 -1 N/A N/A BIOlines N/A N/A BIOtext split N/A N/A BIO_lines_to_standoff BIOlines reftext tokenidx tagidx N/A N/A next_free_id_idx 1 BIO_lines_to_standoff N/A N/A BIOlines reftext tokenidx tagidx N/A 2 -1 N/A N/A next_free_id_idx N/A taggedTokens N/A N/A N/A ri bi N/A 0 0 N/A N/A ri N/A len reftext N/A N/A N/A bi N/A len BIOlines N/A N/A N/A sys stderr Warning: received BIO didn't cover given text N/A N/A BIOline N/A BIOlines N/A bi N/A N/A N/A re match ^\s*$ BIOline N/A N/A bi 1 N/A N/A fields N/A N/A BIOline split N/A N/A N/A tokentext N/A fields N/A tokenidx N/A N/A N/A N/A N/A sys stderr N/A Error: failed to get token text (field %d) on line: %s N/A tokenidx BIOline N/A N/A N/A N/A tag N/A fields N/A tagidx N/A N/A N/A N/A N/A sys stderr N/A Error: failed to get token text (field %d) on line: %s N/A tagidx BIOline N/A N/A m N/A N/A re match ^([BIO])((?:-[A-Za-z0-9_-]+)?)$ tag N/A m N/A ERROR: failed to parse tag '%s' tag N/A N/A ttag ttype N/A N/A m groups N/A N/A N/A N/A len ttype 0 N/A N/A ttype N/A 0 - N/A N/A ttype N/A ttype N/A 1 N/A N/A N/A N/A ttype N/A ttag O N/A N/A ttype N/A ttag N/A B I N/A Error: tag/type mismatch %s tag N/A N/A N/A ri N/A len reftext N/A N/A N/A reftext N/A ri isspace N/A N/A ri 1 N/A N/A N/A reftext N/A ri N/A ri N/A len tokentext tokentext N/A ERROR: text mismatch: reference '%s' tagged '%s' N/A N/A N/A N/A reftext N/A ri N/A ri N/A len tokentext encode UTF-8 N/A N/A tokentext encode UTF-8 N/A N/A N/A taggedTokens append N/A ri N/A ri N/A len tokentext ttag ttype N/A ri N/A len tokentext N/A bi 1 N/A N/A N/A ri N/A len reftext N/A N/A N/A reftext N/A ri isspace N/A N/A ri 1 N/A N/A N/A N/A len N/A c N/A c N/A reftext N/A ri N/A N/A N/A c isspace 0 N/A N/A len N/A c N/A c N/A BIOlines N/A bi N/A N/A N/A re match ^\s*$ c 0 N/A N/A False N/A ERROR: failed alignment: '%s' remains in reference, '%s' in tagged N/A N/A reftext N/A ri N/A BIOlines N/A bi N/A standoff_entities N/A N/A revisedTagged N/A N/A prevTag None N/A N/A startoff endoff ttag ttype taggedTokens N/A N/A N/A N/A prevTag O N/A ttag I N/A N/A N/A sys stderr Note: rewriting "I" -> "B" after "O" N/A ttag B N/A N/A N/A revisedTagged append N/A startoff endoff ttag ttype N/A prevTag ttag N/A taggedTokens revisedTagged N/A revisedTagged N/A N/A N/A prevTag prevType N/A None None N/A N/A startoff endoff ttag ttype taggedTokens N/A N/A N/A N/A prevTag N/A B I N/A ttag I N/A prevType ttype N/A N/A N/A sys stderr Note: rewriting "I" -> "B" at type switch N/A ttag B N/A N/A N/A revisedTagged append N/A startoff endoff ttag ttype N/A N/A prevTag prevType N/A ttag ttype N/A taggedTokens revisedTagged N/A N/A prevTag prevEnd N/A O 0 N/A N/A currType currStart N/A None None N/A N/A startoff endoff ttag ttype taggedTokens N/A N/A N/A N/A prevTag O N/A ttag I N/A N/A N/A N/A currType None N/A currStart None N/A ERROR in %s fn N/A N/A N/A standoff_entities append N/A taggedEntity currStart prevEnd currType next_free_id_idx reftext N/A next_free_id_idx 1 N/A N/A currType currStart N/A None None N/A N/A N/A prevTag O N/A N/A N/A ttag I N/A ERROR in %s fn N/A N/A currType ttype N/A ERROR: entity of type '%s' continues as type '%s' N/A currType ttype N/A N/A ttag B N/A N/A N/A currType currStart N/A ttype startoff N/A N/A prevTag prevEnd N/A ttag endoff N/A N/A prevTag O N/A N/A N/A N/A standoff_entities append N/A taggedEntity currStart prevEnd currType next_free_id_idx reftext N/A next_free_id_idx 1 N/A e standoff_entities N/A N/A N/A N/A e check N/A standoff_entities N/A N/A RANGE_RE N/A N/A re compile ^(-?\d+)-(-?\d+)$ parse_indices N/A N/A idxstr N/A N/A N/A indices N/A N/A i N/A N/A idxstr split , N/A N/A N/A N/A N/A RANGE_RE match i N/A N/A N/A N/A indices append N/A int i N/A N/A N/A start end N/A N/A N/A N/A RANGE_RE match i groups N/A j N/A range N/A int start N/A int end N/A N/A N/A N/A indices append j N/A indices N/A main N/A N/A argv N/A N/A N/A N/A N/A N/A len argv 3 N/A N/A len argv 5 N/A N/A N/A sys stderr Usage: N/A argv N/A 0 TEXTFILE BIOFILE [TOKENIDX [BIOIDX]] N/A 1 N/A N/A textfn biofn N/A N/A argv N/A 1 N/A argv N/A 2 N/A tokenIdx None N/A N/A N/A len argv 4 N/A N/A tokenIdx N/A int N/A argv N/A 3 N/A bioIdx None N/A N/A N/A len argv 5 N/A N/A bioIdx N/A argv N/A 4 N/A N/A open textfn rU textf N/A N/A text N/A N/A textf read N/A N/A open biofn rU biof N/A N/A bio N/A N/A biof read N/A N/A tokenIdx None N/A N/A so N/A BIO_to_standoff bio text N/A N/A N/A bioIdx None N/A N/A so N/A BIO_to_standoff bio text tokenIdx N/A N/A N/A N/A indices N/A parse_indices bioIdx N/A N/A N/A N/A N/A sys stderr N/A Error: failed to parse indices "%s" bioIdx N/A 1 N/A so N/A N/A i indices N/A N/A N/A N/A so extend N/A BIO_to_standoff bio text tokenIdx i N/A s so N/A N/A s N/A 0 N/A N/A N/A __name__ __main__ N/A N/A N/A N/A sys exit N/A main N/A sys argv