estnltk.grammar.match module

This module defines Match objects.

class estnltk.grammar.match.Match(start, end, text, name=None)[source]

Match of a grammar symbol.

Attributes

dict Dictionary representing this match and all child symbol matches.
end The end position of the match.
matches Matches of child symbols.
name The name of the match.
start The start position of the match.
text Matched text.

Methods

clear(() -> None.  Remove all items from D.)
copy(() -> a shallow copy of D)
fromkeys Returns a new dict with keys from iterable and values equal to value.
get((k[,d]) -> D[k] if k in D, ...)
is_before(other)
items(...)
keys(...)
pop((k[,d]) -> v, ...) If key is not found, d is returned if given, otherwise KeyError is raised
popitem(() -> (k, v), ...) 2-tuple; but raise KeyError if D is empty.
setdefault((k[,d]) -> D.get(k,d), ...)
update(([E, ...) If E is present and has a .keys() method, then does: for k in E: D[k] = E[k]
values(...)
dict

Dictionary representing this match and all child symbol matches.

end

The end position of the match.

matches

Matches of child symbols.

name

The name of the match.

start

The start position of the match.

text

Matched text.

estnltk.grammar.match.concatenate_matches(a, b, text, name)[source]

Concatenate matches a and b. All submatches will be copied to result.