Skip to content

Instantly share code, notes, and snippets.

@yutannihilation
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yutannihilation/4647e4038ba88431f12a to your computer and use it in GitHub Desktop.
Save yutannihilation/4647e4038ba88431f12a to your computer and use it in GitHub Desktop.
word distance of yrmcds and 夜マクド

Introduction

People call yrmcds "夜マクド".

I want to verify this similarity by 語句類似度算出API of goo lab.

Result 1: Similarity

⟫ curl \
>   -H "Accept: application/json" \
>   -H "Content-type: application/json" \
>   -X POST \
>   -d '{"app_id":"XXXXX","request_id":"record003","query_pair":["yrmcds","夜マクド"]}' \
>   https://labs.goo.ne.jp/api/similarity
{"request_id":"record003","score":0.0}

What!? 0.0???

Result 2: Hiraganized Form of yrmcds

⟫ curl \
>   -H "Accept: application/json" \
>   -H "Content-type: application/json" \
>   -X POST \
>   -d '{"app_id":"XXXXX","request_id":"record001","sentence":"yrmcds","output_type":"hiragana"}' \
>   https://labs.goo.ne.jp/api/hiragana
{"request_id":"record001","output_type":"hiragana","converted":"わいあーるえむしーでぃーえす"}

Oh...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment