7.5.2. geonlp.parseStructured

複数のセンテンスを geoparse します。

このメソッドは、リストのそれぞれのテキストを geoparse してから 結果を結合します。

先にテキストを結合して parse() を呼んだ場合と比較すると、 長すぎるテキストの分割を自動で行なうか、呼びだす側で 指定するかの違いがあります。

自動的に分割すると、意味的に連続したパラグラフの途中で 切れてしまうことがあり、地名解決の精度が低下します。 そのためテキストの意味的な区切り(文、段落など)が 分かっている場合は、1ブロックずつ parse() で処理するか、 parseStructured() を利用してください。

リクエストパラメータ

sentence_listlist of str
  • 変換したいテキストのリスト

  • 長さの上限なし、件数の上限なし

optionsdict, optional

レスポンス

features に GeoJSON Feature 形式の地名語、 非地名語、住所をリストとして含む FeatureCollection 形式の GeoJSON を返します。

7.5.2.1. リクエストの例

{
  "method": "geonlp.parseStructured",
  "params": {
    "sentence_list": [
      "NIIは神保町駅から徒歩7分です。",
      "千代田区一ツ橋2-1-2にあります。",
      "竹橋駅も近いです。"
    ]
  },
  "id": "test_parseStructured"
}

7.5.2.2. レスポンスの例

