Skip to content
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

Extend support for irregular inflections of suru-verbs #2038

Merged
merged 4 commits into from
Oct 15, 2024

Conversation

enellis
Copy link
Contributor

@enellis enellis commented Oct 10, 2024

Description

This adds support for irregular inflections of する-verbs by introducing a new inflection reason: 'irregular'.
This is used to handle cases where the verbs deviate from the standard する conjugation pattern.

The following irregular forms are now supported:

  • ⚪︎せさせる, ⚪︎せられる (irregular causative and passive forms)
  • ⚪︎しさせる, ⚪︎しられる (alternative causative and passive forms)
  • 五段化-verbs (する-verbs inflected as す-Godan verbs)
  • ずる-verbs

Caveats

  • When handling irregular forms like 罰せられる, the structure could be misinterpreted as irregular < potential < potential or passive instead of the correct irregular < potential or passive. To prevent this, we now explicitly avoid reason chains such as potential < potential or passive or potential < causative, which would be grammatically incorrect anyway.
  • Deinflection of vs-c class verbs is reverted, as these were only used in classical Japanese.
    Since we currently focus on modern Japanese inflections, retaining these rules could lead to confusing matches in modern contexts.

Fixes #1467. See the related discussion for more details.

@enellis
Copy link
Contributor Author

enellis commented Oct 10, 2024

@SaltfishAmi Could you help me with a good Chinese translation for irregular / 不規則 in the context of irregular verb conjugations?

@birtles
Copy link
Member

birtles commented Oct 14, 2024

Thanks for doing this!

  • Deinflection of vs-c class verbs is reverted, as these were only used in classical Japanese.
    Since we currently focus on modern Japanese inflections, retaining these rules could lead to confusing matches in modern contexts.

I guess that makes sense. I don't suppose you have any examples where it gets confused?

Also, I'm curious about the vz class. It looks like we didn't handle that before (since we only matched vs-*). Do we have any example words there? I guess it would be nice to add a unit test or two for vz and some of the other cases handled by this (especially cases that trigger the ruleReasons.add(Reason.PotentialOrPassive); ruleReasons.add(Reason.Causative); block).

What do you think?

@enellis
Copy link
Contributor Author

enellis commented Oct 14, 2024

Thank you for the review!


  • Deinflection of vs-c class verbs is reverted, as these were only used in classical Japanese.
    Since we currently focus on modern Japanese inflections, retaining these rules could lead to confusing matches in modern contexts.

I guess that makes sense. I don't suppose you have any examples where it gets confused?

What I had in mind are cases where both a す and する entry exist, such as 会す [えす] and 会する [かいする]. When matching an inflected form, you would consistently get both results, creating unnecessary noise.
This becomes especially problematic with forms like した, して(...) and しろ, which are not correct because classical Japanese used different auxiliary verbs to express those.
In my opinion, if we wanted to deinflect to classical verbs, we should do it properly and introduce additional WordTypes and add rules with the correct auxiliary verbs.


Also, I'm curious about the vz class. It looks like we didn't handle that before (since we only matched vs-*). Do we have any example words there?

The vz class refers to zuru verbs, which are basically rendaku-ed suru verbs. Modern じる-verbs, such as 感じる, evolved from suru verbs (感する) to zuru verbs (感ずる), and eventually to ichidan verbs (感じる). Some forms of zuru verbs, like 感ぜられる, are still used in modern Japanese, often to evoke a classical style. Maybe, from a modern perspective, we can think of ずる-verbs as an alternative inflection pattern for じる-verbs.


I guess it would be nice to add a unit test or two for vz and some of the other cases handled by this (especially cases that trigger the ruleReasons.add(Reason.PotentialOrPassive); ruleReasons.add(Reason.Causative); block).

