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

src/anki/ankiclient: add {pitch-categories} marker #253

Merged
merged 1 commit into from
Jan 26, 2025

Conversation

precondition
Copy link
Contributor

@precondition precondition commented Jan 23, 2025

Add a new Anki marker called {pitch-categories}. This marker is a comma-separated list of all the distinct pitch accent categories applicable to the term. For example, the {pitch-categories} of 赤い would be kifuku,heiban (or heiban,kifuku — no guarantees can be given in regards to the order).

All the available pitch accent categories are:

  1. heiban (pitch position = 0)
  2. atamadaka (pitch position = 1)
  3. nakadaka (1 < pitch position < term.moras.size)
  4. kifuku (1 <= pitch position < term.moras.size ; only applicable to i-adjectives and non-suru verbs)
  5. odaka (pitch position = term.moras.size)

The corresponding marker in Yomitan is actually called {pitch-accent-categories} but given that Memento omits the -accent- part in its versions of all the other pitch accent markers, I stuck to Memento's naming style.

Partially solves #250.

@ripose-jp
Copy link
Owner

ripose-jp commented Jan 25, 2025

There's some trailing white space in some of the files you changed. You can remove it by running find . -type f -print0 | xargs -0 perl -pi -e 's/ +$//' in the src directory. There's probably a setting in your text editor that will remove it for you in the future.

Also, could you amend your commit message to include some of the info you put in your PR description?

@precondition precondition force-pushed the pitch-accent-categories branch from 0673642 to e814eb1 Compare January 26, 2025 12:16
This marker is a comma-separated list of all the distinct pitch accent
categories applicable to the term.

Available pitch accent categories:

1. heiban
2. atamadaka
3. nakadaka
4. kifuku
5. odaka

Partially solves ripose-jp#250.
@ripose-jp ripose-jp force-pushed the pitch-accent-categories branch from e814eb1 to 231cf75 Compare January 26, 2025 20:30
@ripose-jp ripose-jp merged commit b402106 into ripose-jp:master Jan 26, 2025
3 checks passed
@precondition precondition deleted the pitch-accent-categories branch January 27, 2025 09:34
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.

2 participants