{
  "features": [
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "*",
          "pos": "名詞",
          "prononciation": "",
          "subclass1": "固有名詞",
          "subclass2": "組織",
          "subclass3": "*",
          "surface": "NII",
          "yomi": ""
        },
        "node_type": "NORMAL",
        "surface": "NII"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "は",
          "pos": "助詞",
          "prononciation": "ワ",
          "subclass1": "係助詞",
          "subclass2": "*",
          "subclass3": "*",
          "surface": "は",
          "yomi": "ハ"
        },
        "node_type": "NORMAL",
        "surface": "は"
      },
      "type": "Feature"
    },
    {
      "geometry": {
        "coordinates": [
          139.757665,
          35.695975000000004
        ],
        "type": "Point"
      },
      "properties": {
        "geoword_properties": {
          "body": "神保町",
          "dictionary_id": 3,
          "dictionary_identifier": "geonlp:ksj-station-N02",
          "entry_id": "Iy2jnd",
          "geolod_id": "AGGwyc",
          "hypernym": [
            "東京地下鉄",
            "11号線半蔵門線"
          ],
          "institution_type": "民営鉄道",
          "latitude": "35.695975000000004",
          "longitude": "139.757665",
          "ne_class": "鉄道施設/鉄道駅",
          "railway_class": "普通鉄道",
          "suffix": [
            "駅",
            ""
          ]
        },
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "神保町駅",
          "pos": "名詞",
          "prononciation": "",
          "subclass1": "固有名詞",
          "subclass2": "地名語",
          "subclass3": "AGGwyc:神保町駅",
          "surface": "神保町駅",
          "yomi": ""
        },
        "node_type": "GEOWORD",
        "surface": "神保町駅"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "から",
          "pos": "助詞",
          "prononciation": "カラ",
          "subclass1": "格助詞",
          "subclass2": "一般",
          "subclass3": "*",
          "surface": "から",
          "yomi": "カラ"
        },
        "node_type": "NORMAL",
        "surface": "から"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "徒歩",
          "pos": "名詞",
          "prononciation": "トホ",
          "subclass1": "一般",
          "subclass2": "*",
          "subclass3": "*",
          "surface": "徒歩",
          "yomi": "トホ"
        },
        "node_type": "NORMAL",
        "surface": "徒歩"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "*",
          "pos": "名詞",
          "prononciation": "",
          "subclass1": "数",
          "subclass2": "*",
          "subclass3": "*",
          "surface": "7",
          "yomi": ""
        },
        "node_type": "NORMAL",
        "surface": "7"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "分",
          "pos": "名詞",
          "prononciation": "フン",
          "subclass1": "接尾",
          "subclass2": "助数詞",
          "subclass3": "*",
          "surface": "分",
          "yomi": "フン"
        },
        "node_type": "NORMAL",
        "surface": "分"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "特殊・デス",
          "conjugation_type": "基本形",
          "original_form": "です",
          "pos": "助動詞",
          "prononciation": "デス",
          "subclass1": "*",
          "subclass2": "*",
          "subclass3": "*",
          "surface": "です",
          "yomi": "デス"
        },
        "node_type": "NORMAL",
        "surface": "です"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "。",
          "pos": "記号",
          "prononciation": "。",
          "subclass1": "句点",
          "subclass2": "*",
          "subclass3": "*",
          "surface": "。",
          "yomi": "。"
        },
        "node_type": "NORMAL",
        "surface": "。"
      },
      "type": "Feature"
    },
    {
      "geometry": {
        "coordinates": [
          139.753634,
          35.694003
        ],
        "type": "Point"
      },
      "properties": {
        "geoword_properties": {
          "address": "東京都千代田区",
          "body": "千代田",
          "body_variants": "千代田",
          "code": {},
          "countyname": "",
          "countyname_variants": "",
          "dictionary_id": 1,
          "dictionary_identifier": "geonlp:geoshape-city",
          "entry_id": "13101A1968",
          "geolod_id": "WWIY7G",
          "hypernym": [
            "東京都"
          ],
          "latitude": "35.69400300",
          "longitude": "139.75363400",
          "ne_class": "市区町村",
          "prefname": "東京都",
          "prefname_variants": "東京都",
          "source": "1/千代田区役所/千代田区九段南1-2-1/P34-14_13.xml",
          "suffix": [
            "区"
          ],
          "valid_from": "",
          "valid_to": ""
        },
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "千代田区",
          "pos": "名詞",
          "prononciation": "",
          "subclass1": "固有名詞",
          "subclass2": "地名語",
          "subclass3": "WWIY7G:千代田区",
          "surface": "千代田区",
          "yomi": ""
        },
        "node_type": "GEOWORD",
        "surface": "千代田区"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "一ツ橋",
          "pos": "名詞",
          "prononciation": "ヒトツバシ",
          "subclass1": "固有名詞",
          "subclass2": "地域",
          "subclass3": "一般",
          "surface": "一ツ橋",
          "yomi": "ヒトツバシ"
        },
        "node_type": "NORMAL",
        "surface": "一ツ橋"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "*",
          "pos": "名詞",
          "prononciation": "",
          "subclass1": "数",
          "subclass2": "*",
          "subclass3": "*",
          "surface": "2",
          "yomi": ""
        },
        "node_type": "NORMAL",
        "surface": "2"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "*",
          "pos": "記号",
          "prononciation": "",
          "subclass1": "一般",
          "subclass2": "*",
          "subclass3": "*",
          "surface": "-",
          "yomi": ""
        },
        "node_type": "NORMAL",
        "surface": "-"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "*",
          "pos": "名詞",
          "prononciation": "",
          "subclass1": "数",
          "subclass2": "*",
          "subclass3": "*",
          "surface": "1",
          "yomi": ""
        },
        "node_type": "NORMAL",
        "surface": "1"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "*",
          "pos": "記号",
          "prononciation": "",
          "subclass1": "一般",
          "subclass2": "*",
          "subclass3": "*",
          "surface": "-",
          "yomi": ""
        },
        "node_type": "NORMAL",
        "surface": "-"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "*",
          "pos": "名詞",
          "prononciation": "",
          "subclass1": "数",
          "subclass2": "*",
          "subclass3": "*",
          "surface": "2",
          "yomi": ""
        },
        "node_type": "NORMAL",
        "surface": "2"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "に",
          "pos": "助詞",
          "prononciation": "ニ",
          "subclass1": "格助詞",
          "subclass2": "一般",
          "subclass3": "*",
          "surface": "に",
          "yomi": "ニ"
        },
        "node_type": "NORMAL",
        "surface": "に"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "五段・ラ行",
          "conjugation_type": "連用形",
          "original_form": "ある",
          "pos": "動詞",
          "prononciation": "アリ",
          "subclass1": "自立",
          "subclass2": "*",
          "subclass3": "*",
          "surface": "あり",
          "yomi": "アリ"
        },
        "node_type": "NORMAL",
        "surface": "あり"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "特殊・マス",
          "conjugation_type": "基本形",
          "original_form": "ます",
          "pos": "助動詞",
          "prononciation": "マス",
          "subclass1": "*",
          "subclass2": "*",
          "subclass3": "*",
          "surface": "ます",
          "yomi": "マス"
        },
        "node_type": "NORMAL",
        "surface": "ます"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "。",
          "pos": "記号",
          "prononciation": "。",
          "subclass1": "句点",
          "subclass2": "*",
          "subclass3": "*",
          "surface": "。",
          "yomi": "。"
        },
        "node_type": "NORMAL",
        "surface": "。"
      },
      "type": "Feature"
    },
    {
      "geometry": {
        "coordinates": [
          139.75767000000002,
          35.69044
        ],
        "type": "Point"
      },
      "properties": {
        "geoword_properties": {
          "body": "竹橋",
          "dictionary_id": 3,
          "dictionary_identifier": "geonlp:ksj-station-N02",
          "entry_id": "976eu3",
          "geolod_id": "3QKgos",
          "hypernym": [
            "東京地下鉄",
            "5号線東西線"
          ],
          "institution_type": "民営鉄道",
          "latitude": "35.69044",
          "longitude": "139.75767000000002",
          "ne_class": "鉄道施設/鉄道駅",
          "railway_class": "普通鉄道",
          "suffix": [
            "駅",
            ""
          ]
        },
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "竹橋駅",
          "pos": "名詞",
          "prononciation": "",
          "subclass1": "固有名詞",
          "subclass2": "地名語",
          "subclass3": "3QKgos:竹橋駅",
          "surface": "竹橋駅",
          "yomi": ""
        },
        "node_type": "GEOWORD",
        "surface": "竹橋駅"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "も",
          "pos": "助詞",
          "prononciation": "モ",
          "subclass1": "係助詞",
          "subclass2": "*",
          "subclass3": "*",
          "surface": "も",
          "yomi": "モ"
        },
        "node_type": "NORMAL",
        "surface": "も"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "形容詞・アウオ段",
          "conjugation_type": "基本形",
          "original_form": "近い",
          "pos": "形容詞",
          "prononciation": "チカイ",
          "subclass1": "自立",
          "subclass2": "*",
          "subclass3": "*",
          "surface": "近い",
          "yomi": "チカイ"
        },
        "node_type": "NORMAL",
        "surface": "近い"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "特殊・デス",
          "conjugation_type": "基本形",
          "original_form": "です",
          "pos": "助動詞",
          "prononciation": "デス",
          "subclass1": "*",
          "subclass2": "*",
          "subclass3": "*",
          "surface": "です",
          "yomi": "デス"
        },
        "node_type": "NORMAL",
        "surface": "です"
      },
      "type": "Feature"
    },
    {
      "geometry": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "。",
          "pos": "記号",
          "prononciation": "。",
          "subclass1": "句点",
          "subclass2": "*",
          "subclass3": "*",
          "surface": "。",
          "yomi": "。"
        },
        "node_type": "NORMAL",
        "surface": "。"
      },
      "type": "Feature"
    }
  ],
  "type": "FeatureCollection"
}