2 Wrapper around place information the indexer gets from the database and hands to
9 """ Data class containing all information the tokenizer gets about a
10 place it should process the names for.
13 def __init__(self, info):
17 def analyze(self, analyzer):
18 """ Process this place with the given tokenizer and return the
19 result in psycopg2-compatible Json.
21 return psycopg2.extras.Json(analyzer.process_place(self))
26 """ A dictionary with the names of the place or None if the place
29 return self._info.get('name')
34 """ A dictionary with the address elements of the place
35 or None if no address information is available.
37 return self._info.get('address')
41 def country_feature(self):
42 """ Return the country code if the place is a valid country boundary.
44 return self._info.get('country_feature')