-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added entry_points configuration to setup.py to enable running the pa…
…ckage as a command-line tool after installation. Add README Simplified the CLI by removing the --no-split argument and keeping only the --split argument. Added a new mode option 'judgement' to the command-line interface. Implemented optional --no-split argument to disable document segmentation. Changed the default mode from 'judgement' to 'label-only' in the command-line interface. Fix division by zero problem Fix types Replaced string-based judgement types with a StrEnum type for better type safety and self-documentation. Add enum type Added JudgementType import to test_detector and test_judge files. Replaced types in test files to use new JudgementType enum.
- Loading branch information
1 parent
b67cf25
commit 664b61d
Showing
10 changed files
with
92 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ __pycache__/ | |
# Ignore Python bytecode files | ||
*.pyc | ||
__pycache__/ | ||
build* | ||
*.egg-info/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from enum import StrEnum, auto | ||
|
||
|
||
class JudgementType(StrEnum): | ||
CANTONESE = auto() | ||
SWC = auto() | ||
NEUTRAL = auto() | ||
MIXED = auto() | ||
CANTONESE_QUOTES_IN_SWC = auto() | ||
MIXED_QUOTES_IN_SWC = auto() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
你喺邊度|NoQuote|Cantonese | ||
乜你今日唔使返學咩|NoQuote|Cantonese | ||
今日好可能會嚟唔到|NoQuote|Cantonese | ||
我哋影張相留念|NoQuote|Cantonese | ||
你在哪裏|NoQuote|SWC | ||
家長也應做好家居防蚊措施|NoQuote|SWC | ||
教育不只是為了傳授知識|NoQuote|SWC | ||
是咁的|NoQuote|Mixed | ||
佢在屋企吃飯|NoQuote|Mixed | ||
去學校讀書|NoQuote|Neutral | ||
做人最重要開心|NoQuote|Neutral | ||
外交部駐香港特別行政區特派員公署副特派員|NoQuote|Neutral | ||
全日制或大學生於晚市星期一至星期四一天前訂座|NoQuote|Neutral | ||
這就是「你哋都戇鳩嘅」的意思 |Quote|CantoneseQuotesInSWC | ||
今天我是一個「冇嘢好做」的狀態 |Quote|CantoneseQuotesInSWC | ||
他們跟我說:「是咁的,即係噉講」 |Quote|MixedQuotesInSWC | ||
他說:「佢在屋企吃飯」 |Quote|MixedQuotesInSWC | ||
你喺邊度|NoQuote|cantonese | ||
乜你今日唔使返學咩|NoQuote|cantonese | ||
今日好可能會嚟唔到|NoQuote|cantonese | ||
我哋影張相留念|NoQuote|cantonese | ||
你在哪裏|NoQuote|swc | ||
家長也應做好家居防蚊措施|NoQuote|swc | ||
教育不只是為了傳授知識|NoQuote|swc | ||
是咁的|NoQuote|mixed | ||
佢在屋企吃飯|NoQuote|mixed | ||
去學校讀書|NoQuote|neutral | ||
做人最重要開心|NoQuote|neutral | ||
外交部駐香港特別行政區特派員公署副特派員|NoQuote|neutral | ||
全日制或大學生於晚市星期一至星期四一天前訂座|NoQuote|neutral | ||
這就是「你哋都戇鳩嘅」的意思 |Quote|cantonese_quotes_in_swc | ||
今天我是一個「冇嘢好做」的狀態 |Quote|cantonese_quotes_in_swc | ||
他們跟我說:「是咁的,即係噉講」 |Quote|mixed_quotes_in_swc | ||
他說:「佢在屋企吃飯」 |Quote|mixed_quotes_in_swc |