SciSpaCyでテキストからStopWord, 句読点, 数字を除去する

自然言語で書かれたテキストの前処理として、“I, you, we, am, are” など、一般的に用いられるトークン (Stop word) や、数字や、句読点などを除去することがある。この前処理には、Gen ...
cronが動かないときに試したこと[cron]

サーバー上でpythonスクリプトをcronで動かそうとしたとき、うまくいかなかったときのことをメモする。
まず、Google検索でみつかったいくつかのブログを参考にし、crontabの記述を確認したり、権限を確認したり、 ...
博論日記 [書籍紹介]

3年で終わるつもりが、もう7年目・・・奨学金なし、貯金なし、社会人経験もほとんどない・・・博論が終わってもポストがない・・・周りは何をしているのか全く理解してくれないし、「で、まだ博論書いているの?」と言われ続ける日々。自身もかつて博 ...
yamlでスクリプトの引数やファイルパスなどを読み込む [Python][yaml]

インストール
pip install pyyamlまずは、config.yamlを作成
# config.yamln_class: 10xml_path:/home/ubuntu/disk/xml次にconfi ...
「TXTを1つずつ読み込んで空のDataframeに結合」を繰り返す [Python][Pandas]

XML論文からキーワードを抽出し、ワードクラウドで表示[Python]

ElsevierやSpringerなどのオンラインジャーナルは、一般的に、論文がXMLで提供されている。XMLで提供された論文からは、タイトルやアブストラクトや本文が取り出しやすいため、テキスト解析に重宝する。
今回はXM ...
現在時刻を文字列に変換[Python]

複数のデータを空のdataframeから生成し、結合する方法[Python][Pandas]

以下に3つのdataframe生成し、結合するスクリプトを示す。
pd.concatを使うと、dataframeを縦連結することができる。あまり使わないと思うが、axisのオプションで横連結にすることも可能だ。
AWS Multisiteでサブドメインを追加するまで[AWS][Lightsail][WordPress]

以下のAWS公式ドキュメントに沿って実施した。
流れとしては、インスタンスのプライマリドメインの定義→Wordpressダッシュボードでサブドメインを追加である。
WordPressの初期パスワードの取得コマンド[AWS][Lightsail]

AWS Lightsailで、Wordpressのインスタンスを立てた時、初期パスワードを取得するときのコマンドを紹介する。
cd ~cat bitnami_application_password