<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[chakki - Medium]]></title>
        <description><![CDATA[Our mission is to enable everyone leave the office by the tea time - Medium]]></description>
        <link>https://medium.com/chakki?source=rss----16f1455e478e---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>chakki - Medium</title>
            <link>https://medium.com/chakki?source=rss----16f1455e478e---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 10:02:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/chakki" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Realize portable and reusable text preprocessing]]></title>
            <link>https://medium.com/chakki/realize-portable-and-reusable-text-preprocessing-3a40d85187d1?source=rss----16f1455e478e---4</link>
            <guid isPermaLink="false">https://medium.com/p/3a40d85187d1</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[research]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <dc:creator><![CDATA[piqcy]]></dc:creator>
            <pubDate>Thu, 16 Jan 2020 00:18:37 GMT</pubDate>
            <atom:updated>2019-09-28T07:34:19.207Z</atom:updated>
            <content:encoded><![CDATA[<p>Text preprocessing is necessary process even if you use Deep Learning. Before you start to use cool Deep Learning model, you have to tokenize text, make vocabulary, convert tokens to ids, and ids to vectors… It’s just like the hassle of airport security.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*GLAIBdcpX4bi6DcXspHKjA.jpeg" /><figcaption>photo by <a href="https://www.flickr.com/photos/mascarenhas/">Fabio Mascarenhas</a></figcaption></figure><p><a href="https://github.com/chakki-works/chariot"><strong>chariot</strong></a> saves you. <br>You can implement text preprocessing by stacking premade functions. And it becomes portable and reusable module.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7995bd94c9573e734b93e84550c9c44b/href">https://medium.com/media/7995bd94c9573e734b93e84550c9c44b/href</a></iframe><p>In short, chariot enables preprocessing like a buffet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*c0cDU4SM3bryTv3lZV3gAw.jpeg" /><figcaption><a href="https://flic.kr/p/gme7Zt">Photo by Ramnath Bhat</a></figcaption></figure><p>In this article, I show the feature and how to use chariot.</p><p><a href="https://github.com/chakki-works/chariot">chakki-works/chariot</a></p><h4>Text preprocessing by chariot</h4><p>The feature of the chariot is following 3 points.</p><ol><li>Declarative implementation</li><li>Portable save format</li><li>Offer the ready to train format data</li></ol><p>As I show above, you can make preprocessing by stacking the functions declaratively.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7995bd94c9573e734b93e84550c9c44b/href">https://medium.com/media/7995bd94c9573e734b93e84550c9c44b/href</a></iframe><p>Each preprocessing function is implemented based on <a href="https://scikit-learn.org/stable/modules/generated/sklearn.base.TransformerMixin.html">scikit-learn Transformer</a>. For that reason, you can use any scikit-learn Transformer to make preprocessing and save it as pickle file (=portable).</p><pre>preprocessor.save(&quot;my_preprocessor.pkl&quot;)<br>loaded = Preprocessor.load(&quot;my_preprocessor.pkl&quot;)</pre><p>When you train the machine learning model, you have to adjust the length of text (padding) and make one-hot-vector, etc. In the chariot, these kinds of the process are defined as formatter and you can stack it to the preprocessor.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d4efa64f6951a087d0c0fcfc857e02d1/href">https://medium.com/media/d4efa64f6951a087d0c0fcfc857e02d1/href</a></iframe><p>The format process is applied only in the training process.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/322d75d96e3053450101ba2ee6422802/href">https://medium.com/media/322d75d96e3053450101ba2ee6422802/href</a></iframe><p>You can confirm the examples of the chariot by Jupyter Notebook.</p><p><strong>Text classification example.</strong></p><p><a href="https://github.com/chakki-works/chariot/blob/master/notebooks/movie_review_sentiment_analysis.ipynb">chakki-works/chariot</a></p><p><strong>Language modeling example.</strong></p><p><a href="https://github.com/chakki-works/chariot/blob/master/notebooks/language%20modeling.ipynb">chakki-works/chariot</a></p><p>Let’s realize portable and reusable text preprocessing by chariot!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a40d85187d1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chakki/realize-portable-and-reusable-text-preprocessing-3a40d85187d1">Realize portable and reusable text preprocessing</a> was originally published in <a href="https://medium.com/chakki">chakki</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[自然言語処理における、前処理のポータビリティを向上させる]]></title>
            <link>https://medium.com/chakki/%E8%87%AA%E7%84%B6%E8%A8%80%E8%AA%9E%E5%87%A6%E7%90%86%E3%81%AB%E3%81%8A%E3%81%91%E3%82%8B-%E5%89%8D%E5%87%A6%E7%90%86%E3%81%AE%E3%83%9D%E3%83%BC%E3%82%BF%E3%83%93%E3%83%AA%E3%83%86%E3%82%A3%E3%82%92%E5%90%91%E4%B8%8A%E3%81%95%E3%81%9B%E3%82%8B-37c58ff9534d?source=rss----16f1455e478e---4</link>
            <guid isPermaLink="false">https://medium.com/p/37c58ff9534d</guid>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[piqcy]]></dc:creator>
            <pubDate>Fri, 22 Feb 2019 08:38:02 GMT</pubDate>
            <atom:updated>2019-02-22T08:38:02.296Z</atom:updated>
            <content:encoded><![CDATA[<p>皆さん前処理してますか？どの分野の機械学習でも前処理は重要ですが、自然言語処理は元のデータが数値でないこともあり、処理ステップが多くなりがちです(テキスト=&gt;単語=&gt;単語ID)。また、処理の一貫性を保つには実装コードだけでなくパラメーター(ストップワードなど)も管理する必要があったりします。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*c0cDU4SM3bryTv3lZV3gAw.jpeg" /><figcaption><a href="https://flic.kr/p/gme7Zt">Photo by Ramnath Bhat</a></figcaption></figure><p>端的には、自然言語処理では前処理のポータビリティを保つのが難しいです。そこで、それを実現するツールを開発しました(Star頂けたら幸いです！)。</p><p><a href="https://github.com/chakki-works/chariot">chakki-works/chariot</a></p><h4>自然言語処理の前処理ツールchariotの機能</h4><p>chariotでは、以下3点をできるようにしました。</p><ul><li>前処理を宣言的に定義できる</li><li>前処理が簡単に保存できる(パラメーターごと)</li><li>モデルの学習にたどり着くまでの時間を短くする</li></ul><p>chariotでは、以下のように「前処理」を「積んでいく」形で前処理プロセスを定義できます。</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7995bd94c9573e734b93e84550c9c44b/href">https://medium.com/media/7995bd94c9573e734b93e84550c9c44b/href</a></iframe><p>stackされている各前処理はscikit-learnのTransformerをベースにしており、パラメーターごと保存が可能です。なので、保存したpklファイルさえあれば前処理を動かすことができます(ただMeCabの辞書とかまではさすがに無理なので、完全担保の場合はDocker上で走らせたりする必要があります)。</p><p>対象がデータセットで、複数のカラムを持つ場合は以下のように定義が可能です。</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d4efa64f6951a087d0c0fcfc857e02d1/href">https://medium.com/media/d4efa64f6951a087d0c0fcfc857e02d1/href</a></iframe><p>各カラムごとに前処理を定義できる感じです。もちろん、各カラムの前処理パイプラインは丸ごと保存が可能です(複数のpklファイルになるのでtar.gzで固めています)。</p><p>なお、PaddingやCategoricalLabelにするのは学習の直前だけでいいので、前処理の実行( preprocess)には含まれません。これらの処理は、以下で紹介するように学習時に自動的にかかります。または、format で明示的に行うこともできます。</p><p>さて、前処理する目的はモデルの学習なので、モデルの学習までノンストップで行きたいところです。chariotを使うと、以下のようにノンストップで学習が可能です。</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/322d75d96e3053450101ba2ee6422802/href">https://medium.com/media/322d75d96e3053450101ba2ee6422802/href</a></iframe><p>train_data を preprocess して iterate して学習する、という感じです。</p><p>実際の使用感については、Jupyter Notebookを見て頂ければと思います。</p><p><strong>クラス分類の例</strong></p><p><a href="https://github.com/chakki-works/chariot/blob/master/notebooks/movie_review_sentiment_analysis.ipynb">chakki-works/chariot</a></p><p><strong>言語モデルの例</strong></p><p><a href="https://github.com/chakki-works/chariot/blob/master/notebooks/language%20modeling.ipynb">chakki-works/chariot</a></p><p><a href="https://medium.com/programming-soda/graph-convolution%E3%82%92%E8%87%AA%E7%84%B6%E8%A8%80%E8%AA%9E%E5%87%A6%E7%90%86%E3%81%AB%E5%BF%9C%E7%94%A8%E3%81%99%E3%82%8B-part7-end-3f6812ca08cf">Graph Convolutionの記事</a>を書いているときからちょくちょくブラッシュアップしていたのですが、大体大丈夫かなとなったのでお披露目となりました。</p><p>今後もいろいろな検証を行っていく中でブラッシュアップを行っていく予定です。よろしければ、使ってみて頂きご意見が伺えれば幸いです！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37c58ff9534d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chakki/%E8%87%AA%E7%84%B6%E8%A8%80%E8%AA%9E%E5%87%A6%E7%90%86%E3%81%AB%E3%81%8A%E3%81%91%E3%82%8B-%E5%89%8D%E5%87%A6%E7%90%86%E3%81%AE%E3%83%9D%E3%83%BC%E3%82%BF%E3%83%93%E3%83%AA%E3%83%86%E3%82%A3%E3%82%92%E5%90%91%E4%B8%8A%E3%81%95%E3%81%9B%E3%82%8B-37c58ff9534d">自然言語処理における、前処理のポータビリティを向上させる</a> was originally published in <a href="https://medium.com/chakki">chakki</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[自然言語におけるアノテーションのつらさをまとめる]]></title>
            <link>https://medium.com/chakki/%E8%87%AA%E7%84%B6%E8%A8%80%E8%AA%9E%E3%81%AB%E3%81%8A%E3%81%91%E3%82%8B%E3%82%A2%E3%83%8E%E3%83%86%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AE%E3%81%A4%E3%82%89%E3%81%95%E3%82%92%E3%81%BE%E3%81%A8%E3%82%81%E3%82%8B-dd441895b464?source=rss----16f1455e478e---4</link>
            <guid isPermaLink="false">https://medium.com/p/dd441895b464</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[events]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <dc:creator><![CDATA[piqcy]]></dc:creator>
            <pubDate>Mon, 03 Sep 2018 02:54:31 GMT</pubDate>
            <atom:updated>2018-09-03T02:54:30.837Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://medium.com/chakki/nlp%E8%8B%A5%E6%89%8B%E3%81%AE%E4%BC%9A-yans-2018%E3%81%AB%E5%8F%82%E5%8A%A0%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F-2f70b183cb4f">先日参加したYANS2018</a>では、アノテーションツールである<a href="https://github.com/chakki-works/doccano">doccano</a>の紹介を行いました。doccanoを改善していくためにアノテーションについての意見を色々お聞きしたのですが、やはりさまざまなつらみが浮き上がってきました。</p><p>本記事では、YANS2018で寄せられたアノテーションのつらさを体系的にまとめます。これはdoccanoの改善に活かされますが、アノテーションを実施する機会がある方にとっても事前に問題となる箇所を把握できる記事になっていると思います。</p><h3>アノテーションのプロセス</h3><p>アノテーションの意見をまとめる観点として、今回はMATTERを使用しました。MATTERとは、Model、Annotate、Train、Test、Evaluate、Reviseの頭文字を取ったものです。このプロセスは<a href="http://shop.oreilly.com/product/0636920020578.do">Natural Language Annotation for Machine Learning</a>で提示されているプロセスです。アノテーションを行う方は事前に目を通しておくとよいと思います。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*iezYsQp5RUEKTzCQ-mXh4w.png" /></figure><ul><li>Model: アノテーションデータを使って何をしたいのかというゴールを明確にし、そのために必要なラベル情報を定義する。Modelにおける成果物は、アノテーション仕様書になる。</li><li>Annotate: アノテーション仕様書に則り、アノテーションを行う。Annotateにおける成果物は、もちろんアノテーションデータとなる。</li><li>Train/Test: アノテーションデータを使い機械学習モデルを学習させ、評価メトリクスの計測を行う。</li><li>Evaluate: アノテーションについての問題点を洗い出し、対応策を検討する。</li><li>Revise: Evaluateの結果に基づき、アノテーション仕様書の修正を行う。この後、Modelに戻り再度Annotateを行う。</li></ul><p>要は、いわゆるPDCAサイクルを回そうという話です。</p><p>アノテーションのしやすさ自体は、ユーザーインタフェースの改善で対応が可能です。しかし、Annotateは上述の通りアノテーションにおける一部分の問題でしかありません。そのため、意見をうかがう際はAnnotate単体だけでなくその周辺のタスクについてもお聞きし、その結果をまとめていきました。</p><h3>アノテーションにおける課題</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*vA7pFICpn0LvZxkVjzvNsA.png" /></figure><p>ここでは、寄せられた意見の傾向から見てアノテーションに必要な対策を紹介したいと思います。MATTERの観点別に分けた、意見一覧は末尾に掲載しています。</p><p><strong>アノテーション定義書には事例を含めるべし</strong></p><p>アノテーション定義書には、「xxの場合yy」という定義だけでなく、具体的な事例を掲載しておく方が好ましいです。具体的な事例はアノテーターの判断を助けるだけでなく、それ自体がアノテーターのアノテーション精度を測るための質問に使えたり、チュートリアルを作る場合チュートリアルに使えるためです。個人的な経験からしても、なぜこのようなアノテーションルールが生まれたのか？という根拠となるケースを残しておくことは後で見返す際にも有用です。</p><p><strong>アノテーターへの意思伝達を設計せよ</strong></p><p>アノテーション定義書が複雑な場合(ルールやページ数など)、それは基本的には読まれないという前提を置いたほうが賢明です。そのため、事前説明会の開催やスライド形式での表示、アノテーション中の参照を可能にするなど、アノテーターへの意思伝達をどう行うのかが重要となります(中には、アノテーターを採用している機関もありました)。これには、アノテーターへの報酬額といったインセンティブ設計も含まれます。</p><p><strong>評価に必要な情報は、アノテーション中に計測すべし</strong></p><p>アノテーション中に様々なデータを取っておくことで、アノテーションの評価が行いやすくなります。具体的にはアノテーションにかかった時間、アノテーションをつけなおした回数、アノテーションに対する確信度、コメントなどです。こうした情報は、アノテーションデータだけからノイズなどを判断するよりリッチなフィードバックを提供してくれます。アノテーターの評価については、<a href="https://www.amazon.co.jp/dp/4061529137">ヒューマンコンピュテーションとクラウドソーシング</a>でも解説がおこなれているため、目を通しておくとよいです。</p><p>これらの対策については、doccanoの中でサポートすることも含め検討していく予定です。</p><h4>寄せられた意見一覧</h4><p>このセクションでは、MATTERの観点で寄せられた意見をまとめていきます。一部ユーザーインタフェースに関するものもありますが、そのまま掲載しています。</p><h4>Model</h4><ul><li>アノテーションしている最中に修正したくなるため、仕様書に影響があるようなケースについては後で見返せるようにチェックをつけたい。</li><li>アノテーション定義(ルール)からまとめてアノテーションを行いたい(文中にxxとyyが含まれるものは～など)。※これはなるほどなと思いました。また、似た研究が存在します: <a href="https://github.com/arXivTimes/arXivTimes/issues/748">Training Classifiers with Natural Language Explanations</a></li><li>PDFデータをアップロードするだけでテキスト化して欲しい。</li></ul><h4>Annotate</h4><ul><li>アノテーションさせる前にトレーニング（チュートリアル）させたい。仕様書の理解を深め質を上げるため。</li><li>アノテーション仕様書はみんな読まないので、ツールチップなどで説明を表示するようにしているが、表示が煩雑になり難しい(特にタグの数が多いと)。</li><li>アノテーション仕様書をスライド形式で出すようにするなど、読みやすく表示できるとよい。</li><li>アノテーションを行う際、アノテーションごとにラベルの位置を変えているので、その機能があるといい。ラベル位置が固定だと、最初のラベルを連打するような行為が見られた。</li><li>確信度を入力できるようにしたい。判断に迷ったものをあとで見返せるようにするため。</li><li>コメントを残しておきたい</li><li>アノテーターを集めるのが難しい(知り合いに頼むのがせいぜい)</li><li>アノテーターに修正を依頼できるようにしたい</li><li>リアルタイムに質問できるチャット機能などがあれば、アノテーターをサポートしやすいかもしれない。</li><li>たくさんのタグがある場合(20~)UIがつらい。タグに階層関係があることがあるので、それを表現したい。</li><li>単語間の関係をアノテーションする場合は、表示が煩雑になり難しい。</li><li>固有表現認識で、1Entityに複数のタグをつけたい場合がある。</li><li>アノテーション対象が動的に変わるケースに対応してほしい(検索結果の評価を行うケースなど)。</li><li>VQA(画像に対する説明記述)に対応してほしい。自然言語単独では応用は難しくなってきている。</li></ul><h4>Train/Test</h4><ul><li>Learning Curveから必要なデータ量を判断できれば良いが、どれだけのデータがあれば学習できるかは事前にはわからない。そのためクラウドソーシングで発注する場合は多めに発注することが多い。</li></ul><h4>Evaluate</h4><ul><li>業務ユーザーの判断をアノテーション結果とする場合、業務ユーザーの判断はアノテーション定義書に沿って行われるものではない。そのためノイズが多いが、最終的に模倣したいのは業務ユーザーの判断。人の判断か、アノテーション定義を優先すべきなのかが難しい。</li><li>アノテーションにかかった時間などを計測して適当につけたのかどうか判断したい。ただ、アノテーションに慣れたからなのか適当なのかわからない。</li><li>アノテーションにかかった時間、アノテーションをし直した回数などを計測して、アノテーションの正確性計測に役立てたい</li><li>適当にアノテーションしているか判断したい。最初から適当なケースもあるが、最初は慎重だけど徐々に適当になることもある。</li><li>特定の質問に正確に答えられたユーザーだけアノテーターとして採用するようにしたい</li><li>優秀なアノテーターに再度発注したい</li><li>アノテーター同士がアノテーション結果を評価しあう仕組みを導入する</li><li>データを作成する発注以外に、作成されたデータを修正する発注をクラウドソーシングで行うことがある。</li><li>κ統計量など、アノテーションで必ず測る指標は自動で計算してほしい。</li></ul><h4>その他</h4><ul><li>アノテーションではセンシティブなデータを扱うこともあるので、セキュリティ対策も必要</li><li>アノテーターに賃金を支払うシステムなどと連携できるとよい</li><li>モデルの予測結果や、アノテーション済みデータを読み込んで表示したい。</li></ul><p>これらの意見が、皆さんの研究で行うアノテーションの改善にも役立てば幸いです。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd441895b464" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chakki/%E8%87%AA%E7%84%B6%E8%A8%80%E8%AA%9E%E3%81%AB%E3%81%8A%E3%81%91%E3%82%8B%E3%82%A2%E3%83%8E%E3%83%86%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AE%E3%81%A4%E3%82%89%E3%81%95%E3%82%92%E3%81%BE%E3%81%A8%E3%82%81%E3%82%8B-dd441895b464">自然言語におけるアノテーションのつらさをまとめる</a> was originally published in <a href="https://medium.com/chakki">chakki</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NLP若手の会(YANS)2018に参加しました]]></title>
            <link>https://medium.com/chakki/nlp%E8%8B%A5%E6%89%8B%E3%81%AE%E4%BC%9A-yans-2018%E3%81%AB%E5%8F%82%E5%8A%A0%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F-2f70b183cb4f?source=rss----16f1455e478e---4</link>
            <guid isPermaLink="false">https://medium.com/p/2f70b183cb4f</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[events]]></category>
            <dc:creator><![CDATA[piqcy]]></dc:creator>
            <pubDate>Thu, 30 Aug 2018 06:21:34 GMT</pubDate>
            <atom:updated>2018-08-30T06:21:33.432Z</atom:updated>
            <content:encoded><![CDATA[<p>TISのchakkiチームは、2018/8/27から8/29で開催された<a href="http://yans.anlp.jp/entry/yans2018">NLP若手の会(YANS)</a>にスポンサーとして参加してきました。本記事では、TISの発表内容とYANSでの交流の模様をお届けしようと思います。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TVAxLPo_f0SgKpgXjZ3Xjg.jpeg" /></figure><h3>Presentation</h3><p>スポンサー発表では、テキストデータに対してアノテーションを行うツールdoccanoの紹介と展示を行いました。</p><p><a href="https://drive.google.com/open?id=1f1ydEp7sOI6dJj9onzfTPAou4K9-NWr0">sponser_tis_slide_oral.pdf</a></p><p>既にGitHubでも公開しています。デモも試せるため、データを作る予定のある方はぜひ試してみてください。</p><p><a href="https://github.com/chakki-works/doccano">chakki-works/doccano</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*8v-Smw32m7sK_Q79ECXUxA.gif" /></figure><p>開催中頂いた意見はとても参考になりました！<br>ポスター発表中頂いた意見はポストイットでポスターに張り付けていたのですが、満員御礼といった状況になりました。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KkG2t7ZmetM2ZfqJ0MqGKw.jpeg" /></figure><p>ご意見のまとめは別途記事にする予定です。現在アノテーションを行っている・クラウドソーシングで発注している方にとっても参考になると思います。</p><h3>Communication</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6mxJCd35C0k1cgFp5wdxeg.jpeg" /></figure><p>今年の開催場所は香川県の高松市でした。香川と言えばやはりうどん、ということで到着早々に頂きました。</p><p><a href="https://twitter.com/KHiyowa/status/1033841121078562817">高松市でなく瓦町へ出たほうが良い</a>、という事前情報を元に瓦町のうどん屋(<a href="http://www.maruwa-wataya.com/shop.html#slider1/0">麺処 綿谷</a>)へ行きました。やはりコシとツヤが本州で食べるうどんとは一味違います。そして味ではないですが、行列が見る間に消化される人の回転の速さに驚きました。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l-mdHQWGI2UygDWX-cettA.jpeg" /></figure><p>会場となるホテルは山にありました。我々は市内を散策したいという思いと、タクシーを使うと社内精算が面倒という思いとから歩いて行ったのですが、最後の登りはなかなかにハードでした。途中何台ものタクシーに抜かされる度、若干の後悔が胸をよぎりました。ただ、その分瀬戸内海を一望できる景色を堪能できました。</p><p>到着後ポスター発表の準備と配布する「<a href="https://www.oreilly.co.jp/books/9784873118260/">直感ディープラーニング</a>」のセットアップを行いました。直感ディープラーニングは、弊社の久保と中山が翻訳に参加した書籍です。当初何か交換条件を(doccanoに★など)、という案もあったのですが、そういうケチ臭いことはやめようということで普通に先着順に配布させていただきました。</p><h3>かわら on Twitter</h3><p>頂きました、とても嬉しいです #yans2018</p><h3>ミズキグミカンパニー(妹の兄) on Twitter</h3><p>TISさんのブースから頂いて嬉しかったので今更ながらツイート。帰ったら読もう！ #YANS2018</p><p>皆さんの研究に役立てば幸いです！</p><p>以後は怒涛のポスター発表とハッカソンで見る間に時間は過ぎていきました。スポンサーブースは3日間ずっとオープンしていたため、ひたすら話続けデモし続けました。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*GwUhwZT5k_2zpVV_mDGDEQ.png" /></figure><p>今回の発表テーマであるアノテーション、また現在取り組んでいる<a href="https://www.tis.co.jp/news/2018/tis_news/20180410_1.html">決算書の観点要約</a>に関連しそうな以下のテーマは、ポスター発表を見に行かせていただきました。</p><ul><li><a href="https://drive.google.com/open?id=1NO7Qxb3eSK_dw5GSC1nVrMkwMcKt4Nee">P03: 人手による感情ラベル付けにおける応答時間に着目した感情推定難易度の評価</a></li><li><a href="https://drive.google.com/open?id=1CYQhkkO_ic05vlgQGdie48AMQ44EkKdc">S02: 弁護士と言語処理技術 ～LegalForceが目指す企業法務の未来～</a></li><li>P22: 経済市況データを用いた動向概要文生成の制御に向けて</li><li><a href="https://drive.google.com/open?id=1YcSUn3PKoqQkNLpZ6YFiDfTs_RtjfyKu">P24: 情報科学論文からの技術の利点・欠点のマイニングに向けて</a></li><li><a href="https://drive.google.com/open?id=1BPOmXUWsms2-L-0DkfkjLR8d7r94UlNM">P46: 言語・視覚情報の統合による自動論文要約システム</a></li></ul><p>ハッカソンは発表の合間の時間＋夜に進めていました。3つテーマがあったのですが、私が取り組んだのは論文のAcceptを予測する分類タスクでした。ただ、そのかいあり優勝することができました。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R76GYCXxk8jy7oTWTCxpvg.jpeg" /></figure><p>ベースラインとして提供されていたスクリプトは動かすのが難しかったため、まず実行環境を整えるところから始めました(実際のところ、それだけで終わるんじゃないかという印象もありましたが)。</p><p>この環境にはKaggleのPrivate Datasetを使いました。ハッカソン終了後にPublic Dataset/Kernelとして公開したため、興味がある方は試してみてください。</p><p><a href="https://www.kaggle.com/takahirokubo0/yans2018">YANS 2018 Papper Accept Prediction Task Dataset</a></p><p>何とかモデルをチューニングするところまで持っていけ、優勝することができました。</p><p>色々な方とお話しさせていただきましたが、arXivTimesの取り組みが参考になっているというお話は非常に励みになりました。そうしたフィードバックはモチベーションにもなるため、今後もグイグイ言っていただけたら幸いです。</p><p><a href="https://twitter.com/arxivtimes">arXivTimes</a></p><p>TISは今後も「NLPエンジニア集団」として、研究面＋ツール面という2方面で自然言語処理コミュニティに貢献していければと考えています。年度内にはそれぞれプレスが出る！予定なので楽しみにしていてください。</p><p>では、来年またお会いしましょう！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f70b183cb4f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chakki/nlp%E8%8B%A5%E6%89%8B%E3%81%AE%E4%BC%9A-yans-2018%E3%81%AB%E5%8F%82%E5%8A%A0%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F-2f70b183cb4f">NLP若手の会(YANS)2018に参加しました</a> was originally published in <a href="https://medium.com/chakki">chakki</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[自然言語処理で企業研究の生産性を上げる！インターンを開催します]]></title>
            <link>https://medium.com/chakki/%E8%87%AA%E7%84%B6%E8%A8%80%E8%AA%9E%E5%87%A6%E7%90%86%E3%81%A7%E4%BC%81%E6%A5%AD%E7%A0%94%E7%A9%B6%E3%81%AE%E7%94%9F%E7%94%A3%E6%80%A7%E3%82%92%E4%B8%8A%E3%81%92%E3%82%8B-%E3%82%A4%E3%83%B3%E3%82%BF%E3%83%BC%E3%83%B3%E3%82%92%E9%96%8B%E5%82%AC%E3%81%97%E3%81%BE%E3%81%99-86194ed0c792?source=rss----16f1455e478e---4</link>
            <guid isPermaLink="false">https://medium.com/p/86194ed0c792</guid>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[events]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[piqcy]]></dc:creator>
            <pubDate>Thu, 01 Feb 2018 08:25:53 GMT</pubDate>
            <atom:updated>2018-02-01T08:25:53.467Z</atom:updated>
            <content:encoded><![CDATA[<p>今回開催するインターンでは、自然言語処理の技術に触れてもらうだけでなく、その後に控える自身の就職活動へ活かす体験をしてもらいます。</p><p><a href="https://www.wantedly.com/companies/tis/post_articles/83227">研究開発部門が行うインターンシップ「Rocket Internship」を開催します！ | TIS株式会社</a></p><ul><li>私たちが、何を目指して自然言語処理の研究をしているのか</li><li>研究開発の生産性を上げるために、どんなことを意識しているのか</li><li>自然言語処理は、自分の問題(=就職活動)にどう役立つのか</li></ul><p>この3点を、インターンを通じ学び、持って帰ってもらおうと思います。</p><p>なお、今回インターンで使用するデータはインターン終了後に公開する予定です。具体的には、企業の成績報告書といえる有価証券報告書に、観点ベースのセンチメントのアノテーションを行ったデータを公開します(<a href="http://alt.qcri.org/semeval2016/task5/">SemEval-2016 Task5 Aspect-Based Sentiment Analysis</a>と同等のデータになります)。ライセンスは<a href="https://creativecommons.org/licenses/by-sa/4.0/deed.ja">CC BY-SA 4.0</a>で、簡単に言うと利用に際して申請書もいらないし研究用とだけに限定という制限もないし自由に利用可です。</p><p>ここからは、今回こうしたテーマにした背景について説明しようと思います。</p><h4>インターンのテーマが決まるまで</h4><p>私たちは機械学習・自然言語処理の研究に携わるチームですが、研究の面で大学でしっかり研究をしている学生に劣ることが十分あると思っています。また、多くのオンラインコース・書籍がある中で限られたインターンの時間を座学に費やすというのもあまり意味がないと感じました。</p><p>なので、「教える」ようなインターンではなく「体験」してもらうようなインターンにしました。インターンで扱うのはまだ誰も見たことがないデータなので、それにどう取り組むか試行錯誤してもらうのが中心になります。その過程で、分析する前にどう仮説を立てるのか、精度が出ないときどうアプローチするのか、といった点について私たちが持っているノウハウをお伝えできればと思います。</p><p>「体験」を通じ、参加していただいた学生からはぜひフィードバックをもらえればと思います。私たちは「15:00までに帰れる社会」というところを目標に掲げているので、自分たち自身の生産性を上げる試みをいろいろしています。そこから「生産性高く研究するための方法論」を確立していきたいと思っているので、ぜひご協力よろしくです。</p><p>それと、「企業研究」をテーマにしたのは二つ理由があります。1つは、インターンで拘束されてしまう時間を「インターン後」も役立つものにしたいため。2つ目は、自分自身が抱える課題を、自分自身の研究で解決するという体験をしてもらえたらと思ったためです。</p><p>以上の検討により、今回のテーマは<strong>「自然言語処理で企業研究の生産性を上げる！インターン」</strong>に決まりました。ぜひ応募をお待ちしております！</p><p>応募は下記サイトからです。Rocket Internship/自然言語処理/機械学習コースでお待ちしております。</p><p><a href="https://www.tis.co.jp/recruit/internship/">インターンシップ | TIS RECRUITING 多彩なチカラが、拡げる未来 | TIS株式会社</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86194ed0c792" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chakki/%E8%87%AA%E7%84%B6%E8%A8%80%E8%AA%9E%E5%87%A6%E7%90%86%E3%81%A7%E4%BC%81%E6%A5%AD%E7%A0%94%E7%A9%B6%E3%81%AE%E7%94%9F%E7%94%A3%E6%80%A7%E3%82%92%E4%B8%8A%E3%81%92%E3%82%8B-%E3%82%A4%E3%83%B3%E3%82%BF%E3%83%BC%E3%83%B3%E3%82%92%E9%96%8B%E5%82%AC%E3%81%97%E3%81%BE%E3%81%99-86194ed0c792">自然言語処理で企業研究の生産性を上げる！インターンを開催します</a> was originally published in <a href="https://medium.com/chakki">chakki</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Debug Keras Models with TensorFlow Debugger]]></title>
            <link>https://medium.com/chakki/debug-keras-models-with-tensorflow-debugger-2b68b8e38370?source=rss----16f1455e478e---4</link>
            <guid isPermaLink="false">https://medium.com/p/2b68b8e38370</guid>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[keras]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[tips]]></category>
            <dc:creator><![CDATA[Hiroki Nakayama]]></dc:creator>
            <pubDate>Fri, 29 Sep 2017 02:03:05 GMT</pubDate>
            <atom:updated>2017-09-29T02:03:05.363Z</atom:updated>
            <content:encoded><![CDATA[<h3>TL;DR</h3><ul><li>I want to debug a model created with Keras.</li><li>Keras doesn’t have a built-in debugger.</li><li>Wrap Keras’ Session object with TensorFlow debugger(tfdbg).</li></ul><p>Keras, open-source neural networks library, is based on computation graphs. A typical Keras program consists of two separate stages:</p><ol><li>Build the neural network model with <a href="https://keras.io/getting-started/sequential-model-guide/">Sequential Model</a> or <a href="https://keras.io/getting-started/functional-api-guide/">Functional API</a>.</li><li>Training or predicting on the graph.</li></ol><p>If errors and bugs occur during the second stage, they are difficult to debug because we don’t know under what situation the computation failed since the running graphs internal structure and state don’t be exposed.</p><p>So far, Keras doesn’t have a built-in debugger while TensorFlow have a debugger, called <a href="https://www.tensorflow.org/programmers_guide/debugger">tfdbg</a>. By using tfdbg, we can know the internal structure and state during training or prediction.</p><p>In this post, I will introduce how to debug Keras models with tfdbg. It is assumed that Keras backend is TensorFlow since I will use tfdbg. Let’s see tfdbg with a short snippet of code that runs a simple sentiment analysis.</p><pre>import keras.backend as K<br>from keras.preprocessing import sequence<br>from keras.models import Sequential<br>from keras.layers import Dense, Embedding, LSTM<br>from keras.datasets import imdb<br>from tensorflow.python import debug as tf_debug</pre><pre>sess = K.get_session()<br>sess = tf_debug.LocalCLIDebugWrapperSession(sess)<br>K.set_session(sess)</pre><pre>max_features = 20000<br>maxlen = 80<br>batch_size = 32</pre><pre>(x_train, y_train), (x_test, y_test) = imdb.load_data(num_words=max_features)<br>x_train = sequence.pad_sequences(x_train, maxlen=maxlen)<br>x_test = sequence.pad_sequences(x_test, maxlen=maxlen)</pre><pre>model = Sequential()<br>model.add(Embedding(max_features, 128))<br>model.add(LSTM(128, dropout=0.2, recurrent_dropout=0.2))<br>model.add(Dense(1, activation=&#39;sigmoid&#39;))</pre><pre>model.compile(loss=&#39;binary_crossentropy&#39;,<br>              optimizer=&#39;adam&#39;, metrics=[&#39;accuracy&#39;])<br>model.fit(x_train, y_train, batch_size=batch_size,<br>          epochs=15, validation_data=(x_test, y_test))<br>score, acc = model.evaluate(x_test, y_test,<br>                            batch_size=batch_size)</pre><p>In this example, the session object is wrapped as a class for debugging (LocalCLIDebugWrapperSession), so the command-line interface of tfbdg will be launched when the code is launched. Using mouse clicks or commands, you can inspect the nodes and attributes in the graph. Please see <a href="https://www.tensorflow.org/programmers_guide/debugger">the documentation</a> in detail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/0*K3KQaL-AJVo0QR17.png" /></figure><h3>Final words</h3><ul><li>I want to debug a model created with Keras.</li><li>Keras doesn’t have a built-in debugger.</li><li>Wrap Keras’ Session object with TensorFlow debugger(tfdbg).</li></ul><h3>References</h3><ul><li><a href="https://www.tensorflow.org/programmers_guide/debugger">Debugging TensorFlow Programs</a></li><li><a href="https://developers.googleblog.com/2017/02/debug-tensorflow-models-with-tfdbg.html">Debug TensorFlow Models with tfdbg</a></li><li><a href="https://keras.io/backend/">Keras backends</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b68b8e38370" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chakki/debug-keras-models-with-tensorflow-debugger-2b68b8e38370">Debug Keras Models with TensorFlow Debugger</a> was originally published in <a href="https://medium.com/chakki">chakki</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[マネジメントに銀の弾丸はないが、最適解はある -HIGH OUTPUT MANAGEMENT-]]></title>
            <link>https://medium.com/chakki/%E3%83%9E%E3%83%8D%E3%82%B8%E3%83%A1%E3%83%B3%E3%83%88%E3%81%AB%E9%8A%80%E3%81%AE%E5%BC%BE%E4%B8%B8%E3%81%AF%E3%81%AA%E3%81%84%E3%81%8C-%E6%9C%80%E9%81%A9%E8%A7%A3%E3%81%AF%E3%81%82%E3%82%8B-high-output-management-e4a4cd28eb6?source=rss----16f1455e478e---4</link>
            <guid isPermaLink="false">https://medium.com/p/e4a4cd28eb6</guid>
            <category><![CDATA[manager]]></category>
            <category><![CDATA[book-review]]></category>
            <category><![CDATA[management]]></category>
            <dc:creator><![CDATA[piqcy]]></dc:creator>
            <pubDate>Mon, 19 Jun 2017 03:44:22 GMT</pubDate>
            <atom:updated>2017-06-19T03:44:21.900Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/238/1*o_vf3AlSy2-T097I65XPTA.jpeg" /></figure><p><a href="https://www.amazon.co.jp/dp/B01MU055XH">HIGH OUTPUT MANAGEMENT</a></p><p>輪講で読んでいて、久々に常に手元に置いておきたいと思った書籍を紹介します。こうしたビジネス書はパラパラめくれば大体内容が把握できることが多いのですが、これは非常に密度が高い書籍でした。</p><p>本書ではマネージャーの仕事とは何か、それをうまく行うにはどうすればいいのか、といった点が書かれています。しかし、よくあるビジネス書のように「手法」と「成功事例」が書かれているわけではありません。実際は理想的に思える手法も適用が難しいことが多々あります。そうした現実を無視するでも結局どんな手法も効果がないと嘆くでもなく、<strong>「最善」を導くにはどうしたらいいかという点が、著者自身の体験した実例をもとに綴られています</strong>。</p><p>プロブラムでいうと、オブジェクト指向や関数型などの様々な「手法」と「成功事例」を綴った書籍は多いですが、現実問題それらをどう実際のアプリケーションのコードの中で活用していくかという点について言及している本はあまりありません。実例となると不都合なことが多くなってくるからですが、そうした点から逃げず状況に応じ「最善」な手法を選択する方法が書かれている、といった趣です。</p><p>印象に残ったのは、マネージャーの成果とはチームのアウトプットであり、つまり<strong>マネージャーの仕事とは部下から最高の業績を引き出すことである</strong>、とズバッと定義している点です。さらにそのための<strong>手段は2つしかなく、それは「教育」と「動機付け」</strong>である、としています。そして、それらを行うのはほとんどが「ミーティング」の場であり、よって<strong>マネージャーの主たる仕事はミーティングによってなされる</strong>、と述べています。</p><p>また、事業の状態を観測するのにインジケーターの発明が必要であるとして前半部分でその点について解説が行われていますが、その<strong>前半の50pほどで私がコンサルタントとして経験を積む中で得られたノウハウがほぼすべて濃縮されて記載されている</strong>のには驚きました(そういう意味ではもっと早く出会いたかった本です)。</p><p>本書を読んで「こんな新しい解決策を見つけた！明日からチームで使おう！」という気分にはなりません。しかし、困難な問題に具体例を交え向かい合った本書は、常にそばに置いておきたいと強く感じさせるものになると思います。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4a4cd28eb6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chakki/%E3%83%9E%E3%83%8D%E3%82%B8%E3%83%A1%E3%83%B3%E3%83%88%E3%81%AB%E9%8A%80%E3%81%AE%E5%BC%BE%E4%B8%B8%E3%81%AF%E3%81%AA%E3%81%84%E3%81%8C-%E6%9C%80%E9%81%A9%E8%A7%A3%E3%81%AF%E3%81%82%E3%82%8B-high-output-management-e4a4cd28eb6">マネジメントに銀の弾丸はないが、最適解はある -HIGH OUTPUT MANAGEMENT-</a> was originally published in <a href="https://medium.com/chakki">chakki</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automatically detect typos in the pull request and fix it on behalf of you]]></title>
            <link>https://medium.com/chakki/automatically-detect-the-typo-in-the-pull-request-and-fix-it-on-behalf-of-you-f2caaaf50a7d?source=rss----16f1455e478e---4</link>
            <guid isPermaLink="false">https://medium.com/p/f2caaaf50a7d</guid>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[piqcy]]></dc:creator>
            <pubDate>Wed, 31 May 2017 04:18:03 GMT</pubDate>
            <atom:updated>2017-05-31T04:23:49.224Z</atom:updated>
            <content:encoded><![CDATA[<p>In the code review, human should not be bothered by small mistakes. To argue about typos and indents at the meeting room is time-consuming.</p><p>So now time to show our tool “typot” !</p><p><a href="https://github.com/chakki-works/typot">chakki-works/typot</a></p><p><strong>typot</strong> is <a href="https://developer.github.com/apps/">GitHub Apps</a> that detects typos automatically, and adopts fix just by checking the candidate.</p><p>A picture is worth a thousand words.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*0m2CnfXFQ203YGNE9yAfSQ.gif" /></figure><p>When you open the pull request, <strong>typot</strong> checks it and if there are typos, make review comments on it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VQP5yAVWI4wVxb7M6qbpFA.png" /></figure><p>If a suitable is fix in suggested candidates, then select it! <strong>typot</strong> adopts it automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iHn_tGpwea3oPDeUuwCG6A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Kj40MNGKVkXYAZYaCT9dg.png" /></figure><p>If you are interested in <strong>typot</strong>, you can install it by the following link.</p><p><a href="https://github.com/apps/typot"><strong>GitHub Apps Install Link</strong></a></p><p>We are the team that names “chakki” specializes in natural language processing and machine learning.</p><p><a href="https://github.com/chakki-works">chakki</a></p><p>So we want to try checking the trivials in code more by these methods.</p><p>We wish <strong>typot</strong> makes your code review time more productive!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2caaaf50a7d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chakki/automatically-detect-the-typo-in-the-pull-request-and-fix-it-on-behalf-of-you-f2caaaf50a7d">Automatically detect typos in the pull request and fix it on behalf of you</a> was originally published in <a href="https://medium.com/chakki">chakki</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simple Python Downloader for Available Word Embeddings]]></title>
            <link>https://medium.com/chakki/simple-downloader-for-public-word-embeddings-fdbd3ce7ba5b?source=rss----16f1455e478e---4</link>
            <guid isPermaLink="false">https://medium.com/p/fdbd3ce7ba5b</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[natural-language]]></category>
            <dc:creator><![CDATA[Hiroki Nakayama]]></dc:creator>
            <pubDate>Tue, 30 May 2017 00:03:18 GMT</pubDate>
            <atom:updated>2018-01-11T13:35:19.751Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EpHz6WJF9Djpd8TUiw7iZQ.jpeg" /></figure><p>In natural language processing, word embeddings are often used for many tasks such as document classification, named-entity recognition, question answering and so on. In these days, there are many available pre-trained word embeddings, so we don’t need to train them by ourselves.</p><p>Pre-trained word embedding is easy to use, however, it takes long time to search and download pre-trained word embeddings because they are made by different people and published on different sites. It’s a waste of time.</p><p>In order to save your time, I made a simple tool to download available word embeddings. The name is <strong><em>chakin. </em></strong>The features are: written in Python, enabled search and download datasets, <a href="https://github.com/chakki-works/chakin#supported-vectors">supported 23 vectors</a>(May 29, 2017).</p><p><a href="https://github.com/chakki-works/chakin">chakki-works/chakin</a></p><p>Let me show you how to use it.</p><h3>Installation</h3><p>To install <em>chakin</em>, simply:</p><pre>$ pip install chakin</pre><p>Satisfaction, guaranteed.</p><h3>Usage</h3><p>You need only three line to download a dataset. As an example, let’s download fastText(English ver), one of the word embeddings. First, you have to run python interpreter:</p><pre>$ python</pre><p>Before downloading the dataset, you have to import <em>chakin</em> and search word embeddings by search method. In this case, we will search datasets by their language:</p><pre>&gt;&gt;&gt; import chakin<br>&gt;&gt;&gt; chakin.search(lang=&quot;English&quot;)</pre><pre>        Name   Dimension                     Corpus  VocabularySize</pre><pre>2 fastText(en)       300                  Wikipedia            2.5M</pre><pre>11 GloVe.6B.50d       50  Wikipedia+Gigaword 5 (6B)            400K</pre><pre>12 GloVe.6B.100d     100  Wikipedia+Gigaword 5 (6B)            400K</pre><pre>...</pre><p>Currently, search method supports only target languages.</p><p>Once you find the dataset you want to download, you can download it by calling download method with the dataset index:</p><pre>&gt;&gt;&gt; chakin.download(number=2, save_dir=&#39;./&#39;)<br>Test: 100<strong>%</strong> <strong>||</strong>               <strong>|</strong> Time: 0:18:32  6.7 MiB<strong>/</strong>s<br>&#39;./wiki.en.vec&#39;</pre><h3>Conclusion</h3><p>Public word embeddings are often used in natural language processing. But it can take long time to train word embeddings by yourself. In this post, I introduced a tool to download pre-trained word embeddings. It is useful for you to save your time.</p><p><strong>If you Star this repository, It’s very encouraging for me!</strong></p><p><a href="https://github.com/chakki-works/chakin">chakki-works/chakin</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fdbd3ce7ba5b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chakki/simple-downloader-for-public-word-embeddings-fdbd3ce7ba5b">Simple Python Downloader for Available Word Embeddings</a> was originally published in <a href="https://medium.com/chakki">chakki</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[シンプルだけど奥が深い、単語で表す文章の特徴]]></title>
            <link>https://medium.com/chakki/%E3%82%B7%E3%83%B3%E3%83%97%E3%83%AB%E3%81%A0%E3%81%91%E3%81%A9%E5%A5%A5%E3%81%8C%E6%B7%B1%E3%81%84-%E5%8D%98%E8%AA%9E%E3%81%A7%E8%A1%A8%E3%81%99%E6%96%87%E7%AB%A0%E3%81%AE%E7%89%B9%E5%BE%B4-5e12123e8a60?source=rss----16f1455e478e---4</link>
            <guid isPermaLink="false">https://medium.com/p/5e12123e8a60</guid>
            <category><![CDATA[sentiment-analysis]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[tips]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[kamujun]]></dc:creator>
            <pubDate>Thu, 25 May 2017 01:37:59 GMT</pubDate>
            <atom:updated>2017-06-09T03:39:22.487Z</atom:updated>
            <content:encoded><![CDATA[<h3>はじめに</h3><p>本記事では、文書に出現する単語を用いて、その特徴を表現する方法について解説しようと思います。その題材として、映画のレビューについて肯定的か、否定的かを分類するタスクを取り上げます(極性判定と呼ばれるタスクです)。この実験を通じ、シンプルだけれども奥が深い、単語による文章表現について感じていただければと思います。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kYXWF00FBO95X1Xgh936Uw.png" /></figure><p>機械学習を行う場合、特徴は数値で表す必要があります。自然言語を扱う場合であっても当然、文章を何らかの方法で数値化しなければいけません。そのための代表的な手法の一つが、今回紹介するBag of Wordsになります。</p><h3>Bag of Words</h3><p>Bag of Wordsとは文書中に出現する単語を数え、その数を特徴とする手法です。文書における出現順序は考慮しないシンプルな表現です。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ckcHqjVPZjgKKnGDXJo_OA.png" /></figure><h4>単語の扱い方</h4><p>Bag of Wordsでは単語の定義、数え上げる単語の単位、数え上げの単位についてバリエーションがあります。Bag of Wordsが変わればその後の学習や予測の結果が変わってきます。</p><p><strong><em>単語の定義</em></strong><br>特徴の対象とみなす単語について決める必要があります。単語の区切り方を規定する「トークンパターン」を定める必要があります。また、助詞や前置詞は単語として扱わない方法もあります。</p><p><strong><em>単語のまとまり<br></em></strong>単純に一単語(unigram)を一まとまりとして扱う場合もありますが、二単語(bigram)以上を繋げて一まとまりとして見なす場合があります。(二単語の場合はBag of Bigramsと呼ばれます)</p><p><strong><em>数え上げの表現<br></em></strong>単語について、単純に数を数える方法(N回出現)と、出現有無(0もしくは1のbinary)で表す方法があります。</p><h3>実験</h3><p>Bag of Wordsにおける単語の扱い方よって正解率に差が出ることを実験で確認します。課題としてはMovie Review Dataにおけるデータが肯定的なレビューであるか、否定的なレビューであるかの判別を行いました。実装はscikit-learnを用いており、<a href="https://github.com/chakki-works/polarity_evaluation/">githubにて公開しています</a>。</p><h4>データの準備</h4><p>分析対象とするデータは公開されているデータセットであるMovie Review Dataを利用しました。前回の記事で紹介しているデータセットダウンロードツール「<a href="https://github.com/chakki-works/chazutsu">chazutsu</a>」を使用して簡単に用意ができます。是非利用してみて下さい。</p><h4>Bag of Wordsのモデル</h4><p>今回は以下表の通り4つのモデルを用意しました。便宜的にモデルには名前をつけています。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8ilN2GZF4hpsxEZnxdhQ0Q.png" /></figure><h3>仮説</h3><p>今回の判別で最も正解率がよくなる単語の数え上げ方は、単語まとまりの単位は「2単語」、数え上げの表現は「出現有無」ではないかと考えます。</p><p>単語まとまりの単位が「2単語」と推測する理由として、2語で肯定的・否定的が表現されるケースを考慮しています。文書中に「not good」と記載されていた場合、「not」が否定「good」が肯定と捉えられ肯定的とも否定的とも上手く表現されません。そこで「not good」とまとめると否定的という風に解釈できるようになると考えます。</p><p>数え上げの表現について「出現有無」を選択した理由は、レビューデータでは肯定的・否定的表現が出現するか否か(どれだけの回数出現したかではなく)で判断して良いと思いました。</p><h3>確認・考察</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xAjhudgThVbhJHwrzmXjKQ.png" /></figure><p>10分割交差検証で確認したところ上記の通り、「2単語・出現有無モデル」が最も良い正解率を示しました。仮説通りになっていることが確認できました(なお、性能の比較に際しては単純な出現回数でなくTF/IDFのスコアを特徴として用いています)。</p><p>また、Movie Review Dataにおいて「1単語・出現有無モデル」より「2単語・出現有無モデル」のほうが正解率がよくなることは、<a href="http://www.aclweb.org/anthology/P12-2018">こちらの論文</a>で示される結果と一致しています。</p><h3>終わりに</h3><p>文書の特徴を表す手法としてBag of Wordsを紹介しました。また、極性判定において単語の数え上げ方を工夫することにより正解率が向上することが確認できました。</p><h3>参考</h3><p><a href="http://www.aclweb.org/anthology/P12-2018">Baselines and Bigrams: Simple, Good Sentiment and Topic Classification<br></a><a href="http://scikit-learn.org/stable/modules/feature_extraction.html#the-bag-of-words-representation">scikit-leran:The Bag of Words representation</a><br><a href="http://www.cs.cornell.edu/people/pabo/movie-review-data/">Movie Review Data</a><br><a href="https://github.com/chakki-works/polarity_evaluation/">scikit-learnを用いた実装</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e12123e8a60" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chakki/%E3%82%B7%E3%83%B3%E3%83%97%E3%83%AB%E3%81%A0%E3%81%91%E3%81%A9%E5%A5%A5%E3%81%8C%E6%B7%B1%E3%81%84-%E5%8D%98%E8%AA%9E%E3%81%A7%E8%A1%A8%E3%81%99%E6%96%87%E7%AB%A0%E3%81%AE%E7%89%B9%E5%BE%B4-5e12123e8a60">シンプルだけど奥が深い、単語で表す文章の特徴</a> was originally published in <a href="https://medium.com/chakki">chakki</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>