7.6.12. time-after オプション

TimeAfterFilter を作成し、 geonlp.parse および geonlp.parseStructured の結果に対して このフィルタを適用します。

パラメータで指定された時点または期間の終了日時より後に 存在した地名語以外は地名語ではない固有名詞に置き換えられます。

期間の開始日時は結果に影響を与えません。

パラメータ

time-after : str, list of str, dict

  • str の場合、一時点を表す日付または日時と解釈します。

  • list の場合、要素が1つならば一時点を、2つならば期間を 表す日付または日時と解釈します。

  • dict の場合、 date_from の値が期間の開始時点を、 date_to の値が期間の終了時点を表す日付または日時と 解釈します。 date_to は省略可能です。

7.6.12.1. リクエストの例

2001年2月1日より後に存在した地名語だけを抽出します。 「田無市」「保谷市」はこの時点より前に合併して「西東京市」になったので、 「田無市」「保谷市」は非地名語、「西東京市」は地名語として解釈されます。

{
  "method": "geonlp.parse",
  "params": {
    "sentence": "田無市と保谷市は2001年1月21日に合併して西東京市になりました。",
    "options": {
      "time-after": [
        "2000-01-01",
        "2001-02-01"
      ]
    }
  },
  "id": "test_time_after"
}

7.6.12.2. レスポンスの例

{
  "features": [
    {
      "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": null,
      "properties": {
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "*",
          "pos": "名詞",
          "prononciation": "",
          "subclass1": "数",
          "subclass2": "*",
          "subclass3": "*",
          "surface": "2001",
          "yomi": ""
        },
        "node_type": "NORMAL",
        "surface": "2001"
      },
      "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": "21",
          "yomi": ""
        },
        "node_type": "NORMAL",
        "surface": "21"
      },
      "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": 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.538159,
          35.725499
        ],
        "type": "Point"
      },
      "properties": {
        "geoword_properties": {
          "address": "東京都西東京市",
          "body": "西東京",
          "body_variants": "西東京",
          "code": {},
          "countyname": "",
          "countyname_variants": "",
          "dictionary_id": 1,
          "dictionary_identifier": "geonlp:geoshape-city",
          "entry_id": "13229A2001",
          "geolod_id": "pueGMO",
          "hypernym": [
            "東京都"
          ],
          "latitude": "35.72549900",
          "longitude": "139.53815900",
          "ne_class": "市区町村",
          "prefname": "東京都",
          "prefname_variants": "東京都",
          "source": "1/西東京市役所/西東京市南町5-6-13/P34-14_13.xml",
          "suffix": [
            "市"
          ],
          "valid_from": "2001-01-21",
          "valid_to": ""
        },
        "morphemes": {
          "conjugated_form": "*",
          "conjugation_type": "*",
          "original_form": "西東京市",
          "pos": "名詞",
          "prononciation": "",
          "subclass1": "固有名詞",
          "subclass2": "地名語",
          "subclass3": "pueGMO:西東京市",
          "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"
    },
    {
      "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"
}