patiroha 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. patiroha-1.0.0/.gitignore +42 -0
  2. patiroha-1.0.0/CHANGELOG.md +15 -0
  3. patiroha-1.0.0/LICENSE +21 -0
  4. patiroha-1.0.0/PKG-INFO +618 -0
  5. patiroha-1.0.0/README.md +577 -0
  6. patiroha-1.0.0/examples/analyze.py +271 -0
  7. patiroha-1.0.0/examples/generate_sample.py +272 -0
  8. patiroha-1.0.0/examples/sample_patents_500.csv +501 -0
  9. patiroha-1.0.0/examples/visualize.py +464 -0
  10. patiroha-1.0.0/pyproject.toml +87 -0
  11. patiroha-1.0.0/src/patiroha/__init__.py +98 -0
  12. patiroha-1.0.0/src/patiroha/_lazy.py +27 -0
  13. patiroha-1.0.0/src/patiroha/_types.py +68 -0
  14. patiroha-1.0.0/src/patiroha/clustering/__init__.py +14 -0
  15. patiroha-1.0.0/src/patiroha/clustering/labeling.py +145 -0
  16. patiroha-1.0.0/src/patiroha/clustering/landscape.py +101 -0
  17. patiroha-1.0.0/src/patiroha/clustering/spatial.py +65 -0
  18. patiroha-1.0.0/src/patiroha/embeddings/__init__.py +13 -0
  19. patiroha-1.0.0/src/patiroha/embeddings/sbert.py +108 -0
  20. patiroha-1.0.0/src/patiroha/embeddings/tfidf.py +50 -0
  21. patiroha-1.0.0/src/patiroha/io/__init__.py +5 -0
  22. patiroha-1.0.0/src/patiroha/io/loader.py +64 -0
  23. patiroha-1.0.0/src/patiroha/metadata/__init__.py +16 -0
  24. patiroha-1.0.0/src/patiroha/metadata/applicant.py +61 -0
  25. patiroha-1.0.0/src/patiroha/metadata/columns.py +64 -0
  26. patiroha-1.0.0/src/patiroha/metadata/dates.py +49 -0
  27. patiroha-1.0.0/src/patiroha/metadata/ipc.py +144 -0
  28. patiroha-1.0.0/src/patiroha/network/__init__.py +11 -0
  29. patiroha-1.0.0/src/patiroha/network/cooccurrence.py +168 -0
  30. patiroha-1.0.0/src/patiroha/pipeline.py +288 -0
  31. patiroha-1.0.0/src/patiroha/stats/__init__.py +16 -0
  32. patiroha-1.0.0/src/patiroha/stats/cagr.py +65 -0
  33. patiroha-1.0.0/src/patiroha/stats/hhi.py +118 -0
  34. patiroha-1.0.0/src/patiroha/stats/representatives.py +206 -0
  35. patiroha-1.0.0/src/patiroha/stopwords/__init__.py +5 -0
  36. patiroha-1.0.0/src/patiroha/stopwords/catalog.py +1202 -0
  37. patiroha-1.0.0/src/patiroha/stopwords/manager.py +176 -0
  38. patiroha-1.0.0/src/patiroha/tokenize/__init__.py +13 -0
  39. patiroha-1.0.0/src/patiroha/tokenize/filters.py +107 -0
  40. patiroha-1.0.0/src/patiroha/tokenize/japanese.py +192 -0
  41. patiroha-1.0.0/src/patiroha/tokenize/normalize.py +39 -0
  42. patiroha-1.0.0/tests/conftest.py +1 -0
  43. patiroha-1.0.0/tests/test_clustering.py +74 -0
  44. patiroha-1.0.0/tests/test_embeddings.py +17 -0
  45. patiroha-1.0.0/tests/test_io.py +33 -0
  46. patiroha-1.0.0/tests/test_metadata.py +84 -0
  47. patiroha-1.0.0/tests/test_network.py +119 -0
  48. patiroha-1.0.0/tests/test_stats.py +156 -0
  49. patiroha-1.0.0/tests/test_stopwords.py +121 -0
  50. patiroha-1.0.0/tests/test_tokenize.py +66 -0
@@ -0,0 +1,42 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.egg-info/
6
+ dist/
7
+ build/
8
+ *.egg
9
+ .eggs/
10
+
11
+ # Virtual environments
12
+ .venv/
13
+ venv/
14
+ ENV/
15
+
16
+ # IDE
17
+ .vscode/
18
+ .idea/
19
+ *.swp
20
+ *.swo
21
+ *~
22
+
23
+ # Testing
24
+ .pytest_cache/
25
+ .mypy_cache/
26
+ .ruff_cache/
27
+ htmlcov/
28
+ .coverage
29
+ coverage.xml
30
+
31
+ # OS
32
+ .DS_Store
33
+ Thumbs.db
34
+
35
+ # Output
36
+ examples/output/
37
+
38
+ # Internal / development files
39
+ apollo-patent-analysis-*/
40
+ patiroha-design.md
41
+ .claude/
42
+ examples/sample_data.csv
@@ -0,0 +1,15 @@
1
+ # Changelog
2
+
3
+ ## [1.0.0] - 2026-04-01
4
+
5
+ ### Added
6
+
7
+ - **stopwords**: 7カテゴリ(一般、特許用語、構造、IT、化学、単位、NPL)のストップワード辞書と `StopwordManager` によるカテゴリ選択・カスタマイズ
8
+ - **tokenize**: Janome ベースの複合名詞抽出(`extract_keywords`)、N-gram フィルタ、NFKC 正規化、品詞タグ選択対応
9
+ - **metadata**: IPC 階層パース(セクション〜サブグループ)、出願日マルチフォーマット解析、出願人正規化、カラム自動マッピング
10
+ - **io**: CSV/Excel の自動エンコーディング判定ローダー
11
+ - **embeddings**: TF-IDF(Janome 統合)、SBERT エンベディング(モデル選択可、カラム重み付け対応)
12
+ - **clustering**: UMAP + HDBSCAN / KMeans、c-TF-IDF 自動ラベリング、空間近接分析
13
+ - **stats**: HHI / エントロピー / ジニ係数、CAGR / トレンド判定、重心距離 / MMR 代表特許抽出、類似特許検索
14
+ - **network**: キーワード共起ネットワーク(Jaccard / Dice / Cosine / PMI / 頻度)、Louvain 等コミュニティ検出、PageRank 等中心性分析
15
+ - **pipeline**: `PatentPipeline` による前処理→埋め込み→クラスタリング→ラベリングのワンライナー実行
patiroha-1.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 しばやま (shibayamalicht)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.