Fmt only (maybe)
This commit is contained in:
@@ -719,5 +719,3 @@ class YomiError(Exception):
|
||||
基本的に「学習の前処理のテキスト処理時」には発生させ、そうでない場合は、
|
||||
ignore_yomi_error=True にしておいて、この例外を発生させないようにする。
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
@@ -60,7 +60,7 @@ __REPLACE_MAP = {
|
||||
"」": "'",
|
||||
}
|
||||
# 記号類の正規化パターン
|
||||
__REPLACE_PATTERN = re.compile("|".join(re.escape(p) for p in __REPLACE_MAP.keys()))
|
||||
__REPLACE_PATTERN = re.compile("|".join(re.escape(p) for p in __REPLACE_MAP))
|
||||
# 句読点等の正規化パターン
|
||||
__PUNCTUATION_CLEANUP_PATTERN = re.compile(
|
||||
# ↓ ひらがな、カタカナ、漢字
|
||||
|
||||
@@ -88,7 +88,7 @@ def initialize_worker(port: int = WORKER_PORT) -> None:
|
||||
client = None
|
||||
try:
|
||||
client = WorkerClient(port)
|
||||
except (socket.timeout, socket.error):
|
||||
except (OSError, socket.timeout):
|
||||
logger.debug("try starting pyopenjtalk worker server")
|
||||
import os
|
||||
import subprocess
|
||||
@@ -120,7 +120,7 @@ def initialize_worker(port: int = WORKER_PORT) -> None:
|
||||
try:
|
||||
client = WorkerClient(port)
|
||||
break
|
||||
except socket.error:
|
||||
except OSError:
|
||||
time.sleep(0.5)
|
||||
count += 1
|
||||
# 20: max number of retries
|
||||
|
||||
@@ -114,7 +114,7 @@ class PartOfSpeechDetail(BaseModel):
|
||||
part_of_speech_detail_2: str = Field(title="品詞細分類2")
|
||||
part_of_speech_detail_3: str = Field(title="品詞細分類3")
|
||||
# context_idは辞書の左・右文脈IDのこと
|
||||
# https://github.com/VOICEVOX/open_jtalk/blob/427cfd761b78efb6094bea3c5bb8c968f0d711ab/src/mecab-naist-jdic/_left-id.def # noqa
|
||||
# https://github.com/VOICEVOX/open_jtalk/blob/427cfd761b78efb6094bea3c5bb8c968f0d711ab/src/mecab-naist-jdic/_left-id.def
|
||||
context_id: int = Field(title="文脈ID")
|
||||
cost_candidates: List[int] = Field(title="コストのパーセンタイル")
|
||||
accent_associative_rules: List[str] = Field(title="アクセント結合規則の一覧")
|
||||
|
||||
Reference in New Issue
Block a user