expertsystem's Introduction
expertsystem's People
expertsystem's Issues
キーワードの後に続く品詞タグ列の抽出
ToDo
著者のテキストから著者のキーワードを検索し、キーワードに続く単語の品詞タグ列(品詞パターン)を抽出する
各キーワードに関して行うので、返すものは品詞パターンのリスト
こんなんですかね
n-gram的に取ることになると思うので、いい感じに
class PosTag:
tag = ""
class Pattern:
pos_tags = []
def extract_pos_tags_after_keywords(text: str, keywords: list[str], n: int) -> list[Pattern]:
トークンの出現頻度の計算
ToDo
テキストを取り出し、トークンの出現回数を数える
その後、トークンの総数で割って出現率を求める
トークン := 空白区切りの文字列(単語)
こんなんですかね
def token_frequency_ratio(text: str) -> float:
入力テキストの処理
ToDo
入力テキストに対して、「トークン出現率」「キーワード抽出」「キーワード後のPOSタグ文字列抽出」を行う
解析結果と学習結果の比較で答えを導く
ToDo
入力テキストの解析の結果と、事前学習による学習データを、キーワードの類似度やキーワードの後ろの品詞タグ文字列の類似度で比較することで、そのテキストがどの著者のものかを判断する
学習データの保存
ToDo
全著者について、「トークン出現率」、「キーワード抽出」、「キーワード後の品詞タグ文字列抽出」を行い、学習データとして保存する
キーワードの抽出
ToDo
ある著者のテキスト群におけるトークンの出現率を計算し、全著者のトークンの出現率と大きく異なるトークンを著者のキーワードとして抽出する
こんなんですかね
def extract_keywords(text: str, token_to_frequency: dict[str, float]) -> list[str]:
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.