mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
remove analyze() from PlaceInfo class
The function creates circular dependencies.
This commit is contained in:
@@ -9,8 +9,6 @@ Wrapper around place information the indexer gets from the database and hands to
|
||||
the tokenizer.
|
||||
"""
|
||||
|
||||
import psycopg2.extras
|
||||
|
||||
class PlaceInfo:
|
||||
""" Data class containing all information the tokenizer gets about a
|
||||
place it should process the names for.
|
||||
@@ -20,13 +18,6 @@ class PlaceInfo:
|
||||
self._info = info
|
||||
|
||||
|
||||
def analyze(self, analyzer):
|
||||
""" Process this place with the given tokenizer and return the
|
||||
result in psycopg2-compatible Json.
|
||||
"""
|
||||
return psycopg2.extras.Json(analyzer.process_place(self))
|
||||
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
""" A dictionary with the names of the place or None if the place
|
||||
|
||||
Reference in New Issue
Block a user