{
  "openapi": "3.0.0",
  "info": {
    "title": "概要",
    "version": "4.8.0.0",
    "description": "このリファレンスでは、標準のHTTPとJSONベースの通信を使用してTisane APIを操作するためのRESTful webメソッドについてご紹介します。"
  },
  "servers": [
    {
      "url": "https://api.tisane.ai",
      "description": "Tisaneパブリッククラウド"
    }
  ],
  "tags": [
    {
      "name": "NLU / NLP Methods",
      "description": "これらは、入力テキストの解析と変換を実際に実行するメソッドです。"
    },
    {
      "name": "Language Model Direct Access",
      "description": "言語モデルからエントリを取得し、検査するメソッド。"
    }
  ],
  "components": {
    "schemas": {
      "Feature": {
        "type": "object",
        "required": [
          "index",
          "value"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "機能の種類。指定されていない場合：文法",
            "enum": [
              "Grammar",
              "Semantics",
              "Style"
            ]
          },
          "index": {
            "type": "integer",
            "description": "機能インデックス（そのタイプ内）"
          },
          "value": {
            "type": "string",
            "description": "機能値ID"
          }
        }
      },
      "FeatureArray": {
        "type": "array",
        "items": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/components/schemas/Feature"
            }
          ]
        }
      },
      "Memory": {
        "type": "object",
        "properties": {
          "flags": {
            "$ref": "#/components/schemas/FeatureArray",
            "description": "フラグとセマンティック機能のセット。"
          },
          "antecedents": {
            "type": "array",
            "description": "共参照解決に使用される以前に言及された要素。",
            "items": {
              "type": "object",
              "properties": {
                "family": {
                  "type": "integer",
                  "description": "先行詞のファミリーID。"
                },
                "features": {
                  "$ref": "#/components/schemas/FeatureArray"
                }
              }
            }
          },
          "assign": {
            "type": "array",
            "description": "パーシング時に実行される条件付き代入。",
            "items": {
              "type": "object",
              "required": [
                "if",
                "then"
              ],
              "properties": {
                "if": {
                  "type": "object",
                  "description": "一致する条件（すべての条件が一致する必要があります）。",
                  "properties": {
                    "family": {
                      "type": "integer",
                      "description": "ターゲット語彙素のファミリーID。"
                    },
                    "hypernym": {
                      "type": "integer",
                      "description": "ターゲット語彙素の上位語のファミリーID。"
                    },
                    "features": {
                      "description": "一致させる機能。",
                      "$ref": "#/components/schemas/FeatureArray"
                    },
                    "regex": {
                      "type": "string",
                      "description": "一致させる正規表現。"
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "description": "割り当てる属性値。",
                  "properties": {
                    "family": {
                      "type": "integer",
                      "description": "割り当てるファミリーID。"
                    },
                    "hypernym": {
                      "type": "integer",
                      "description": "上位語に割り当てるファミリーID。"
                    },
                    "features": {
                      "description": "割り当てる機能。",
                      "$ref": "#/components/schemas/FeatureArray"
                    },
                    "attribution": {
                      "type": "boolean",
                      "description": "ターゲットを属性としてマークします。"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "Phrase": {
        "type": "object",
        "required": [
          "type",
          "family",
          "offset",
          "length",
          "text"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "フレーズの種類（名詞句／動詞句／形容詞句／副詞句／主語）。"
          },
          "family": {
            "type": "integer",
            "description": "フレーズのファミリーID。"
          },
          "offset": {
            "type": "integer",
            "description": "フレーズが始まるオフセット位置。"
          },
          "length": {
            "type": "integer",
            "description": "フレーズ文字列の長さ。"
          },
          "text": {
            "type": "string",
            "description": "バーティカルバーで区切られた要素と、括弧で囲まれた内部フレーズで構成されるフレーズのテキスト。例：*I|(love|Lucy)*。"
          },
          "role": {
            "type": "string",
            "description": "文中のフレーズの意味役割。"
          },
          "children": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Phrase"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "Tisane-API-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "Ocp-Apim-Subscription-Key",
        "description": "[Tisane開発者向けポータル](https://dev.tisane.ai/profile) に記載のAPIサブスクリプションキー（プライマリまたはセカンダリ）"
      }
    }
  },
  "paths": {
    "/parse": {
      "post": {
        "operationId": "parse",
        "security": [
          {
            "Tisane-API-Key": []
          }
        ],
        "tags": [
          "NLU / NLP Methods"
        ],
        "summary": "テキストの解析",
        "description": "このメソッドは、入力データを解析し、問題のあるコンテンツ、感情スニペット、エンティティ、トピック、フレーズ構造、品詞、ストップワードなどを検出します。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "language",
                  "content"
                ],
                "properties": {
                  "language": {
                    "type": "string"
                  },
                  "content": {
                    "type": "string"
                  },
                  "settings": {
                    "type": "object"
                  }
                }
              },
              "examples": {
                "Hello Tisane": {
                  "value": {
                    "language": "en",
                    "content": "Hello Tisane API!!"
                  }
                },
                "Abuse detection": {
                  "value": {
                    "language": "en",
                    "content": "Babylonians should stay away from our country. We are full.",
                    "settings": {
                      "snippets": true
                    }
                  }
                },
                "Extract topics (native standard)": {
                  "value": {
                    "language": "en",
                    "content": "An inertial force is a force that resists a change in velocity of an object."
                  }
                },
                "Extract topics (IAB standard)": {
                  "value": {
                    "language": "en",
                    "content": "moon, Jupiter and Mars",
                    "settings": {
                      "topic_standard": "iab_description",
                      "entities": false
                    }
                  }
                },
                "Adverse media monitoring in fintech": {
                  "value": {
                    "language": "en",
                    "content": "HSBC has been accused of money laundering recently",
                    "settings": {
                      "snippets": true,
                      "sentiment_analysis_type": "entity"
                    }
                  }
                },
                "Parse alias w/ sentence structure": {
                  "value": {
                    "language": "en",
                    "content": "anxiousgayhorseonketamine",
                    "settings": {
                      "parses": true,
                      "subscope": true,
                      "sentiment": false,
                      "format": "alias"
                    }
                  }
                },
                "Parse hashtag and output words": {
                  "value": {
                    "language": "en",
                    "content": "deathtodishonestpeople",
                    "settings": {
                      "words": true,
                      "subscope": true,
                      "sentiment": false,
                      "fetch_definitions": true
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "text"
                  ],
                  "properties": {
                    "text": {
                      "type": "string",
                      "description": "テキストを入力します。"
                    },
                    "language": {
                      "type": "string",
                      "description": "言語コード（言語同定が使用される場合）"
                    },
                    "memory": {
                      "$ref": "#/components/schemas/Memory",
                      "description": "解析後の状態。今後の解析の状態を設定するために使用できます（`state`を`true`に設定すると表示されます）。"
                    },
                    "topics": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "object",
                            "required": [
                              "topic",
                              "coverage"
                            ],
                            "properties": {
                              "topic": {
                                "type": "string"
                              },
                              "coverage": {
                                "type": "number"
                              }
                            }
                          }
                        ]
                      }
                    },
                    "abuse": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "offset",
                          "length",
                          "sentence_index",
                          "type",
                          "severity"
                        ],
                        "properties": {
                          "offset": {
                            "type": "integer",
                            "description": "文中の0ベースの位置"
                          },
                          "length": {
                            "type": "integer",
                            "description": "断片の長さ"
                          },
                          "sentence_index": {
                            "type": "integer",
                            "description": "断片が存在する文のインデックス"
                          },
                          "type": {
                            "type": "string",
                            "description": "問題のあるコンテンツの種類",
                            "enum": [
                              "personal_attack",
                              "bigotry",
                              "external_contact",
                              "profanity",
                              "sexual_advances",
                              "criminal_activity",
                              "adult_only",
                              "mental_issues",
                              "contentious",
                              "spam",
                              "social_hierarchy",
                              "no_meaningful_content",
                              "generic"
                            ]
                          },
                          "severity": {
                            "type": "string",
                            "description": "問題の重大度",
                            "enum": [
                              "low",
                              "medium",
                              "high",
                              "extreme"
                            ]
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "text": {
                            "type": "string",
                            "description": "その断片自体（`snippets`は`true`に設定する必要があります）"
                          },
                          "explanation": {
                            "type": "string",
                            "description": "フラグ付けの理由に関する人間が判読できる説明"
                          }
                        }
                      }
                    },
                    "sentence_list": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "offset",
                          "text",
                          "words",
                          "parse_tree"
                        ],
                        "properties": {
                          "offset": {
                            "type": "integer",
                            "description": "文の開始位置のオフセット。"
                          },
                          "text": {
                            "type": "string",
                            "description": "その文自体。"
                          },
                          "words": {
                            "type": "array",
                            "description": "トークン化された語彙単位／語彙チャンクの配列（必ずしもスペースや句読点で区切られていません）。`words` が`true`に設定されている場合にのみ表示されます。",
                            "items": {
                              "type": "object",
                              "required": [
                                "offset",
                                "length",
                                "type",
                                "text"
                              ],
                              "properties": {
                                "offset": {
                                  "type": "integer",
                                  "description": "語彙チャンクが開始されるオフセット。"
                                },
                                "length": {
                                  "type": "integer",
                                  "description": "語彙チャンクの長さ。"
                                },
                                "type": {
                                  "type": "string",
                                  "description": "語彙的チャンクのタイプ。",
                                  "enum": [
                                    "word",
                                    "numeral",
                                    "punctuation"
                                  ]
                                },
                                "text": {
                                  "type": "string",
                                  "description": "語彙チャンクの文字列。"
                                },
                                "stopword": {
                                  "type": "boolean",
                                  "description": "ストップワードであるかどうか。"
                                },
                                "role": {
                                  "type": "string",
                                  "description": "単語の意味役割（割り当てられた場合）。",
                                  "enum": [
                                    "agent",
                                    "patient",
                                    "complement",
                                    "circumstance",
                                    "beneficiary",
                                    "verb",
                                    "surname",
                                    "list_item",
                                    "given_name",
                                    "social_role",
                                    "title",
                                    "street_name",
                                    "street_type",
                                    "nickname",
                                    "country",
                                    "settlement",
                                    "state",
                                    "zipcode"
                                  ]
                                },
                                "description": {
                                  "type": "string",
                                  "description": "現在の文脈における曖昧さを解消した意味の説明（常に英語で記載）。"
                                },
                                "definition": {
                                  "type": "string",
                                  "description": "現在の文脈における曖昧さを解消した意味の辞書的な定義（常に英語で記載）。"
                                },
                                "wikidata": {
                                  "type": "string",
                                  "description": "現在の単語の意味のWikidata ID（存在する場合）。"
                                },
                                "lexeme": {
                                  "type": "integer",
                                  "description": "一意の語彙識別子。"
                                },
                                "family": {
                                  "type": "integer",
                                  "description": "ファミリー識別子。"
                                },
                                "grammar": {
                                  "$ref": "#/components/schemas/FeatureArray"
                                }
                              }
                            }
                          },
                          "parse_tree": {
                            "type": "object",
                            "description": "文内で検出されたフレーズを階層的に配置したグラフ。表示するには`parses`を`true`に設定する必要があります。",
                            "required": [
                              "id",
                              "phrases"
                            ],
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "文の構文解析・解釈の内部実行時識別子。"
                              },
                              "phrases": {
                                "type": "array",
                                "description": "最上位に基本フレーズが配置されているフレーズのグラフ。",
                                "items": {
                                  "$ref": "#/components/schemas/Phrase"
                                }
                              }
                            }
                          },
                          "corrected_text": {
                            "type": "string",
                            "description": "組み込みのスペルチェック機能で修正された文。"
                          }
                        }
                      }
                    },
                    "entities_summary": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "type",
                          "name",
                          "mentions"
                        ],
                        "properties": {
                          "type": {
                            "description": "エンティティのタイプ。",
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            ]
                          },
                          "name": {
                            "type": "string",
                            "description": "エンティティの標準名。"
                          },
                          "subtypes": {
                            "type": "array",
                            "description": "エンティティのサブタイプ。",
                            "items": {
                              "type": "string"
                            }
                          },
                          "subtype": {
                            "type": "string",
                            "description": "エンティティの主要なサブタイプ。"
                          },
                          "wikidata": {
                            "type": "string",
                            "description": "Wikidata ID（存在する場合）"
                          },
                          "relations": {
                            "type": "array",
                            "description": "他の検出されたエンティティとのエンティティ関係。",
                            "items": {
                              "type": "object",
                              "required": [
                                "to"
                              ],
                              "properties": {
                                "to": {
                                  "type": "string",
                                  "description": "関連するエンティティ。"
                                },
                                "links": {
                                  "type": "array",
                                  "description": "エンティティがどのように関連しているか。",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          },
                          "mentions": {
                            "type": "array",
                            "description": "入力テキスト内で検出されたエンティティの言及。",
                            "items": {
                              "type": "object",
                              "required": [
                                "offset",
                                "length",
                                "sentence_index"
                              ],
                              "properties": {
                                "offset": {
                                  "type": "integer",
                                  "description": "文中の0ベースの位置"
                                },
                                "length": {
                                  "type": "integer",
                                  "description": "断片の長さ"
                                },
                                "sentence_index": {
                                  "type": "integer",
                                  "description": "断片が存在する文のインデックス"
                                },
                                "text": {
                                  "type": "string",
                                  "description": "その断片自体（`snippets`は`true`に設定する必要があります）"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "sentiment_expressions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "offset",
                          "length",
                          "sentence_index",
                          "polarity"
                        ],
                        "properties": {
                          "polarity": {
                            "type": "string",
                            "description": "感情の極性",
                            "enum": [
                              "positive",
                              "negative",
                              "mixed",
                              "neutral"
                            ]
                          },
                          "offset": {
                            "type": "integer",
                            "description": "文中の0ベースの位置"
                          },
                          "length": {
                            "type": "integer",
                            "description": "断片の長さ"
                          },
                          "sentence_index": {
                            "type": "integer",
                            "description": "断片が存在する文のインデックス"
                          },
                          "targets": {
                            "type": "array",
                            "description": "アスペクトのターゲット（アスペクトベースの感情分析用）。",
                            "items": {
                              "type": "string"
                            }
                          },
                          "reasons": {
                            "type": "array",
                            "description": "理由タグ（アスペクトベースの感情分析用）。",
                            "items": {
                              "type": "string"
                            }
                          },
                          "text": {
                            "type": "string",
                            "description": "その断片自体（`snippets`は`true`に設定する必要があります）"
                          },
                          "explanation": {
                            "type": "string",
                            "description": "フラグ付けの理由に関する人間が判読できる説明"
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Hello Tisane": {
                    "value": {
                      "text": "Hello Tisane API!",
                      "entities_summary": [
                        {
                          "type": "software",
                          "name": "Tisane API",
                          "mentions": [
                            {
                              "sentence_index": 0,
                              "offset": 6,
                              "length": 10
                            }
                          ]
                        }
                      ]
                    }
                  },
                  "Abuse detection": {
                    "value": {
                      "text": "Babylonians should stay away from our country. We are full.",
                      "abuse": [
                        {
                          "sentence_index": 0,
                          "offset": 0,
                          "length": 45,
                          "text": "Babylonians should stay away from our country",
                          "type": "bigotry",
                          "severity": "low"
                        }
                      ],
                      "sentiment_expressions": [
                        {
                          "sentence_index": 0,
                          "offset": 0,
                          "length": 45,
                          "text": "Babylonians should stay away from our country",
                          "polarity": "negative"
                        }
                      ]
                    }
                  },
                  "Extract topics (native standard)": {
                    "value": {
                      "text": "An inertial force is a force that resists a change in velocity of an object.",
                      "topics": [
                        "physics"
                      ]
                    }
                  },
                  "Extract topics (IAB standard)": {
                    "value": {
                      "text": "moon, Jupiter and Mars",
                      "topics": [
                        "Space and Astronomy"
                      ]
                    }
                  },
                  "Adverse media monitoring in fintech": {
                    "value": {
                      "text": "HSBC has been accused of money laundering recently",
                      "topics": [
                        "laws"
                      ],
                      "sentiment_expressions": [
                        {
                          "sentence_index": 0,
                          "offset": 0,
                          "length": 41,
                          "text": "HSBC has been accused of money laundering",
                          "polarity": "negative",
                          "reasons": [
                            "compliance",
                            "misconduct"
                          ]
                        }
                      ],
                      "entities_summary": [
                        {
                          "type": "organization",
                          "name": "HSBC",
                          "mentions": [
                            {
                              "sentence_index": 0,
                              "offset": 0,
                              "length": 4,
                              "text": "HSBC"
                            }
                          ]
                        }
                      ]
                    }
                  },
                  "Parse alias w/ sentence structure": {
                    "value": {
                      "text": "anxiousgayhorseonketamine",
                      "topics": [],
                      "abuse": [
                        {
                          "sentence_index": 0,
                          "offset": 17,
                          "length": 8,
                          "type": "adult_only",
                          "severity": "high",
                          "tags": [
                            "hallucinogen"
                          ]
                        }
                      ]
                    }
                  },
                  "Parse hashtag and output words": {
                    "value": {
                      "text": "#deathtodishonestpeople",
                      "topics": [
                        "crime"
                      ],
                      "abuse": [
                        {
                          "sentence_index": 0,
                          "offset": 1,
                          "length": 22,
                          "type": "criminal_activity",
                          "severity": "extreme",
                          "tags": [
                            "call_for_violence",
                            "death"
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - 無効なJSONまたは言語コード。"
          },
          "401": {
            "description": "Unauthorized - 無効なAPIキーまたはクォータ超過です。"
          },
          "500": {
            "description": "内部サーバーエラー"
          }
        }
      }
    },
    "/languages": {
      "get": {
        "operationId": "languages",
        "security": [
          {
            "Tisane-API-Key": []
          }
        ],
        "tags": [
          "NLU / NLP Methods"
        ],
        "summary": "利用可能なすべての言語を一覧表示",
        "description": "サポートされている言語のリストを取得します。\n\nレスポンスには以下の属性が含まれます。\n* `id` - 言語ID。\n* `name` - ネイティブネーム。\n* `englishName` - 英語名。\n* `nativeEncoding` - 言語のエンコーディング。\n* `preferredFont` - 表示に推奨されるフォント。\n* `latin` - 言語がラテン文字を使用しているかどうか。\n* `rightToLeft` - 言語が右から左へ書く文字体系を使用しているか（例：アラビア語、ヘブライ語、ペルシア語）。",
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          }
        ],
        "responses": {
          "200": {
            "description": "正常なレスポンス",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "isoCode": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "englishName": {
                        "type": "string"
                      },
                      "nativeEncoding": {
                        "type": "string"
                      },
                      "fontFace": {
                        "type": "string"
                      },
                      "latin": {
                        "type": "boolean"
                      },
                      "rightToLeft": {
                        "type": "boolean"
                      }
                    }
                  }
                },
                "example": [
                  {
                    "isoCode": "ar",
                    "name": "العربية",
                    "englishName": "Arabic",
                    "nativeEncoding": "iso-8859-6",
                    "fontFace": "Arial",
                    "latin": false,
                    "rightToLeft": true
                  },
                  {
                    "isoCode": "en",
                    "name": "English",
                    "englishName": "English",
                    "nativeEncoding": "iso-8859-1",
                    "fontFace": "Arial",
                    "latin": true
                  },
                  {
                    "isoCode": "zh-CN",
                    "name": "简体中文",
                    "englishName": "Chinese, Simplified",
                    "nativeEncoding": "gb18030",
                    "fontFace": "NSimSun",
                    "latin": false
                  },
                  {
                    "isoCode": "zh-TW",
                    "name": "繁體中文",
                    "englishName": "Chinese, Traditional",
                    "nativeEncoding": "iso-8859-1",
                    "fontFace": "Arial Unicode MS",
                    "latin": false
                  },
                  {
                    "isoCode": "ja",
                    "name": "日本語",
                    "englishName": "Japanese",
                    "nativeEncoding": "ISO-2022",
                    "fontFace": "MS Mincho",
                    "latin": false
                  },
                  {
                    "isoCode": "ru",
                    "name": "русский",
                    "englishName": "Russian",
                    "nativeEncoding": "iso-8859-1",
                    "fontFace": "Arial",
                    "latin": false
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/helper/extract_text": {
      "post": {
        "operationId": "extract_text",
        "security": [
          {
            "Tisane-API-Key": []
          }
        ],
        "tags": [
          "NLU / NLP Methods"
        ],
        "summary": "テキストのクリーンアップ",
        "description": "JavaScript、CSSタグ、JSON、その他のマークアップを削除し、デコードされた純粋なテキストを返すサービスメソッド。\nリクエストボディには、テキストが抽出されるマークアップコンテンツが含まれています。\n\n注意：このメソッドはバイナリコンテンツを処理しません。",
        "requestBody": {
          "required": true,
          "content": {
            "text/plain": {
              "schema": {
                "type": "string"
              },
              "example": "<p>Clean me up</p> <style>/* Styles are unnecessary for text analysis */</style>"
            }
          }
        },
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "正常なレスポンス",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "Clean me up"
              }
            }
          }
        }
      }
    },
    "/compare/entities": {
      "post": {
        "operationId": "compareEntities",
        "security": [
          {
            "Tisane-API-Key": []
          }
        ],
        "tags": [
          "NLU / NLP Methods"
        ],
        "summary": "固有表現の比較",
        "description": "2つの複合固有表現を比較し、違いを特定します。\nリクエストボディには以下の内容を含める必要があります。\n* `language1` （文字列） -最初のエンティティの言語のIETFタグ。\n* `entity1`（文字列） -最初のエンティティ。\n* `language2`（文字列） - 2番目のエンティティの言語のIETFタグ。\n* `entity2`（文字列） - 2番目のエンティティ。\n* `type`（文字列） -エンティティのタイプ（現在、personのみがサポートされています）。\n\n詳細：[Tisane API レスポンスガイドにおける固有表現](./tisane-api-response-guide.md#named-entities)\nレスポンスには以下が含まれます。\n* `result`（文字列） - 比較結果：\n* `no_single_entity` - 1つまたは両方のエンティティが無効です。\n* `same` - エンティティは同一です（名前順が異なる場合があります）。\n* `different` - エンティティは異なり、詳細は`differences`に記載。\n* `differences`（文字列の配列） - 検出された差異は以下の通り。\n\n    * `given_name`\n    \n    * `surname`\n    \n    * `title`（例：Mr.、Mrs.）\n\n    * `social_role`（例：学位）\n    \n    * `suffix`\n    \n    * `variation`（例：スペルやスタイルの違い）",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "language1": "en",
                "entity1": "Gary Youngman MD",
                "language2": "en",
                "entity2": "Gary Oldman",
                "type": "person"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          }
        ],
        "responses": {
          "200": {
            "description": "正常なレスポンス",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "result": "different",
                  "differences": [
                    "surname",
                    "social_role"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/similarity": {
      "post": {
        "operationId": "similarity",
        "security": [
          {
            "Tisane-API-Key": []
          }
        ],
        "tags": [
          "NLU / NLP Methods"
        ],
        "summary": "意味的類似性",
        "description": "2つのテキスト断片の意味的類似度を計算します。同じ言語のテキスト断片でも、異なる言語のテキスト断片でも可能です。\n\nリクエストボディには以下を含める必要があります。\n* `content1`（文字列） - 最初のテキスト断片。\n* `language1`（文字列） - `content1`のIETF言語コード。\n* `content2`（文字列） -比較対象の2番目のテキスト断片。\n* `language2`（文字列） -`content2`のIETF言語コード。\n* `settings` (object) - Additional settings as per specifications. More information: \"* `settings`（オブジェクト） - 仕様に従った追加の設定。詳細：[Tisane API設定およびカスタマイズガイド](./tisane-api-configuration.md)。\"\n\nレスポンスは0から1の間の数値で、送信されたテキスト断片の類似度を表します。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "language1": "en",
                "content1": "Franz Ferdinand was assassinated by a Serbian revolutionary",
                "language2": "en",
                "content2": "A Yugoslav radical assassinated Franz Ferdinand",
                "settings": {}
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "number"
                },
                "example": 0.6190476190476191
              }
            }
          }
        }
      }
    },
    "/detectLanguage": {
      "post": {
        "operationId": "detectLanguage",
        "security": [
          {
            "Tisane-API-Key": []
          }
        ],
        "tags": [
          "NLU / NLP Methods"
        ],
        "summary": "言語を検出する",
        "description": "提供されたテキスト断片で使用されている言語を検出し、オフセットごとの内訳を返します。\n\nリクエストボディには以下の内容を含める必要があります。\n* `content`（文字列） -解析対象のテキスト断片。\n* `languages`（文字列、オプション） - 言語コードのバーティカルバー区切りリストで、キューとして使用します。\n* `delimiter` (文字列、オプション) - 断片を分割するための正規表現。デフォルトでは、断片は分割されません。\nレスポンスは、言語コードの内訳が記載された`languages` を含むJSON構造です。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "description": "解析対象のテキスト断片。"
                  },
                  "languages": {
                    "type": "string",
                    "description": "キューとして使用する言語コードのバーティカルバー区切りリスト。"
                  },
                  "delimiter": {
                    "type": "string",
                    "description": "断片を分割するための正規表現。デフォルトでは、断片は分割されません。"
                  }
                }
              },
              "examples": {
                "基本": {
                  "value": {
                    "content": "c'est la vie"
                  }
                },
                "曖昧なケースのヒント": {
                  "value": {
                    "content": "singular",
                    "languages": "es|ar"
                  }
                },
                "行単位の言語分割の内訳": {
                  "value": {
                    "content": "скушай\r\nmuffin\r\nכפארה",
                    "languages": "en|ru|th|he",
                    "delimiter": "[\\r\\n]"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          }
        ],
        "responses": {
          "200": {
            "description": "正常なレスポンス",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "基本": {
                    "value": {
                      "languages": [
                        {
                          "offset": 0,
                          "length": 12,
                          "language": "fr",
                          "score": 1181
                        }
                      ]
                    }
                  },
                  "曖昧なケースのヒント": {
                    "value": {
                      "languages": [
                        {
                          "offset": 0,
                          "length": 8,
                          "language": "es",
                          "score": 1137
                        }
                      ]
                    }
                  },
                  "行単位の言語分割の内訳": {
                    "value": {
                      "languages": [
                        {
                          "offset": 0,
                          "length": 7,
                          "language": "ru",
                          "score": 866
                        },
                        {
                          "offset": 8,
                          "length": 6,
                          "language": "en",
                          "score": 731
                        },
                        {
                          "offset": 16,
                          "length": 6,
                          "language": "he",
                          "score": 1024
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/transform": {
      "post": {
        "operationId": "transform",
        "security": [
          {
            "Tisane-API-Key": []
          }
        ],
        "tags": [
          "NLU / NLP Methods"
        ],
        "summary": "テキストの翻訳",
        "description": "このメソッドは、入力テキストを翻訳します。\nリクエストボディには、以下の要素を含める必要があります。\n* `from`（文字列） - ソース言語の標準IETFタグ。`*`または言語コードのバーティカルバー区切りのセットを用いて自動検出を呼び出します。\n* `to` (string) - ターゲット言語の標準IETFタグ。ソース言語とターゲット言語が同じ場合、パラフレーズが適用されます。\n* `content`（文字列） - 翻訳対象のテキスト内容。\n* `settings`（オブジェクト） - 追加の翻訳設定。\n\n詳細：[Tisane API設定およびカスタマイズガイド](./tisane-api-configuration.md)。\n\nレスポンスは変換されたテキストです。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string"
                  },
                  "to": {
                    "type": "string"
                  },
                  "content": {
                    "type": "string"
                  },
                  "settings": {
                    "type": "object",
                    "properties": {
                      "snippets": {
                        "type": "boolean",
                        "description": "`true`に設定すると、関連する断片が`abuse`、`sentiment_expressions`、`entities_summary`セクションに含められます。"
                      },
                      "abuse": {
                        "type": "boolean",
                        "description": "`abuse`を出力するかどうか。デフォルト：`true`"
                      },
                      "sentiment": {
                        "type": "boolean",
                        "description": "感情を出力するかどうか。デフォルト：`true`"
                      },
                      "topics": {
                        "type": "boolean",
                        "description": "トピックを出力するかどうか。デフォルト：`true`"
                      },
                      "entities": {
                        "type": "boolean",
                        "description": "エンティティ情報を出力するかどうか。デフォルト：`true`"
                      },
                      "relations": {
                        "type": "boolean",
                        "description": "`true`の場合、エンティティ間の関係が提供されます。"
                      },
                      "disable_spellcheck": {
                        "type": "boolean",
                        "description": "`true`に設定すると、スペルチェックは使用されません。デフォルト：`false`（スペルチェックはデフォルトで有効になっています）"
                      },
                      "words": {
                        "type": "boolean",
                        "description": "`true`に設定すると、個々の語彙チャンクが提供されます。"
                      },
                      "state": {
                        "type": "boolean",
                        "description": "`true`に設定すると、長期記憶の内容が返されます。"
                      },
                      "memory": {
                        "$ref": "#/components/schemas/Memory",
                        "description": "長期記憶の内容を初期化します。"
                      }
                    },
                    "additionalProperties": true
                  }
                }
              },
              "examples": {
                "日本語の文を翻訳": {
                  "value": {
                    "from": "ja",
                    "to": "en",
                    "content": "彼女はりんごを食べます",
                    "settings": {}
                  }
                },
                "言語を自動検出してから、中国語の名前を英語に翻訳": {
                  "value": {
                    "from": "*",
                    "to": "en",
                    "content": "汪杰世",
                    "settings": {
                      "entity": "person"
                    }
                  }
                },
                "英語からロシア語へ翻訳": {
                  "value": {
                    "from": "en",
                    "to": "ru",
                    "content": "The movie is available on amazon prime",
                    "settings": {}
                  }
                },
                "ロシア語の薬物中毒者の隠語を英語に翻訳": {
                  "value": {
                    "from": "ru",
                    "to": "en",
                    "content": "юзаю амф умеренно",
                    "settings": {}
                  }
                },
                "性別を保持してヘブライ語からロシア語に翻訳": {
                  "value": {
                    "from": "he",
                    "to": "ru",
                    "content": "אני אוהב סיניות",
                    "settings": {}
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          }
        ],
        "responses": {
          "200": {
            "description": "正常な翻訳のレスポンス",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "日本語の文を翻訳": {
                    "value": "She is eating an apple"
                  },
                  "言語を自動検出してから、中国語の名前を英語に翻訳": {
                    "value": "Wang Jie Shi"
                  },
                  "英語からロシア語へ翻訳": {
                    "value": "Фильм доступен на amazon prime"
                  },
                  "ロシア語の薬物中毒者の隠語を英語に翻訳": {
                    "value": "I moderately take amphetamine"
                  },
                  "性別を保持してヘブライ語からロシア語に翻訳": {
                    "value": "Я люблю китаянок"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - 無効なJSONまたは言語コード。"
          },
          "401": {
            "description": "Unauthorized - 無効なAPIキーまたはクォータ超過です。"
          },
          "500": {
            "description": "内部サーバーエラー"
          }
        }
      }
    },
    "/lm/inflections": {
      "get": {
        "operationId": "inflections",
        "security": [
          {
            "Tisane-API-Key": []
          }
        ],
        "tags": [
          "Language Model Direct Access"
        ],
        "summary": "活用形のリスト",
        "description": "所定の語族内の指定された語彙素の活用形を取得",
        "parameters": [
          {
            "name": "language",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The code of a language in Tisane. Example: \"Tisaneにおける言語コード。例：`en`。\"",
            "example": "en"
          },
          {
            "name": "lexeme",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "検査対象の語彙素のID。",
            "example": 3130180
          },
          {
            "name": "family",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "検査対象のファミリーのID。",
            "example": 58443
          }
        ],
        "responses": {
          "200": {
            "description": "正常なレスポンス",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string"
                      },
                      "isLemma": {
                        "type": "boolean"
                      },
                      "features": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "index": {
                              "type": "integer"
                            },
                            "value": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "「buy」の英語の活用形": {
                    "value": [
                      {
                        "text": "bought",
                        "features": [
                          {
                            "index": 2,
                            "value": "ALL"
                          },
                          {
                            "index": 9,
                            "value": "ALL"
                          },
                          {
                            "index": 10,
                            "value": "PAP"
                          },
                          {
                            "index": 11,
                            "value": "ALL"
                          },
                          {
                            "index": 21,
                            "value": "IND"
                          },
                          {
                            "index": 15,
                            "value": "NO"
                          },
                          {
                            "index": 27,
                            "value": "ALL"
                          },
                          {
                            "index": 5,
                            "value": "ALL"
                          }
                        ]
                      },
                      {
                        "text": "bought",
                        "features": [
                          {
                            "index": 2,
                            "value": "ALL"
                          },
                          {
                            "index": 9,
                            "value": "ALL"
                          },
                          {
                            "index": 10,
                            "value": "PAST"
                          },
                          {
                            "index": 5,
                            "value": "ALL"
                          },
                          {
                            "index": 11,
                            "value": "ACT"
                          },
                          {
                            "index": 21,
                            "value": "IND"
                          },
                          {
                            "index": 15,
                            "value": "NO"
                          },
                          {
                            "index": 27,
                            "value": "ALL"
                          }
                        ]
                      },
                      {
                        "text": "buy",
                        "isLemma": true,
                        "features": [
                          {
                            "index": 10,
                            "value": "BASE"
                          },
                          {
                            "index": 11,
                            "value": "ACT"
                          },
                          {
                            "index": 21,
                            "value": "IND"
                          },
                          {
                            "index": 2,
                            "value": "ALL"
                          },
                          {
                            "index": 9,
                            "value": "ALL"
                          },
                          {
                            "index": 15,
                            "value": "NO"
                          },
                          {
                            "index": 27,
                            "value": "ALL"
                          },
                          {
                            "index": 5,
                            "value": "ALL"
                          }
                        ]
                      },
                      {
                        "text": "buys",
                        "features": [
                          {
                            "index": 5,
                            "value": "ALL"
                          },
                          {
                            "index": 2,
                            "value": "1"
                          },
                          {
                            "index": 9,
                            "value": "3"
                          },
                          {
                            "index": 10,
                            "value": "PRES"
                          },
                          {
                            "index": 15,
                            "value": "NO"
                          },
                          {
                            "index": 11,
                            "value": "ACT"
                          },
                          {
                            "index": 21,
                            "value": "IND"
                          },
                          {
                            "index": 27,
                            "value": "ALL"
                          }
                        ]
                      },
                      {
                        "text": "buying",
                        "features": [
                          {
                            "index": 2,
                            "value": "ALL"
                          },
                          {
                            "index": 9,
                            "value": "ALL"
                          },
                          {
                            "index": 10,
                            "value": "PRP"
                          },
                          {
                            "index": 5,
                            "value": "ALL"
                          },
                          {
                            "index": 15,
                            "value": "NO"
                          },
                          {
                            "index": 11,
                            "value": "ACT"
                          },
                          {
                            "index": 21,
                            "value": "IND"
                          },
                          {
                            "index": 27,
                            "value": "ALL"
                          }
                        ]
                      },
                      {
                        "text": "buy",
                        "features": [
                          {
                            "index": 10,
                            "value": "PRES"
                          },
                          {
                            "index": 11,
                            "value": "ACT"
                          },
                          {
                            "index": 21,
                            "value": "IND"
                          },
                          {
                            "index": 23,
                            "value": "BODY"
                          },
                          {
                            "index": 2,
                            "value": "ALL"
                          },
                          {
                            "index": 9,
                            "value": "1"
                          },
                          {
                            "index": 15,
                            "value": "NO"
                          },
                          {
                            "index": 27,
                            "value": "ALL"
                          },
                          {
                            "index": 3,
                            "value": "ALL"
                          },
                          {
                            "index": 29,
                            "value": "00"
                          },
                          {
                            "index": 5,
                            "value": "ALL"
                          },
                          {
                            "index": 22,
                            "value": "ALL"
                          }
                        ]
                      },
                      {
                        "text": "buy",
                        "features": [
                          {
                            "index": 10,
                            "value": "PRES"
                          },
                          {
                            "index": 11,
                            "value": "ACT"
                          },
                          {
                            "index": 21,
                            "value": "IND"
                          },
                          {
                            "index": 23,
                            "value": "BODY"
                          },
                          {
                            "index": 2,
                            "value": "ALL"
                          },
                          {
                            "index": 9,
                            "value": "2"
                          },
                          {
                            "index": 15,
                            "value": "NO"
                          },
                          {
                            "index": 27,
                            "value": "ALL"
                          },
                          {
                            "index": 3,
                            "value": "ALL"
                          },
                          {
                            "index": 29,
                            "value": "00"
                          },
                          {
                            "index": 5,
                            "value": "ALL"
                          },
                          {
                            "index": 22,
                            "value": "ALL"
                          }
                        ]
                      },
                      {
                        "text": "buy",
                        "features": [
                          {
                            "index": 10,
                            "value": "PRES"
                          },
                          {
                            "index": 11,
                            "value": "ACT"
                          },
                          {
                            "index": 21,
                            "value": "IND"
                          },
                          {
                            "index": 2,
                            "value": "MANY"
                          },
                          {
                            "index": 9,
                            "value": "3"
                          },
                          {
                            "index": 15,
                            "value": "NO"
                          },
                          {
                            "index": 27,
                            "value": "ALL"
                          },
                          {
                            "index": 3,
                            "value": "ALL"
                          },
                          {
                            "index": 29,
                            "value": "00"
                          },
                          {
                            "index": 5,
                            "value": "ALL"
                          },
                          {
                            "index": 22,
                            "value": "ALL"
                          }
                        ]
                      }
                    ]
                  },
                  "「United States」のロシア語の活用形": {
                    "value": [
                      {
                        "features": [
                          {
                            "index": 9,
                            "value": "3"
                          },
                          {
                            "index": 15,
                            "value": "NOM"
                          }
                        ],
                        "isLemma": true,
                        "text": "Соединённые Штаты Америки"
                      },
                      {
                        "features": [
                          {
                            "index": 15,
                            "value": "GEN"
                          },
                          {
                            "index": 9,
                            "value": "3"
                          }
                        ],
                        "text": "Соединенных Штатов Америки"
                      },
                      {
                        "features": [
                          {
                            "index": 15,
                            "value": "INST"
                          },
                          {
                            "index": 9,
                            "value": "3"
                          }
                        ],
                        "text": "Соединенными Штатами Америки"
                      },
                      {
                        "features": [
                          {
                            "index": 15,
                            "value": "DAT"
                          },
                          {
                            "index": 9,
                            "value": "3"
                          }
                        ],
                        "text": "Соединенным Штатам Америки"
                      },
                      {
                        "features": [
                          {
                            "index": 15,
                            "value": "PREP"
                          },
                          {
                            "index": 9,
                            "value": "3"
                          }
                        ],
                        "text": "Соединенных Штатах Америки"
                      },
                      {
                        "features": [
                          {
                            "index": 24,
                            "value": "THNG"
                          },
                          {
                            "index": 2,
                            "value": "1"
                          },
                          {
                            "index": 9,
                            "value": "3"
                          },
                          {
                            "index": 7,
                            "value": "NA"
                          },
                          {
                            "index": 15,
                            "value": "ACC"
                          }
                        ],
                        "text": "Соединённые Штаты Америки"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}