2013年 12月 06日
今日の材料はこれ Transcriptome Responses of Insect Fat Body Cells to Tissue Culture Environment 映画「The Social Network」の脚本をNLTKで解析して遊んでみたや、 「魔法少女まどか☆マギカ」の台詞をNLTK(Natural Language Toolkit)で解析するに習ってやってみました。 途中グラフ描くのがやばかったので、Matpotlibのインストールで詰んだあたなへを参考にEPDを使って楽しました。 論文のテキストをコピーペーストし、'pc論文.txt' として保存しました。 iPythonを起動し、 #20131206追記 import nltk from nltk.book import * #データの読み込み raw=o p e n ('pc論文.txt').read() #単語認識 tokens=nltk.word_tokenize(raw) text=nltk.Text(tokens) #単語数 len(tokens) Out[12]: 5791 #語彙数 tokens_1 = [w.lower() for w in tokens] #20131206修正('s/I/1/g') len(set(tokens_1)) Out[14]: 1935 訳2000単語知ってれば論文が書ける!! #何回'cell' って言ってるか tokens_1.count('cell') Out[15]: 36 tokens_1.count('cells') Out[16]: 27 tokens_1.count('fat') Out[17]: 81 tokens_1.count('body') Out[18]: 70 bodies がいる予感... #culture とprimary が含まれる文 text.concordance("culture" and "primary",lines=5) Displaying 5 of 8 matches: es. Cell lines are established from primary culture of tissue when a population roliferating cells derived from the primary tissue explant undergo immortalizat undergo immortalization [ 5 ] . In primary cultures of insect cells , it usual ught that during the early stage of primary culture , isolated explants activat ant are different from cells in the primary tissue. Champy ( 1913 ) proposed th #単語の分布をみる fdist=nltk.FreqDist(w.lower() for w in text) fdist.plot(50,cumulative=True) よく出てくる単語の出てくるタイミングがみたくなりますね。 #単語を指定 terms=['cells','cell','transcriptome','genes','culture','intact'] #指定した単語の分布を見る text.dispersion_plot(terms) transcriptomeについて話してからgenesに移行するのが多いらしい 人気ブログランキングに参加しています。 応援よろしくお願いします。
by koretoki
| 2013-12-06 10:20
|
アバウト
以前の記事
2021年 02月 2018年 02月 2017年 12月 2016年 12月 2016年 06月 2014年 09月 2014年 05月 2014年 01月 2013年 12月 2013年 06月 2013年 02月 2012年 11月 2011年 07月 2011年 05月 2010年 11月 2010年 05月 2010年 04月 2009年 12月 2009年 09月 2009年 08月 2009年 07月 2009年 06月 2009年 04月 2009年 03月 2009年 02月 2009年 01月 2008年 12月 2008年 11月 カテゴリ
最新のトラックバック
タグ
その他のジャンル
ブログパーツ
ファン
記事ランキング
ブログジャンル
画像一覧
|
ファン申請 |
||