Accent Types アクセントの種類|Numbers 数字|Counters 数え方|Suffixes|Verbs 動詞|Adjectives 形容詞|Prefixes|〜もの|Special Common Exceptions|Regions, Cities & Places|Names|Trends
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
#![feature(cell_update)] | |
#[cfg(test)] | |
mod test { | |
use crate::*; | |
use std::cell::Cell; | |
#[test] | |
fn test() { | |
test_counter::<0>(); |
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
# Sync Pipfile with setup.py dependencies | |
# Assumptions: | |
# - You are running in a directory with Pipfile, Pipfile.lock & setup.py | |
# - Your setup.py calls a function named setup() | |
# - setup() is called with keyword arguments of install_requires and dependency_links (can be empty lists) | |
# - All your remote dependencies are HTTPS git | |
import pipfile | |
import ast | |
import json |
Overview Nayr's Japanese Core5000 Anki deck (discussion) contains pronunciations of all five thousand or so sentences in A Frequency Dictionary of Japanese by Yukio Tono, Makoto Yamazaki, and Kikuo Maekawa (2013), which contains the top five thousand words in Japanese according to the latest corpus research. I analyzed these sentences to make a histogram table of hiragana occurrences, including dipthongs like きゃ, ちょ, etc. The attached two tables show the results in modern hiragana order, and sorted order.
Technical notes I parsed a file containing those sentences (with annotated readings in hiragana, in core5k-sentences.md
) using the following script and helper file (in kana.txt
):
cp core5k-sentences.md sacrifice.md;
sed '/^$/d' kana.txt | while read i; do
echo -n $i " : " ;
sed -n "s/$i/$i\n/gp"
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
import bisect | |
class NFA(object): | |
EPSILON = object() | |
ANY = object() | |
def __init__(self, start_state): | |
self.transitions = {} | |
self.final_states = set() | |
self._start_state = start_state |