My Tech Life

Memo by a Japanese Software Developer in his late 50s.

Entries from 2024-03-15 to 1 day

Counting the frequency of specific terms in emails with Python.

Assuming there is a file named "category_social.mbox" in the same folder, the following Python script counts the frequency of term occurrences using CountVectorizer, only for emails with the word "follow" in their titles. This serves as a …

特定のメールの語句の出現頻度を集計する

同じフォルダに「category_social.mbox」があると仮定して、 タイトルにワード「フォロー」が含まれているメールのみ、 CountVectorizerで語句の出現頻度を集計するPythonスクリプトです。 AIや機械学習処理の前準備になる部分です。 今回はメール読み込みで…