RapidAPI logo

Text Similarity

フリーミアム
開発者 twinword
更新日 5日前
テキスト解析
8.8/10
人気度
837ms
レイテンシ
100%
正常稼働率

「Text Similarity 」のドキュメント

Evaluate the similarity of two words, sentences, or paragraphs.

全文を表示する
Text Similarity
GETText Similarity (get)
POSTText Similarity (post)
GETText Similarity (get)

2つの単語、文章、または段落の類似性を判定します。

ヘッダーパラメータ
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
必須パラメータ
text1STRING
REQUIREDInput the first text to compare.
text2STRING
REQUIREDInput a second text to compare its similarity with the first text.
コードスニペット
unirest.get("https://twinword-text-similarity-v1.p.rapidapi.com/similarity/?text1=The+hippocampus+is+a+major+component+of+the+brains+of+humans+and+other+vertebrates.+It+belongs+to+the+limbic+system+and+plays+important+roles+in+the+consolidation+of+information+from+short-term+memory+to+long-term+memory+and+spatial+navigation.+Humans+and+other+mammals+have+two+hippocampi%2C+one+in+each+side+of+the+brain.+The+hippocampus+is+a+part+of+the+cerebral+cortex%3B+and+in+primates+it+is+located+in+the+medial+temporal+lobe%2C+underneath+the+cortical+surface.+It+contains+two+main+interlocking+parts%3A+Ammon's+horn+and+the+dentate+gyrus.&text2=An+important+part+of+the+brains+of+humans+and+other+vertebrates+is+the+hippocampus.+It's+part+of+the+limbic+system+and+moves+information+from+short-term+to+long-term+memory.+It+also+helps+us+move+around.+Humans+and+other+mammals+have+two+hippocampi%2C+one+on+each+side.+The+hippocampus+is+a+part+of+the+cerebral+cortex%3B+and+in+primates+it+is+found+in+the+medial+temporal+lobe%2C+beneathe+the+cortical+surface.+It+has+two+main+interlocking+parts%3A+Ammon's+horn+and+the+dentate+gyrus.")
.header("X-RapidAPI-Host", "twinword-text-similarity-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "ログインしてキーを取得")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
サンプルレスポンス
概要
リクエストURL: https://twinword-text-similarity-v1.p.rapidapi.com/similarity/
リクエストメソッド: GET
レスポンスヘッダ
レスポンスボディ

SDKをインストール(NodeJS)

インストール

Node.jsでUnirestを使用するには、NPMモジュールをインストールしてください。

$ npm install unirest

インストール完了後は、簡単にリクエストを行うことができるようになります。

var unirest = require('unirest');

リクエスト

unirest.get("https://twinword-text-similarity-v1.p.rapidapi.com/similarity/?text1=The+hippocampus+is+a+major+component+of+the+brains+of+humans+and+other+vertebrates.+It+belongs+to+the+limbic+system+and+plays+important+roles+in+the+consolidation+of+information+from+short-term+memory+to+long-term+memory+and+spatial+navigation.+Humans+and+other+mammals+have+two+hippocampi%2C+one+in+each+side+of+the+brain.+The+hippocampus+is+a+part+of+the+cerebral+cortex%3B+and+in+primates+it+is+located+in+the+medial+temporal+lobe%2C+underneath+the+cortical+surface.+It+contains+two+main+interlocking+parts%3A+Ammon's+horn+and+the+dentate+gyrus.&text2=An+important+part+of+the+brains+of+humans+and+other+vertebrates+is+the+hippocampus.+It's+part+of+the+limbic+system+and+moves+information+from+short-term+to+long-term+memory.+It+also+helps+us+move+around.+Humans+and+other+mammals+have+two+hippocampi%2C+one+on+each+side.+The+hippocampus+is+a+part+of+the+cerebral+cortex%3B+and+in+primates+it+is+found+in+the+medial+temporal+lobe%2C+beneathe+the+cortical+surface.+It+has+two+main+interlocking+parts%3A+Ammon's+horn+and+the+dentate+gyrus.")
.header("X-RapidAPI-Host", "twinword-text-similarity-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "ログインしてキーを取得")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2認証
クライアントID
クライアントシークレット
OAuth2認証