7.6.14. time-covers オプション
TimeCoversFilter
を作成し、 geonlp.parse
および geonlp.parseStructured の結果に対して
このフィルタを適用します。
パラメータで指定された時点または期間の開始日時から 終了日時まで存在し続けた地名語 以外は地名語ではない固有名詞に置き換えられます。
パラメータ
time-covers : str, list of str, dict
str の場合、一時点を表す日付または日時と解釈します。
list の場合、要素が1つならば一時点を、2つならば期間を 表す日付または日時と解釈します。
dict の場合、
date_from
の値が期間の開始時点を、date_to
の値が期間の終了時点を表す日付または日時と 解釈します。date_to
は省略可能です。
7.6.14.1. リクエストの例
2000年1月1日から2001年2月1日の間、ずっと存在した地名語だけを抽出します。 「田無市」「保谷市」はこの期間内に合併して「西東京市」になったので、 「田無市」「保谷市」「西東京市」は非地名語として解釈されます。
{
"method": "geonlp.parse",
"params": {
"sentence": "田無市と保谷市は2001年1月21日に合併して西東京市になりました。",
"options": {
"time-covers": [
"2000-01-01",
"2001-02-01"
]
}
},
"id": "test_time_covers"
}
7.6.14.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": 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": null,
"properties": {
"morphemes": {
"conjugated_form": "*",
"conjugation_type": "*",
"original_form": "。",
"pos": "記号",
"prononciation": "。",
"subclass1": "句点",
"subclass2": "*",
"subclass3": "*",
"surface": "。",
"yomi": "。"
},
"node_type": "NORMAL",
"surface": "。"
},
"type": "Feature"
}
],
"type": "FeatureCollection"
}