mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-12 05:44:06 +00:00
show token begin and end in debug output
This commit is contained in:
@@ -298,12 +298,12 @@ class ICUQueryAnalyzer(AbstractQueryAnalyzer):
|
|||||||
|
|
||||||
|
|
||||||
def _dump_word_tokens(query: qmod.QueryStruct) -> Iterator[List[Any]]:
|
def _dump_word_tokens(query: qmod.QueryStruct) -> Iterator[List[Any]]:
|
||||||
yield ['type', 'token', 'word_token', 'lookup_word', 'penalty', 'count', 'info']
|
yield ['type', 'from', 'to', 'token', 'word_token', 'lookup_word', 'penalty', 'count', 'info']
|
||||||
for node in query.nodes:
|
for i, node in enumerate(query.nodes):
|
||||||
for tlist in node.starting:
|
for tlist in node.starting:
|
||||||
for token in tlist.tokens:
|
for token in tlist.tokens:
|
||||||
t = cast(ICUToken, token)
|
t = cast(ICUToken, token)
|
||||||
yield [tlist.ttype, t.token, t.word_token or '',
|
yield [tlist.ttype, str(i), str(tlist.end), t.token, t.word_token or '',
|
||||||
t.lookup_word or '', t.penalty, t.count, t.info]
|
t.lookup_word or '', t.penalty, t.count, t.info]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user