Zuru verbs are basically just special class suru verbs, so they are included in the test cases for these. There is a test for every form of vz class verbs that is now being deinflected under the // ずる comment.:

      // ずる
      ['信ずる', '信ぜぬ', [Reason.Irregular, Reason.Negative]],
      ['信ずる', '信ぜず', [Reason.Irregular, Reason.Zu]],
      ['信ずる', '信ぜさせる', [Reason.Irregular, Reason.Causative]],
      ['信ずる', '信ぜられる', [Reason.Irregular, Reason.PotentialOrPassive]],
      ['信ずる', '信ずれば', [Reason.Irregular, Reason.Ba]],
      ['信ずる', '信ぜよ', [Reason.Irregular, Reason.Imperative]],

The block is tested by the following two cases, which are the reason why the block was introduced in the first place:

      ['発する', '発せさせる', [Reason.Irregular, Reason.Causative]],
      ['発する', '発せられる', [Reason.Irregular, Reason.PotentialOrPassive]],

If the block wasn’t functioning correctly, the reason chain would always include an additional Reason.Potential from the

  ['せる', 'する', Type.IchidanVerb, Type.SpecialSuruVerb, [Reason.Irregular, Reason.Potential]],

rule, causing the test to fail. Should this be made more explicit?

…e and Causative

This is an issue when handling irregular forms like
罰せられる, where the structure could be misinterpreted as
'irregular < potential < potential or passive' instead of the correct
'irregular < potential or passive'.
These were used in classical Japanese and inflect according
to the classical verb す, which is not present in modern Japanese.
Since we currently focus on modern Japanese inflections,
retaining these rules could lead to confusing matches in
modern contexts.
@birtles
Copy link
Member

birtles commented Oct 15, 2024

What I had in mind are cases where both a す and する entry exist, such as 会す [えす] and 会する [かいする]. When matching an inflected form, you would consistently get both results, creating unnecessary noise.
This becomes especially problematic with forms like した, して(...) and しろ, which are not correct because classical Japanese used different auxiliary verbs to express those.
In my opinion, if we wanted to deinflect to classical verbs, we should do it properly and introduce additional WordTypes and add rules with the correct auxiliary verbs.

Yes, I agree. It's probably better to do it properly or not at all. I wonder if @SaltfishAmi has any thoughts since I think you added vs-c handling in #450?

The vz class refers to zuru verbs, which are basically rendaku-ed suru verbs. Modern じる-verbs, such as 感じる, evolved from suru verbs (感する) to zuru verbs (感ずる), and eventually to ichidan verbs (感じる). Some forms of zuru verbs, like 感ぜられる, are still used in modern Japanese, often to evoke a classical style. Maybe, from a modern perspective, we can think of ずる-verbs as an alternative inflection pattern for じる-verbs.

Wow, thank you. I didn't know that background.

Should this be made more explicit?

No, that's perfect. Sorry, I only skimmed the tests but now I see the ずる tests etc.

@SaltfishAmi
Copy link
Contributor

irregular / 不規則

simp. chinese: 不规则(same kanji but in simplified form)

I wonder if @SaltfishAmi has any thoughts since I think you added vs-c handling in #450?

I absolutely cannot recall what I did four years ago...

@enellis
Copy link
Contributor Author

enellis commented Oct 15, 2024

simp. chinese: 不规则(same kanji but in simplified form)

Very nice, thank you!

This adds support for irregular inflections of する-verbs
by introducing a new inflection reason: 'irregular'.
This is used to handle cases where the verbs deviate from the
standard する conjugation pattern.

The following irregular forms are now supported:
- ⚪︎せさせる, ⚪︎せられる (irregular causative and passive forms)
- ⚪︎しさせる, ⚪︎しられる (alternative causative and passive forms)
- 五段化-verbs (する-verbs inflected as す-Godan verbs)
- ずる-verbs
@enellis enellis marked this pull request as ready for review October 15, 2024 10:43
@birtles birtles merged commit 38ee139 into birchill:main Oct 15, 2024
2 checks passed
@birtles
Copy link
Member

birtles commented Oct 15, 2024

Thank you!

@enellis enellis deleted the irregular-suru branch October 15, 2024 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parsing for 宣さない
3 participants