-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
異なる種類の助詞の重複を許したい #6
Comments
品詞細分類(pos_detail_1)まで見たほうがよさそうですね。 $ npm i -g kuromoji-cli
$ kuromoji "ターミナルで「test」と入力すると" [
{
"word_id": 434620,
"word_type": "KNOWN",
"word_position": 1,
"surface_form": "ターミナル",
"pos": "名詞",
"pos_detail_1": "一般",
"pos_detail_2": "*",
"pos_detail_3": "*",
"conjugated_type": "*",
"conjugated_form": "*",
"basic_form": "ターミナル",
"reading": "ターミナル",
"pronunciation": "ターミナル"
},
{
"word_id": 2594250,
"word_type": "KNOWN",
"word_position": 6,
"surface_form": "で",
"pos": "助詞",
"pos_detail_1": "格助詞",
"pos_detail_2": "一般",
"pos_detail_3": "*",
"conjugated_type": "*",
"conjugated_form": "*",
"basic_form": "で",
"reading": "デ",
"pronunciation": "デ"
},
{
"word_id": 2613610,
"word_type": "KNOWN",
"word_position": 7,
"surface_form": "「",
"pos": "記号",
"pos_detail_1": "括弧開",
"pos_detail_2": "*",
"pos_detail_3": "*",
"conjugated_type": "*",
"conjugated_form": "*",
"basic_form": "「",
"reading": "「",
"pronunciation": "「"
},
{
"word_id": 120,
"word_type": "UNKNOWN",
"word_position": 8,
"surface_form": "test",
"pos": "名詞",
"pos_detail_1": "固有名詞",
"pos_detail_2": "組織",
"pos_detail_3": "*",
"conjugated_type": "*",
"conjugated_form": "*",
"basic_form": "*"
},
{
"word_id": 2611700,
"word_type": "KNOWN",
"word_position": 12,
"surface_form": "」",
"pos": "記号",
"pos_detail_1": "括弧閉",
"pos_detail_2": "*",
"pos_detail_3": "*",
"conjugated_type": "*",
"conjugated_form": "*",
"basic_form": "」",
"reading": "」",
"pronunciation": "」"
},
{
"word_id": 2595020,
"word_type": "KNOWN",
"word_position": 13,
"surface_form": "と",
"pos": "助詞",
"pos_detail_1": "格助詞",
"pos_detail_2": "引用",
"pos_detail_3": "*",
"conjugated_type": "*",
"conjugated_form": "*",
"basic_form": "と",
"reading": "ト",
"pronunciation": "ト"
},
{
"word_id": 2567130,
"word_type": "KNOWN",
"word_position": 14,
"surface_form": "入力",
"pos": "名詞",
"pos_detail_1": "サ変接続",
"pos_detail_2": "*",
"pos_detail_3": "*",
"conjugated_type": "*",
"conjugated_form": "*",
"basic_form": "入力",
"reading": "ニュウリョク",
"pronunciation": "ニューリョク"
},
{
"word_id": 3168910,
"word_type": "KNOWN",
"word_position": 16,
"surface_form": "する",
"pos": "動詞",
"pos_detail_1": "自立",
"pos_detail_2": "*",
"pos_detail_3": "*",
"conjugated_type": "サ変・スル",
"conjugated_form": "基本形",
"basic_form": "する",
"reading": "スル",
"pronunciation": "スル"
},
{
"word_id": 2594810,
"word_type": "KNOWN",
"word_position": 18,
"surface_form": "と",
"pos": "助詞",
"pos_detail_1": "接続助詞",
"pos_detail_2": "*",
"pos_detail_3": "*",
"conjugated_type": "*",
"conjugated_form": "*",
"basic_form": "と",
"reading": "ト",
"pronunciation": "ト"
}
] |
助詞の品詞細分類1までを見て助詞同士を比較する。 > ターミナルで「test」**と**入力する**と**、画面に表示されます。 1個目の「と」は格助詞、2個めの「と」は接続助詞となるため、異なるものとして認識しエラーとしない。 fix #6
#7 に実装したPRを出しました。 |
実装では単純に各tokenの |
#7 ありがとうございます!
この通りであれば、助詞については |
@takahashim なるほど。ありがとうございます。 |
マージして3.2.0としてリリースしました |
ありがとうございました! |
という感じの文を書いたときに「と置くと」の部分でまだ怒られましたので、ご参考までに。 |
@naskya 別の原因な可能性があるのでIssueを作ってもらえると助かります。 Math記法が何か関係してそうな気がしなくはないので、プレーンなテキストとして再現するものがあると助かります。
とした場合は 品詞細分類1(接続助詞と格助詞) が異なるので再現できませんでした `$A \coloneqq B + C$ と置くと、
|
@azu すみません。頭が回っていないときに適当なコメントを書いてしまいましたがこれは不適切な指摘でしたので撤回します。 私は普段 LaTeX 文書の校正にのみ textlint を使用しており、自分が textlint-plugin-latex2e を併用している(ある意味特殊な状態の textlint を使っている)ことを失念していました。 ご指摘の通り、textlint-plugin-latex2e を使わずにこの文を lint しても特にエラーは生じませんでしたので、これは no-doubled-joshi の不具合ではないと考えられます。 また、今後何か怪しいケースを見つけた場合にはプレーンなテキストで再現するケースを作るようにいたします。よろしくお願いします。 |
『ターミナルで「test」と入力すると』を与えると「一文に二回以上利用されている助詞 "と" がみつかりました」のエラーが出ますが、1個目の「と」は格助詞、2個めの「と」は接続助詞です。このような場合は重複を許したいです。
The text was updated successfully, but these errors were encountered: