Result クラス

ジオコーディング結果を格納するためのクラスです。

node 属性に jageocoder.node.AddressNode クラスの住所要素ノード オブジェクトが、 matched 属性に 一致した部分文字列が格納されます。

class jageocoder.result.Result(node: Optional[AddressNode] = None, matched: str = '', nchars: int = 0)

Representing the result of searchNode().

node

The node matched the query.

Type:

AddressNode

matched

The matched substring of the query.

Type:

str

nchars

The number of matched characters. It is used only for recursive search.

Type:

int

get_matched_string() str

Get the matched string part of the result.

戻り値:

The matched substring.

戻り値の型:

str

get_node() AddressNode

Get the node part of the result.

戻り値:

The matched node.

戻り値の型:

AddressNode

set(node: AddressNode, matched: str, nchars: int = 0) Result

Set node and matched string.