Skip to content

Commit

Permalink
Ignore type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
liwii committed Nov 15, 2024
1 parent cca50d0 commit 421e680
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/langcheck/metrics/zh/reference_free_text_quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ def xuyaochen_report_readability(
pos_pipeline = pos_pipeline.append(tokenizer).append(postagger)

tokenize_pipeline = hanlp.pipeline().append(
hanlp.utils.rules.split_sentence
) # type: ignore[reportGeneralTypeIssues]
hanlp.utils.rules.split_sentence # type: ignore[reportGeneralTypeIssues]
)
tokenize_pipeline = tokenize_pipeline.append(tokenizer)
# OUTPUT: List[List[List[TOKEN]]]
output_tokens = list(map(tokenize_pipeline, generated_outputs))
Expand All @@ -258,8 +258,8 @@ def xuyaochen_report_readability(
def count_tokens(sent_tokens: list[str]) -> int:
count = sum(
[
not hanlp.utils.string_util.ispunct(token)
for token in sent_tokens # type: ignore[reportGeneralTypeIssues]
not hanlp.utils.string_util.ispunct(token) # type: ignore[reportGeneralTypeIssues]
for token in sent_tokens
]
)
return count
Expand Down

0 comments on commit 421e680

Please sign in to comment.