forked from r9y9/pyopenjtalk
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: NJDFeature 型の定義を types.py に移動し、if TYPE_CHECKING: せずとも NJDFe…
…ature を型ヒントに使えるよう改善 従来は openjtalk.pyx の型定義ファイルである openjtalk.pyi に記述されていたため型としては実態がなく、呼び出すには from __future__ import annotations に加え if TYPE_CHECKING: の中で import する必要があり非常に面倒だった
- Loading branch information
1 parent
3302a30
commit 2a7faf5
Showing
5 changed files
with
27 additions
and
42 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
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,18 @@ | ||
from typing import TypedDict | ||
|
||
|
||
class NJDFeature(TypedDict): | ||
string: str | ||
pos: str | ||
pos_group1: str | ||
pos_group2: str | ||
pos_group3: str | ||
ctype: str | ||
cform: str | ||
orig: str | ||
read: str | ||
pron: str | ||
acc: int | ||
mora_size: int | ||
chain_rule: str | ||
chain_flag: int |
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