{"image_url":null,"title":"\u8a00\u8a9e\u51e6\u7406100\u672c\u30ce\u30c3\u30af 2020\u300c06. \u96c6\u5408\u300d","blog_url":"https://upura.hatenablog.com/","provider_url":"https://hatena.blog","blog_title":"u++\u306e\u5099\u5fd8\u9332","version":"1.0","published":"2020-04-14 03:35:06","description":"\u554f\u984c\u6587 nlp100.github.io \u554f\u984c\u306e\u6982\u8981 bi-gram\u306e\u4f5c\u6210\u306b\u306f\u300c05. n-gram\u300d\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u6d41\u7528\u3057\u307e\u3059\u3002 Python\u3067\u306f\u300cset()\u300d\u3092\u7528\u3044\u308b\u3053\u3068\u3067\u3001\u96c6\u5408\u306e\u6982\u5ff5\u3092\u6271\u3048\u307e\u3059\u3002 def n_gram(target, n): return [target[idx:idx + n] for idx in range(len(target) - n + 1)] X_text = 'paraparaparadise' Y_text = 'paragraph' X = n_gram(X_text, 2) Y = n_gram(Y_text, 2) print(f'\u548c\u96c6\u5408: {se\u2026","type":"rich","author_url":"https://blog.hatena.ne.jp/upura/","provider_name":"Hatena Blog","author_name":"upura","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fupura.hatenablog.com%2Fentry%2F2020%2F04%2F14%2F033506\" title=\"\u8a00\u8a9e\u51e6\u7406100\u672c\u30ce\u30c3\u30af 2020\u300c06. \u96c6\u5408\u300d - u++\u306e\u5099\u5fd8\u9332\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","width":"100%","categories":["\u81ea\u7136\u8a00\u8a9e\u51e6\u7406","python"],"height":"190","url":"https://upura.hatenablog.com/entry/2020/04/14/033506"}