<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>upura</author_name>
  <author_url>https://blog.hatena.ne.jp/upura/</author_url>
  <blog_title>u++の備忘録</blog_title>
  <blog_url>https://upura.hatenablog.com/</blog_url>
  <categories>
    <anon>自然言語処理</anon>
    <anon>python</anon>
  </categories>
  <description>問題文 nlp100.github.io 問題の概要 「30. 形態素解析結果の読み込み」で作成したデータ構造から、全ての単語を取り出し、出現頻度を計算します。 全ての単語を前から確認していき（単語, 出現回数）のペアの辞書を作り上げました。普通のdictではなく「defaultdict」*1が便利です。 from collections import defaultdict def parse_mecab(block): res = [] for line in block.split('\n'): if line == '': return res (surface, attr) = li…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fupura.hatenablog.com%2Fentry%2F2020%2F04%2F20%2F121729&quot; title=&quot;言語処理100本ノック 2020「35. 単語の出現頻度」 - u++の備忘録&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-04-20 12:17:29</published>
  <title>言語処理100本ノック 2020「35. 単語の出現頻度」</title>
  <type>rich</type>
  <url>https://upura.hatenablog.com/entry/2020/04/20/121729</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
