PgsFile 0.5.3__py3-none-any.whl → 0.5.5__py3-none-any.whl
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.
Potentially problematic release.
This version of PgsFile might be problematic. Click here for more details.
- PgsFile/PgsFile.py +42 -4
- PgsFile/__init__.py +2 -1
- PgsFile/models/dics/LIWC2015-Chinese.json +1 -0
- PgsFile/models/dics/LIWC2015-English.dic +6625 -0
- PgsFile/models/prompts/9. TextClassification prompt.txt +32 -0
- {pgsfile-0.5.3.dist-info → pgsfile-0.5.5.dist-info}/METADATA +5 -5
- {pgsfile-0.5.3.dist-info → pgsfile-0.5.5.dist-info}/RECORD +11 -8
- /PgsFile/models/prompts/{3. ICTCLAS Prompt.txt → 3. ICTCLAS prompt.txt} +0 -0
- {pgsfile-0.5.3.dist-info → pgsfile-0.5.5.dist-info}/WHEEL +0 -0
- {pgsfile-0.5.3.dist-info → pgsfile-0.5.5.dist-info}/licenses/LICENSE +0 -0
- {pgsfile-0.5.3.dist-info → pgsfile-0.5.5.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
You are an expert text classifier.
|
|
2
|
+
Your task is to classify a given Chinese news text into ONE and ONLY ONE of the following categories:
|
|
3
|
+
|
|
4
|
+
Categories:
|
|
5
|
+
- 港澳台 (Hong Kong, Macao, Taiwan)
|
|
6
|
+
- 房产 (Real Estate)
|
|
7
|
+
- 军事 (Military)
|
|
8
|
+
- 社会 (Society)
|
|
9
|
+
- 财经 (Finance & Economy)
|
|
10
|
+
- 文娱 (Culture & Entertainment)
|
|
11
|
+
- 汽车 (Automobile)
|
|
12
|
+
- 国际 (International News)
|
|
13
|
+
- 教育 (Education)
|
|
14
|
+
- 健康 (Health)
|
|
15
|
+
- 美食 (Food & Cuisine)
|
|
16
|
+
- 时政 (Current Affairs / Politics)
|
|
17
|
+
- 法治 (Law & Legal Affairs)
|
|
18
|
+
- 旅游 (Travel & Tourism)
|
|
19
|
+
- 体育 (Sports)
|
|
20
|
+
- 数码科技 (Digital Technology)
|
|
21
|
+
- 动漫 (Anime & Comics)
|
|
22
|
+
- 反腐前沿 (Anti-Corruption)
|
|
23
|
+
- 国内 (Domestic News within Mainland China)
|
|
24
|
+
|
|
25
|
+
Instructions:
|
|
26
|
+
1. Read the input Chinese text carefully.
|
|
27
|
+
2. Determine the most relevant SINGLE category from the list above.
|
|
28
|
+
3. If multiple categories seem relevant, choose the one that best represents the MAIN topic of the text.
|
|
29
|
+
4. Output ONLY the category name in Chinese (e.g., 财经, 体育), without explanation.
|
|
30
|
+
|
|
31
|
+
Text to classify:
|
|
32
|
+
{text}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PgsFile
|
|
3
|
-
Version: 0.5.
|
|
4
|
-
Summary: This module
|
|
3
|
+
Version: 0.5.5
|
|
4
|
+
Summary: This module streamlines Python package management, script execution, file handling, web scraping, and multimedia downloads. It supports LLM-based NLP tasks like OCR, tokenization, lemmatization, POS tagging, NER, ATE, dependency parsing, MDD, WSD, LIWC, MIP analysis, text classification, and Chinese-English sentence alignment. Additionally, it generates word lists and data visualizations, making it a practical tool for data scraping and analysis—ideal for literary students and researchers.
|
|
5
5
|
Author-email: Pan Guisheng <panguisheng@sufe.edu.cn>
|
|
6
6
|
License: License :: Free For Educational Use
|
|
7
7
|
|
|
@@ -52,11 +52,11 @@ Purpose: This module is designed to make complex tasks accessible and convenient
|
|
|
52
52
|
Key Features:
|
|
53
53
|
1. **Web Scraping:** Easily scrape data from websites and download multimedia content.
|
|
54
54
|
2. **Package Management:** Install, uninstall, and manage Python packages with simple commands.
|
|
55
|
-
3. **Data Retrieval:** Extract data from various file formats like text, JSON, TSV,
|
|
55
|
+
3. **Data Retrieval:** Extract data from various file formats like text, JSON, CSV, TSV, XLSX, XML, and HTML (both online and offline).
|
|
56
56
|
4. **Data Storage:** Write and append data to text files, Excel, JSON, TMX, and JSON lines.
|
|
57
|
-
5. **File and Folder Processing:** Manage file paths, create directories, move or copy files, and search for files with specific keywords.
|
|
57
|
+
5. **File and Folder Processing:** Manage file paths, create directories, move or copy files, convert CSV to JSON, and search for files with specific keywords.
|
|
58
58
|
6. **Data Cleaning:** Clean text, handle punctuation, remove stopwords, convert Markdown strings into Python objects, and prepare data for analysis, utilizing valuable corpora and dictionaries such as CET-4/6 vocabulary, BE21 and BNC-COCA word lists.
|
|
59
|
-
7. **NLP:** Perform OCR, word tokenization, lemmatization, POS tagging, NER, dependency parsing, ATE, MDD, WSD, LIWC, MIP analysis, and Chinese-English sentence alignment using prepared LLM prompts.
|
|
59
|
+
7. **NLP:** Perform OCR, word tokenization, lemmatization, POS tagging, NER, dependency parsing, ATE, MDD, WSD, LIWC, MIP analysis, text classification, and Chinese-English sentence alignment using prepared LLM prompts.
|
|
60
60
|
8. **Math Operations:** Format numbers, convert decimals to percentages, and validate data.
|
|
61
61
|
9. **Visualization:** Process images (e.g., make white pixels transparent, resize images) and manage fonts for rendering text.
|
|
62
62
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
PgsFile/PgsFile.py,sha256=
|
|
2
|
-
PgsFile/__init__.py,sha256=
|
|
1
|
+
PgsFile/PgsFile.py,sha256=8mIa_OHIT54liiLafv4Z69qMKa2gU2pQQNpWe5VAsoo,178679
|
|
2
|
+
PgsFile/__init__.py,sha256=g37kKJxGqD61TQCWg6tDhUr27u-XRuMTIYNUjzRLPQ8,3801
|
|
3
3
|
PgsFile/Corpora/Idioms/English_Idioms_8774.txt,sha256=qlsP0yI_XGECBRiPZuLkGZpdasc77sWSKexANu7v8_M,175905
|
|
4
4
|
PgsFile/Corpora/Monolingual/Chinese/People's Daily 20130605/Raw/00000000.txt,sha256=SLGGSMSb7Ff1RoBstsTW3yX2wNZpqEUchFNpcI-mrR4,1513
|
|
5
5
|
PgsFile/Corpora/Monolingual/Chinese/People's Daily 20130605/Raw/00000001.txt,sha256=imOa6UoCOIZoPXT4_HNHgCUJtd4FTIdk2FZNHNBgJyg,3372
|
|
@@ -2578,6 +2578,8 @@ PgsFile/models/dics/BE21.json,sha256=SsUN3fVyErT71bBIpkP3Owna3eFXaEVlF3whlKiwKvE
|
|
|
2578
2578
|
PgsFile/models/dics/BNC_COCA_lists.xlsx,sha256=ua5iQzEf5UQpsCezbsliNF6e_PYHIHGSJUjn9MyEEks,1229313
|
|
2579
2579
|
PgsFile/models/dics/CET-4 2016 (6314).txt,sha256=NZ3ai_OqIJJLPTPIs4Mc6170gzBIoC0Jgm4cF3tjMdc,57411
|
|
2580
2580
|
PgsFile/models/dics/CET-6 2016 (1726).txt,sha256=6Bk-R_qVxJRNV8McXqK9Q1uoFvpokB1foK9bUpHxRzE,14914
|
|
2581
|
+
PgsFile/models/dics/LIWC2015-Chinese.json,sha256=6_Pshbmwa1eE-nWIgLogWxx71-U9O2pEoFe7ODbUoUU,3600671
|
|
2582
|
+
PgsFile/models/dics/LIWC2015-English.dic,sha256=fHl7SEqNCnYhQp-OgUhufzqH6xETguJPkfpiIWdI0sI,118551
|
|
2581
2583
|
PgsFile/models/dics/unigram_freq_only.json,sha256=pr1OFOnAUfdzjHEHayhm-6-ZboQK7hPjB0DIqZztrn4,6289555
|
|
2582
2584
|
PgsFile/models/fonts/DejaVuSans.ttf,sha256=faGVp0xVvvmI0NSPlQi9XYSUJcF3Dbpde_xs6e2EiVQ,757076
|
|
2583
2585
|
PgsFile/models/fonts/书体坊赵九江钢笔行书体.ttf,sha256=fTOv4FFMnYtN1zCZghJ6-P1pzznA5qqoujwpDFY63Ek,3140656
|
|
@@ -2587,14 +2589,15 @@ PgsFile/models/fonts/博洋行书3500.TTF,sha256=VrgeHr8cgOL6JD05QyuD9ZSyw4J2aIV
|
|
|
2587
2589
|
PgsFile/models/fonts/陆柬之行书字体.ttf,sha256=Zpd4Z7E9w-Qy74yklXHk4vM7HOtHuQgllvygxZZ1Hvs,1247288
|
|
2588
2590
|
PgsFile/models/prompts/1. MIP prompt.txt,sha256=4lHlHmleayRytqr1n9jtt6vn1rQvyf4BKeThpbwI8o8,1638
|
|
2589
2591
|
PgsFile/models/prompts/2. WSD prompt.txt,sha256=o-ZFtCRUCDrXgm040WTQch9v2Y_r2SIlrZaquilJjgQ,2348
|
|
2590
|
-
PgsFile/models/prompts/3. ICTCLAS
|
|
2592
|
+
PgsFile/models/prompts/3. ICTCLAS prompt.txt,sha256=VFn6N_JViAbyy9NazA8gjX6SGo5mgBcZOf95aC9JB84,592
|
|
2591
2593
|
PgsFile/models/prompts/4. OCR prompt.txt,sha256=YxUQ2IlE52k0fcBnGsuOHqWAmfiEmIu6iRz5zecQ8dk,260
|
|
2592
2594
|
PgsFile/models/prompts/5. ATE prompt.txt,sha256=5wu0gGlsV7DI0LruYM3-uAC6brppyYD0IoiFVjMqm5Y,1553
|
|
2593
2595
|
PgsFile/models/prompts/6. ATE3 prompt.txt,sha256=VnaXpPa6BgZHUcm8PxmP_qgU-8xEoTB3XcBqjwCUy_g,1254
|
|
2594
2596
|
PgsFile/models/prompts/7. SentAlign prompt.txt,sha256=hXpqqC-CAgo8EytkJ0MaLhevLefALazWriY-ew39jxs,1537
|
|
2595
2597
|
PgsFile/models/prompts/8. TitleCase prompt.txt,sha256=4p-LfGy0xAj2uPi9amyMm41T6Z17VNpFFsGZOgWhROs,1136
|
|
2596
|
-
|
|
2597
|
-
pgsfile-0.5.
|
|
2598
|
-
pgsfile-0.5.
|
|
2599
|
-
pgsfile-0.5.
|
|
2600
|
-
pgsfile-0.5.
|
|
2598
|
+
PgsFile/models/prompts/9. TextClassification prompt.txt,sha256=JhQJu3rQSstNtkIkxPR1K-QmH9sGBEhbVKHAi7ItMUA,1066
|
|
2599
|
+
pgsfile-0.5.5.dist-info/licenses/LICENSE,sha256=cE5c-QToSkG1KTUsU8drQXz1vG0EbJWuU4ybHTRb5SE,1138
|
|
2600
|
+
pgsfile-0.5.5.dist-info/METADATA,sha256=PsHJZ2RATXCH_kd7HSoCzuPU8HGgjI_P4a2Z1viIyXA,4555
|
|
2601
|
+
pgsfile-0.5.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
2602
|
+
pgsfile-0.5.5.dist-info/top_level.txt,sha256=028hCfwhF3UpfD6X0rwtWpXI1RKSTeZ1ALwagWaSmX8,8
|
|
2603
|
+
pgsfile-0.5.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|