{"__v":2,"_id":"55abd8c3a36ccd0d00fdebdf","category":{"__v":21,"_id":"55a7aee94a33f92b00b7a154","pages":["55a7aee94a33f92b00b7a156","55a7ea403efe0c2f0074cb75","55a80eb23ec2ec0d00bd66ea","55a811fc6e61e619004f703e","55a8c513cf45e1390093f18c","55a8d9fa27a17d210052516d","55a8f048cf45e1390093f248","55aba4ba63a6b60d006616e1","55abab0a0685ce0d0049fb8d","55abb04da36ccd0d00fdebc1","55abc1cc63a6b60d006616f4","55abcdbd63a6b60d006616fa","55abd36763a6b60d00661700","55abd50ea36ccd0d00fdebdb","55abd8c3a36ccd0d00fdebdf","55abd9cc0685ce0d0049fbb5","55abdb6b63a6b60d00661706","55abdc9b0685ce0d0049fbb8","55c1f5fca131980d005be95b","55fac407bc972f0d0005f644","569f68e766a5640d00efa52d"],"project":"55a7aee84a33f92b00b7a150","version":"55a7aee84a33f92b00b7a153","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-07-16T13:17:29.102Z","from_sync":false,"order":2,"slug":"endpoints","title":"Endpoints"},"editedParams":true,"editedParams2":true,"parentDoc":null,"project":"55a7aee84a33f92b00b7a150","user":"55a7ae50bf1be93100d89df1","version":{"__v":6,"_id":"55a7aee84a33f92b00b7a153","project":"55a7aee84a33f92b00b7a150","createdAt":"2015-07-16T13:17:28.411Z","releaseDate":"2015-07-16T13:17:28.411Z","categories":["55a7aee94a33f92b00b7a154","55a7fefa3efe0c2f0074cbdf","55a8fb10c8bd450d000dd130","55a936b1cf45e1390093f362","55abddeaa36ccd0d00fdebe1","5624db675a86b423009462e1"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-07-19T17:05:07.465Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"language":"curl","code":"curl https://api.aylien.com/api/v1/related \\\n   -H \"X-AYLIEN-TextAPI-Application-Key: [[app:key]]\" \\\n   -H \"X-AYLIEN-TextAPI-Application-ID: [[app:id]]\" \\\n   -d phrase=\"machine+learning\""},{"code":"textapi.related({\n  phrase: \"machine learning\",\n}, function(error, response) {\n  if (error === null) {\n    console.log(response.related);\n  }\n});","language":"javascript"},{"language":"python","code":"related = client.Related({\"phrase\": \"machine learning\"})\nfor phrase in related['related']:\n  print phrase"},{"language":"php","code":"<?php\n$related = $textapi->Related(array('phrase' => 'machine learning'));\nforeach($related->related as $phrase) {\n  var_dump($phrase);\n}\n?>"},{"language":"java","code":"RelatedParams params = new RelatedParams(\"machine learning\", 20);\nRelated related = client.related(params);\nfor (Phrase phrase: related.getPhrases()) {\n\tSystem.out.println(phrase);\n}"},{"language":"ruby","code":"response = client.related(phrase: \"machine learning\")\n\nresponse[:related].each do |phrase|\n  puts phrase\nend"},{"language":"go","code":"phrase := \"machine learning\"\nrelatedParams := &textapi.RelatedParams{Phrase: phrase}\nrelated, err := client.Related(relatedParams)\nif err != nil {\n\t\tpanic(err)\n}\nfor _, p := range related.Related {\n\t\tfmt.Printf(\"%v\\n\", p)\n}"},{"language":"csharp","code":"var related = client.Related(phrase: \"machine learning\");\n\nforeach (var item in related.RelatedPhrases)\n{\n  Console.WriteLine(item.Phrase);\n}"}]},"method":"get","results":{"codes":[{"status":200,"language":"json","code":"{\n  \"phrase\":\"machine learning\",\n  \"related\":[\n    {\n      \"phrase\":\"classification algorithms\",\n      \"distance\":0.6826595664024353\n    },\n    {\n      \"phrase\":\"support vector machines\",\n      \"distance\":0.6644711494445801\n    },\n    {\n      \"phrase\":\"learning algorithms\",\n      \"distance\":0.6625115275382996\n    },\n    {\n      \"phrase\":\"machine learning algorithms\",\n      \"distance\":0.6608193516731262\n    },\n    {\n      \"phrase\":\"data mining\",\n      \"distance\":0.6489189267158508\n    },\n    {\n      \"phrase\":\"artificial neural networks\",\n      \"distance\":0.6467007398605347\n    },\n    {\n      \"phrase\":\"reinforcement learning\",\n      \"distance\":0.6332246661186218\n    },\n    {\n      \"phrase\":\"information retrieval\",\n      \"distance\":0.6332088112831116\n    },\n    {\n      \"phrase\":\"neural networks\",\n      \"distance\":0.6313140392303467\n    },\n    {\n      \"phrase\":\"hidden markov models\",\n      \"distance\":0.621141254901886\n    },\n    {\n      \"phrase\":\"conditional random\",\n      \"distance\":0.6151562333106995\n    },\n    {\n      \"phrase\":\"algorithms\",\n      \"distance\":0.6149313449859619\n    },\n    {\n      \"phrase\":\"computer vision\",\n      \"distance\":0.6065806746482849\n    },\n    {\n      \"phrase\":\"kernel methods\",\n      \"distance\":0.5994403958320618\n    },\n    {\n      \"phrase\":\"semi supervised learning\",\n      \"distance\":0.5927800536155701\n    },\n    {\n      \"phrase\":\"supervised learning\",\n      \"distance\":0.5912695527076721\n    },\n    {\n      \"phrase\":\"computational learning\",\n      \"distance\":0.5884358286857605\n    },\n    {\n      \"phrase\":\"genetic algorithms\",\n      \"distance\":0.5846713185310364\n    },\n    {\n      \"phrase\":\"pattern recognition\",\n      \"distance\":0.5844922065734863\n    },\n    {\n      \"phrase\":\"computational\",\n      \"distance\":0.5834065079689026\n    }\n  ]\n}","name":""}]},"settings":"","auth":"required","params":[{"_id":"55a8f048cf45e1390093f24a","ref":"","in":"query","required":false,"desc":"Input keyword or phrase","default":"","type":"string","name":"phrase"},{"_id":"55a8f18bc8bd450d000dd113","ref":"","in":"query","required":false,"desc":"Language (refer to [Language Support](/docs/language-support))","default":"auto","type":"string","name":"language"}],"url":"/related"},"isReference":false,"order":12,"body":"**Related Phrases** provides you with a list of phrases and words that are related to the input phrase or word based on semantic similarity, along with a distance measure that indicates how similar the two words or phrases are.","excerpt":"/related","slug":"related","type":"endpoint","title":"Related Phrases"}

getRelated Phrases

/related

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

phrase:
string
Input keyword or phrase
language:
stringauto
Language (refer to [Language Support](/docs/language-support))

Examples


Result Format


Documentation

**Related Phrases** provides you with a list of phrases and words that are related to the input phrase or word based on semantic similarity, along with a distance measure that indicates how similar the two words or phrases are.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}