diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..09b054a --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,165 @@ +name: go + +on: + push: + branches: [main] + # The fuzz job: weekly, or by hand. + schedule: + - cron: "17 3 * * 1" + workflow_dispatch: + pull_request: + paths: + - "go/**" + - "spec/**" + # The tests read the R0 primitives dumped from JS there. + - "rust/tests/data/**" + # The compare job diffs the module against the built JS package. + - "js/src/**" + - "scripts/compare-ports.mjs" + - "scripts/lib/ports.mjs" + - ".github/workflows/go.yml" + +permissions: + contents: read + +env: + # Test with the toolchain of the matrix, never an automatic download. + GOTOOLCHAIN: local + +jobs: + test: + if: github.event_name != 'schedule' + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + # stable, and the floor from go/go.mod (the `go` line). + go: [stable, "1.22.x"] + defaults: + run: + working-directory: go + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 + with: + go-version: ${{ matrix.go }} + cache: false + - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + with: + node-version: 24 + cache: pnpm + # The artist-side tests read testdata/artist_cases.json, which is too big to commit (it + # would ship in the module zip): write it from the built JS package. + - name: Artist cases from the JS package + run: | + pnpm install --frozen-lockfile + pnpm --filter trackparse build + node go/scripts/dump_artist_cases.mjs + working-directory: . + - name: Data codegen is up to date + run: node scripts/gen_data.mjs --check + - name: Unicode codegen is up to date + run: node scripts/gen_unicode.mjs --check + - if: matrix.go == 'stable' + name: gofmt + run: test -z "$(gofmt -l .)" || { gofmt -l .; exit 1; } + - run: go vet ./... + # wire_hook.go and internal/cmd/dump with the JSON door linked in. + - run: go vet -tags trackparse_wire ./... + - if: matrix.go == 'stable' + name: staticcheck + env: + GOTOOLCHAIN: auto + run: | + go run honnef.co/go/tools/cmd/staticcheck@2026.2.2 ./... + go run honnef.co/go/tools/cmd/staticcheck@2026.2.2 -tags trackparse_wire ./... + - name: No unstable sorts + # JS sorts are stable; sort.Slice is not. Use slices.SortStableFunc. + run: "! grep -n 'sort\\.Slice(' --include='*.go' -r ." + - name: go.mod has no dependencies + run: "! grep -q '^require' go.mod" + # Every shared fixture, the primitives and the API tests. + - run: go test -race ./... + env: + TRACKPARSE_REQUIRE_ARTIST_CASES: "1" + # The committed Unicode sample is small; this compares every code point and more with Node. + - if: matrix.go == 'stable' + name: Full Unicode check against Node + run: go test -run '^TestUnicodeFull$' -count=1 . + env: + TRACKPARSE_UNICODE_FULL: "1" + + # Every fixture input through the built JS package and the Go module: full outputs must match. + compare: + if: github.event_name != 'schedule' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 + with: + go-version: stable + cache: false + - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + with: + node-version: 24 + cache: pnpm + - run: pnpm install --frozen-lockfile + - run: pnpm --filter trackparse build + - run: node scripts/compare-ports.mjs --only=go + + # The module as the Go proxy will serve it: only what `git archive` puts under go/, without + # ../spec or ../rust. The fixture and primitive tests must skip; everything else must pass. + module-zip: + if: github.event_name != 'schedule' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 + with: + go-version: stable + cache: false + - name: Build and test go/ alone + run: | + dir="$(mktemp -d)" + git archive HEAD go/ | tar -x -C "$dir" + cd "$dir/go" + test -z "$(find .. -maxdepth 1 -mindepth 1 ! -name go)" + if grep -q '^require' go.mod; then echo "go.mod has dependencies"; exit 1; fi + go vet ./... + go test -count=1 ./... + + # Each fuzz target for a fixed time, seeded with every fixture input. Weekly and by hand. + fuzz: + if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + # FuzzParse checks every mode per input and spends its first minute or so on the seeds. + include: + - { target: FuzzParse, time: 5m } + - { target: FuzzParseArtists, time: 3m } + - { target: FuzzFormat, time: 3m } + - { target: FuzzParseTracklist, time: 3m } + - { target: FuzzApplyEdits, time: 3m } + - { target: FuzzRun, time: 3m } + - { target: FuzzUnmarshalTrack, time: 3m } + defaults: + run: + working-directory: go + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 + with: + go-version: stable + cache: false + - run: go test -run '^$' -fuzz '^${{ matrix.target }}$' -fuzztime ${{ matrix.time }} . + - if: failure() + name: Keep the failing input + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: fuzz-${{ matrix.target }} + path: go/testdata/fuzz + if-no-files-found: ignore diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml index 0734ee4..470d4bf 100644 --- a/.github/workflows/pr-title.yml +++ b/.github/workflows/pr-title.yml @@ -36,6 +36,7 @@ jobs: fixtures python rust + go site ci deps diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d845a30..05be868 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,10 @@ name: release # release-please keeps a "chore: release" PR up to date from conventional commits on main. -# Merging that PR tags js-vX.Y.Z / spec-vX.Y.Z / python-vX.Y.Z / rust-vX.Y.Z, creates the GitHub -# Releases, and publishes to npm, PyPI and (once enabled) crates.io. +# Merging that PR tags js-vX.Y.Z / spec-vX.Y.Z / python-vX.Y.Z / rust-vX.Y.Z / go/vX.Y.Z, creates +# the GitHub Releases, and publishes to npm, PyPI and (once enabled) crates.io. The Go module has +# no registry upload: the go/vX.Y.Z tag is the release, and publish-go only checks it through the +# Go module proxy. on: push: @@ -17,6 +19,10 @@ on: description: "Re-publish an existing rust release tag to crates.io (e.g. rust-v0.5.0). Leave empty for a normal release-please run." required: false default: "" + go_tag: + description: "Re-run the Go module checks for an existing go release tag (e.g. go/v0.6.0). Leave empty for a normal release-please run." + required: false + default: "" permissions: {} @@ -40,6 +46,10 @@ jobs: rust_release_created: ${{ steps.release.outputs['rust--release_created'] }} rust_tag_name: ${{ steps.release.outputs['rust--tag_name'] }} rust_version: ${{ steps.release.outputs['rust--version'] }} + # The path is "go", so the keys are go--*; the tag itself is go/vX.Y.Z (tag-separator "/"). + go_release_created: ${{ steps.release.outputs['go--release_created'] }} + go_tag_name: ${{ steps.release.outputs['go--tag_name'] }} + go_version: ${{ steps.release.outputs['go--version'] }} steps: - uses: googleapis/release-please-action@v4 id: release @@ -325,3 +335,150 @@ jobs: echo "crates.io: https://crates.io/crates/trackparse/${VERSION} · docs: https://docs.rs/trackparse/${VERSION}" } > notes.md gh release edit "$TAG" --notes-file notes.md + + # The Go module is published by its tag: there is no upload and no token. The proxy + # (proxy.golang.org) and the checksum database (sum.golang.org) fetch go/vX.Y.Z on the first + # request and keep that content forever; a bad version can only be retracted in go/go.mod and + # replaced by a new one. This job tests the tagged tree, makes that first request, installs the + # module from a clean module through the proxy, and adds install notes to the GitHub Release. + publish-go: + needs: release-please + if: needs.release-please.outputs.go_release_created == 'true' || (github.event_name == 'workflow_dispatch' && inputs.go_tag != '') + runs-on: ubuntu-latest + environment: + name: go + url: https://pkg.go.dev/github.com/4matic/trackparse/go + permissions: + contents: write # edit the GitHub Release notes + env: + # Test with the toolchain set up below, never an automatic download. + GOTOOLCHAIN: local + MODULE: github.com/4matic/trackparse/go + steps: + - name: Resolve the release tag + id: tag + env: + RELEASED_TAG: ${{ needs.release-please.outputs.go_tag_name }} + RELEASED_VERSION: ${{ needs.release-please.outputs.go_version }} + INPUT_TAG: ${{ inputs.go_tag }} + run: | + if [ -n "$INPUT_TAG" ]; then + tag="$INPUT_TAG" + else + tag="$RELEASED_TAG" + fi + # The go command only finds a module in go/ under tags named go/vX.Y.Z. + if ! printf '%s' "$tag" | grep -Eq '^go/v[0-9]+\.[0-9]+\.[0-9]+$'; then + echo "the go tag must look like go/vX.Y.Z, got '$tag'" >&2 + exit 1 + fi + version="${tag#go/v}" + if [ -z "$INPUT_TAG" ] && [ "$version" != "$RELEASED_VERSION" ]; then + echo "tag $tag does not match the released version $RELEASED_VERSION" >&2 + exit 1 + fi + echo "tag=$tag" >> "$GITHUB_OUTPUT" + echo "version=$version" >> "$GITHUB_OUTPUT" + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + ref: ${{ steps.tag.outputs.tag }} + - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 + with: + go-version: stable + # No cache in the publishing job: nothing restored from a cache ends up in the release. + cache: false + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + with: + node-version: 24 + + - name: Verify versions are in sync + env: + TAG_VERSION: ${{ steps.tag.outputs.version }} + run: | + go_version=$(sed -n 's/^const SpecVersion = "\([^"]*\)".*/\1/p' go/data_gen.go) + spec_version=$(cat spec/VERSION) + echo "go=$go_version spec=$spec_version tag=$TAG_VERSION" + test "$go_version" = "$TAG_VERSION" + test "$spec_version" = "$TAG_VERSION" + node go/scripts/gen_data.mjs --check + + - name: Test + working-directory: go + run: | + go vet ./... + go test ./... + + # The first request makes the proxy fetch the tag and the checksum database record it. + # A fresh tag can take a moment to become visible, so retry. + - name: Fetch the version through the module proxy + env: + VERSION: ${{ steps.tag.outputs.version }} + run: | + cd "$RUNNER_TEMP" + for attempt in 1 2 3 4 5 6 7 8 9 10; do + if GOPROXY=https://proxy.golang.org go list -m "$MODULE@v$VERSION"; then + exit 0 + fi + echo "attempt $attempt: the proxy does not serve v$VERSION yet" >&2 + sleep $((attempt * 15)) + done + exit 1 + + # Install from a clean module, with the default GOPROXY and GOSUMDB, as a user would. + - name: go get from a clean module + env: + VERSION: ${{ steps.tag.outputs.version }} + run: | + dir="$RUNNER_TEMP/go-get-check" + mkdir -p "$dir" + cd "$dir" + go mod init example.com/check + go get "$MODULE@v$VERSION" + cat > main.go <<'EOF' + package main + + import ( + "fmt" + + trackparse "github.com/4matic/trackparse/go" + ) + + func main() { + t := trackparse.Parse("Noisia - Stigma (2015)") + fmt.Println(trackparse.SpecVersion, t.Artists[0].Name, t.Title, *t.Year) + } + EOF + got=$(go run .) + want="$VERSION Noisia Stigma 2015" + echo "got: $got" + echo "want: $want" + test "$got" = "$want" + + # pkg.go.dev adds a version on any proxy request for it (https://pkg.go.dev/about); the + # steps above made one. The page can take a few minutes to appear. + - name: Request the version on pkg.go.dev + env: + VERSION: ${{ steps.tag.outputs.version }} + run: curl -fsS -o /dev/null "https://proxy.golang.org/$MODULE/@v/v$VERSION.info" + + - name: Add install notes to the GitHub Release + env: + GH_TOKEN: ${{ github.token }} + TAG: ${{ steps.tag.outputs.tag }} + VERSION: ${{ steps.tag.outputs.version }} + run: | + highlights=".github/release-notes/${VERSION}.md" + { + if [ -f "$highlights" ]; then cat "$highlights"; echo; fi + gh release view "$TAG" --json body --jq .body + echo + echo "### Install" + echo + echo '```sh' + echo "go get ${MODULE}@v${VERSION}" + echo '```' + echo + echo "pkg.go.dev: https://pkg.go.dev/${MODULE}@v${VERSION} · implements spec ${VERSION} ([SPEC.md](https://github.com/${GITHUB_REPOSITORY}/blob/${TAG}/spec/SPEC.md))" + } > "$RUNNER_TEMP/notes.md" + # The npm release (js-vX.Y.Z) stays "Latest"; don't touch that flag here. + gh release edit "$TAG" --notes-file "$RUNNER_TEMP/notes.md" diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b503f08..b21f838 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -10,6 +10,7 @@ on: # The compare job diffs the crate against the built JS package. - "js/src/**" - "scripts/compare-ports.mjs" + - "scripts/lib/ports.mjs" - ".github/workflows/rust.yml" permissions: diff --git a/.github/workflows/spec.yml b/.github/workflows/spec.yml index 4d4e045..b7bef30 100644 --- a/.github/workflows/spec.yml +++ b/.github/workflows/spec.yml @@ -10,6 +10,8 @@ on: - "js/scripts/gen-data.ts" - "js/src/data.generated.ts" - "python/pyproject.toml" + - "rust/Cargo.toml" + - "go/data_gen.go" - "pnpm-lock.yaml" - "pnpm-workspace.yaml" - "package.json" @@ -34,13 +36,15 @@ jobs: run: pnpm --filter @trackparse/fixture-gen test - name: Port data codegen is up to date run: pnpm --filter trackparse gen:data:check - - name: js, python, rust and spec versions are linked + - name: js, python, rust, go and spec versions are linked run: | js_version=$(node -p "require('./js/package.json').version") py_version=$(python3 -c 'import tomllib; print(tomllib.load(open("python/pyproject.toml", "rb"))["project"]["version"])') rs_version=$(python3 -c 'import tomllib; print(tomllib.load(open("rust/Cargo.toml", "rb"))["package"]["version"])') + go_version=$(sed -n 's/^const SpecVersion = "\([^"]*\)".*/\1/p' go/data_gen.go) spec_version=$(cat spec/VERSION) - echo "js=$js_version python=$py_version rust=$rs_version spec=$spec_version" + echo "js=$js_version python=$py_version rust=$rs_version go=$go_version spec=$spec_version" test "$js_version" = "$spec_version" test "$py_version" = "$spec_version" test "$rs_version" = "$spec_version" + test "$go_version" = "$spec_version" diff --git a/.gitignore b/.gitignore index d816ccf..cb8b066 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,11 @@ python/dist/ # Rust target/ +# Go (test binaries from -cpuprofile / -c, fuzz caches) +*.test +# Go: written by go/scripts/dump_artist_cases.mjs from js/dist, too big for the module zip +go/testdata/artist_cases.json + # Editors / OS .DS_Store .idea/ diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d7b939f..4f7f4f6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -2,5 +2,6 @@ "js": "0.5.1", "spec": "0.5.1", "python": "0.5.1", - "rust": "0.5.1" + "rust": "0.5.1", + "go": "0.5.1" } diff --git a/AGENTS.md b/AGENTS.md index 063ae2b..a84a465 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -103,32 +103,93 @@ rust/ crates.io package `trackparse` (Rust 1.74+, one depend scripts/dump_primitives.mjs expected R0 primitive values from JS, into tests/data/ examples/dump.rs Rust side of compare-ports (JSONL in, JSON out, through wire) tests/ fixtures.rs (every shared fixture + the conformance report), api.rs, - tracklist_api.rs, tracklist_properties.rs (R13.11 invariants), serde.rs, + properties.rs (SPEC invariants), tracklist_api.rs, + tracklist_properties.rs (R13.11 invariants), serde.rs, data/primitives.json (from dump_primitives.mjs), skip.json (only ever shrinks) +go/ Go module `github.com/4matic/trackparse/go`, package `trackparse` (Go 1.22+, + no dependencies, no unsafe or cgo; a release-please component, tagged + go/vX.Y.Z, served by the Go module proxy) + trackparse.go public API: Parse, ParseWith, ParseArtists(With), Format(With), Normalize, + AllArtists, Parser/NewParser, ParseTracklist(With), ApplyEdits(With); + invalid UTF-8 is sanitized here (WHATWG maximal subparts to U+FFFD) + doc.go package overview shown on pkg.go.dev + types.go public structs and typed-string enums (mirror the schemas); nullable + fields are pointers + options.go ParseOptions, FormatOptions, Keywords, TracklistOptions (zero value = the + defaults; FeatMarker and AudioSeconds are pointers), Ptr, the Edit + constructors, and the resolved forms + json.go MarshalJSON / UnmarshalJSON with JSON.stringify's bytes, and the JSON reader + *.go one file per js/src file, same rule IDs in comments: parser, normalize, + mode, scanner, prefix, classify, separator, artists, credits, title, + assemble, format, words, digits, tables, context + tl_*.go one file per js/src/tracklist file: tl_split, tl_times, tl_emphasis, + tl_kinds, tl_positions, tl_warnings, tl_parse, tl_edits, tl_options + unicode.go L and Lu (R0.6), JS toLowerCase (R0.4), NFC/NFD (R1) over the generated tables + wire.go the JSON door: every function with loose JSON arguments (fixtures and + fuzzers call it in tests), not public API + wire_hook.go //go:build trackparse_wire: the only init(), it fills in internal/wire for + internal/cmd/dump; without the tag no user binary links the JSON door + data_gen.go GENERATED from spec/data + spec/VERSION (never edit); SpecVersion carries + the x-release-please-version marker + unicode_gen.go GENERATED from Node: L, Lu, the lowercase map, combining class ranks, + composition and decomposition tables (never edit) + scripts/gen_data.mjs codegen for data_gen.go (--check for CI) + scripts/gen_unicode.mjs codegen for unicode_gen.go and the committed sample testdata/unicode/ + (under 300 KB, it ships in the module zip; --check for CI) + scripts/dump_artist_cases.mjs JS values for the artist-side unit tests, into + testdata/artist_cases.json (git-ignored, written on demand) + internal/cmd/dump/ Go side of compare-ports (JSONL in, JSON out, through internal/wire); + go run -tags trackparse_wire ./internal/cmd/dump + internal/wire/ the JSON door's package + *_test.go fixtures_test.go (every shared fixture + the conformance report; skipped + when ../spec is absent, as in the module zip), match_test.go, schema_test.go, + primitives_test.go (R0 values from rust/tests/data/primitives.json), + unicode_test.go, properties_test.go (SPEC invariants and R13.11), + example_test.go (the pkg.go.dev examples, checked by go test), + fuzz_test.go (fuzz targets seeded from the fixture inputs), + concurrency_test.go (16 goroutines against sequential results, under + -race in CI), bench_test.go (the time ceilings and the benchmarks), + options_test.go (typed options against the JSON door on every fixture), + race_test.go / norace_test.go (raceEnabled: fewer property cases and + ten times the ceilings under -race), unit tests per area + testdata/ skip.json (only ever shrinks), unicode/ (cases dumped from Node), + artist_cases.json (git-ignored: dump_artist_cases.mjs writes it; the + tests skip without it, CI writes it and requires it), fuzz/ (failing + fuzz inputs land here) site/ documentation site + playground (Astro + Starlight, GitHub Pages) astro.config.mjs base /trackparse, sidebar - src/content/docs/ the pages (Markdown/MDX, JS + Python + Rust tabs on every example); + src/content/docs/ the pages (Markdown/MDX, JS + Python + Rust + Go tabs on every example); reference/spec.md is generated from spec/SPEC.md - src/components/ HeroDemo, Playground (runs js/ in the browser), Feature, Stats + src/components/ HeroDemo, Playground (runs js/ in the browser), Install (the install + switch), Features, Compare, Stats, SocialIcons src/lib/ trackview.ts (highlight + field rendering), icons.ts (Lucide SVG strings), lang.ts (one language choice for docs tabs, install switch, playground) scripts/sync-spec.mjs copies spec/SPEC.md into the docs at build time -scripts/compare-ports.mjs every fixture through js/dist, the Python port and the Rust crate, diffs - the full outputs (parseTracklist and applyEdits included); - --only=python or --only=rust for one port +scripts/compare-ports.mjs every fixture through js/dist, the Python port, the Rust crate and the Go + module, diffs the full outputs (parseTracklist and applyEdits included); + --only=python, --only=rust or --only=go for one port +scripts/fuzz-ports.mjs random differential run: single tracks and tracklists with edits through + all four ports (--n, --lists, --seed, --only=go|rust|python, --out) +scripts/lib/ports.mjs runners and the JSON diff shared by compare-ports and fuzz-ports scripts/corpus-check.mjs R13 against a private tracklist corpus (JSONL in spec/corpus/), via js/dist scripts/dump_py.py Python side of compare-ports (JSONL in, to_dict() JSON out) .github/workflows/ js.yml (full suite on Node 22/24; compat: fixtures vs built dist on Node 18/20), python.yml (lint, mypy, pytest on 3.9–3.14; build: fixtures vs installed wheel), rust.yml (codegen drift, fmt, clippy, cargo test on stable and 1.74, publish dry run; compare: Rust vs built JS on every fixture), + go.yml (codegen drift, gofmt, vet, staticcheck, the sort.Slice and + no-require greps, go test -race on stable and 1.22, the full Unicode + sweep on stable; compare: Go vs built JS; module-zip: go/ alone, as the + proxy serves it; fuzz: each target, weekly and by hand), spec.yml (fixture validation, generated/codegen drift, generator tests, - js/python/rust/spec version link), release.yml (release-please + npm, PyPI - and crates.io publish), pages.yml (build site/, deploy to GitHub Pages), + js/python/rust/go/spec version link), release.yml (release-please + npm, + PyPI and crates.io publish, Go tag checks through the module proxy), + pages.yml (build site/, deploy to GitHub Pages), pr-title.yml (conventional PR titles) .github/release-notes/ optional hand-written highlights prepended to a GitHub Release release-please-config.json, .release-please-manifest.json release automation (never hand-edit the manifest) -js/CHANGELOG.md, spec/CHANGELOG.md, python/CHANGELOG.md, rust/CHANGELOG.md generated by release-please +js/CHANGELOG.md, spec/CHANGELOG.md, python/CHANGELOG.md, rust/CHANGELOG.md, go/CHANGELOG.md + generated by release-please (go/CHANGELOG.md from the first Go release on) ``` ## Golden rule @@ -138,8 +199,8 @@ js/CHANGELOG.md, spec/CHANGELOG.md, python/CHANGELOG.md, rust/CHANGELOG.md gen - Never change a port's behaviour without a fixture that pins the new behaviour. If a fix needs no fixture change, it is a bug fix; if an existing `expected` changes, it is a behaviour change. - Never hand-edit `spec/fixtures/generated/**`, `js/src/data.generated.ts`, - `python/src/trackparse/_data.py`, `rust/src/data.rs` or `rust/src/unicode_tables.rs`. Regenerate - them. + `python/src/trackparse/_data.py`, `rust/src/data.rs`, `rust/src/unicode_tables.rs`, + `go/data_gen.go` or `go/unicode_gen.go`. Regenerate them. - Word lists live **only** in `spec/data/`. Ports compile them into source with codegen; never copy a list into port code by hand, never hard-code a keyword in a scanner. - The fixtures, not any one implementation, are the source of truth. When SPEC.md and a fixture @@ -165,15 +226,18 @@ js/CHANGELOG.md, spec/CHANGELOG.md, python/CHANGELOG.md, rust/CHANGELOG.md gen ambiguous, reject it in `model.ts` (`problem()`) instead of guessing. Then `pnpm gen:fixtures` and commit the output. 4. **Codegen.** If `spec/data` or `spec/VERSION` changed: `pnpm gen:data`, in `python/` - `uv run python scripts/gen_data.py`, and in `rust/` `node scripts/gen_data.mjs`. -5. **Implementation.** Change every port (JS, Python and Rust today). Cite rule IDs in comments. + `uv run python scripts/gen_data.py`, in `rust/` `node scripts/gen_data.mjs`, and in `go/` + `node scripts/gen_data.mjs`. +5. **Implementation.** Change every port (JS, Python, Rust and Go). Cite rule IDs in comments. 6. **Conformance.** `pnpm test` and `pnpm conformance` must be green: 100% of fixtures, schema-valid output, property tests passing, `pnpm gen:check` clean. Same for Python (`uv run pytest`, - `uv run python scripts/conformance.py`) and Rust (`cargo test`, and the report with - `TRACKPARSE_REPORT=1`), then `node scripts/compare-ports.mjs` must report 0 differences. + `uv run python scripts/conformance.py`), Rust (`cargo test`, and the report with + `TRACKPARSE_REPORT=1`) and Go (`go test ./...`, and the report with + `TRACKPARSE_REPORT=1 go test -run TestFixtures -v`), then `node scripts/compare-ports.mjs` must + report 0 differences. 7. **Docs.** Update the site pages and README sections that describe the rule (see - [Documentation site and READMEs](#documentation-site-and-readmes)), with JavaScript, Python and - Rust examples whose outputs you ran, and `pnpm docs:build` green. + [Documentation site and READMEs](#documentation-site-and-readmes)), with JavaScript, Python, + Rust and Go examples whose outputs you ran, and `pnpm docs:build` green. 8. **Commit message.** Conventional commits; the message *is* the changelog entry (see [Versioning and release](#versioning-and-release)). Any change to an existing `expected` value is a behaviour change and must be a `feat` (or carry `!`), never a `fix`/`chore`. Don't touch @@ -188,7 +252,9 @@ Every port must produce byte-identical output. The full text is SPEC.md R0; in s (The first exception, R0.6 "letter", is general category L: JS `/\p{L}/u`, Python `str.isalpha()`. Not `\p{Alphabetic}` and not Rust `char::is_alphabetic()`, which also accept Nl and combining marks. The second, R0.6 "uppercase letter" used only by R6.10, is category Lu: JS - `/\p{Lu}/u`, Python `unicodedata.category(c) == "Lu"`.) + `/\p{Lu}/u`, Python `unicodedata.category(c) == "Lu"`. Go's `unicode.IsLetter` and `IsUpper` + are category L and Lu, but of Go's Unicode version, so the Go port uses tables generated from + Node instead.) - **Explicit whitespace set** (R0.2): U+0009–U+000D, U+0020, U+0085, U+00A0, U+1680, U+2000–U+200A, U+2028, U+2029, U+202F, U+205F, U+3000. Never use a language's `\s` or `trim()` semantics without checking they match. @@ -198,8 +264,9 @@ Every port must produce byte-identical output. The full text is SPEC.md R0; in s - **Iterate by code point** (R0.5), not UTF-16 unit or byte. No offsets in the output. - *Digit* means ASCII `0`–`9` only. - **Total** (R0.8): any string returns a ParsedTrack. Never throw or panic, including on bad - options. No backtracking blowups: a 10,000-code-point input takes tens of milliseconds in JS and Rust - and well under a second in Python (the suites enforce 1 s, Rust 2 s). + options. No backtracking blowups: a 10,000-code-point input takes tens of milliseconds at most in + JS, Rust and Go and well under a second in Python (the suites enforce 1 s in JS and Python, 2 s + in Rust and Go). ## Commands @@ -248,11 +315,24 @@ Rust (run inside `rust/`; Rust 1.74 or newer, Node for the codegen): | `cargo fmt --check` · `cargo clippy --all-targets --all-features -- -D warnings` | Format check and lint (the panic lints are in `Cargo.toml`) | | `cargo publish --dry-run` | The crate packages cleanly | -Cross-port check, from the repo root (needs `uv` and `cargo`): +Go (run inside `go/`; Go 1.22 or newer, Node for the codegen): + +| Command | What it does | +|---|---| +| `go test ./...` | Every fixture, the primitives, the invariants, the examples, API and unit tests (CI adds `-race`) | +| `TRACKPARSE_REPORT=1 go test -run TestFixtures -v` | Pass rate per fixture file and per rule ID | +| `node scripts/gen_data.mjs` · `node scripts/gen_unicode.mjs` | Regenerate `data_gen.go` / `unicode_gen.go` (and `testdata/unicode/`); `--check` fails if stale | +| `gofmt -l .` · `go vet ./...` · `go run honnef.co/go/tools/cmd/staticcheck@2026.2.2 ./...` | Format check (must print nothing) and lint; CI runs vet and staticcheck again with `-tags trackparse_wire` | +| `go run -tags trackparse_wire ./internal/cmd/dump < cases.jsonl` | The JSON door on JSONL (what compare-ports and fuzz-ports run); without the tag it stops with a message | +| `go test -run '^$' -fuzz '^FuzzParse$' -fuzztime 60s` | Fuzz one target (`go test -list Fuzz` lists them: Parse, ParseArtists, Format, ParseTracklist, ApplyEdits, Run, UnmarshalTrack); a failing input lands in `testdata/fuzz/` | +| `pnpm --filter trackparse build && node scripts/dump_artist_cases.mjs` | Write `testdata/artist_cases.json` (2.3 MB, git-ignored) for the artist-side tests; without it they skip, and `TRACKPARSE_REQUIRE_ARTIST_CASES=1` (set in CI) makes that a failure | +| `TRACKPARSE_UNICODE_FULL=1 go test -run TestUnicodeFull` | The full NFC/NFD and lowercase sweep against Node (about 20 s; CI runs it on stable). The committed sample in `testdata/unicode/` is a small subset | + +Cross-port check, from the repo root (needs `uv`, `cargo` and `go`): ```sh -pnpm --filter trackparse build && node scripts/compare-ports.mjs # must print "differences: 0" -node scripts/compare-ports.mjs --only=rust # one port against JS +pnpm --filter trackparse build && node scripts/compare-ports.mjs # four ports; must print "differences: 0" +node scripts/compare-ports.mjs --only=go # one port against JS (or python, rust) ``` Corpus check for R13 changes, when you have the private corpus (JSONL, one object per tracklist @@ -272,6 +352,7 @@ Run a single fixture case (tests are named by case id): ```sh pnpm --filter trackparse exec vitest run test/fixtures.test.ts -t "brackets-version-001" cd python && uv run pytest tests/test_fixtures.py -k "brackets-version-001" +cd go && TRACKPARSE_ONLY=brackets-version-001 go test -run TestFixtures -v ``` Before pushing, mirror CI: `pnpm lint && pnpm --filter trackparse typecheck && pnpm test && @@ -280,7 +361,10 @@ pnpm --filter trackparse compat && pnpm gen:check && pnpm --filter @trackparse/f `uv run python scripts/gen_data.py --check && uv run ruff check . && uv run ruff format --check . && uv run mypy --strict src && uv run pytest && uv build`, and in `rust/` `node scripts/gen_data.mjs --check && cargo fmt --check && -cargo clippy --all-targets --all-features -- -D warnings && cargo test && cargo test --all-features`. +cargo clippy --all-targets --all-features -- -D warnings && cargo test && cargo test --all-features`, and in `go/` +`node scripts/gen_data.mjs --check && node scripts/gen_unicode.mjs --check && test -z "$(gofmt -l .)" && +go vet ./... && go vet -tags trackparse_wire ./... && go run honnef.co/go/tools/cmd/staticcheck@2026.2.2 ./... && +go test -race ./...`. ## Fixture authoring @@ -301,7 +385,8 @@ Format and matcher: [`spec/fixtures/README.md`](spec/fixtures/README.md). Schema somewhere (a bug report, another project's tests) and respect that project's license (see [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)). - Defaults (`fn`, `options`) go in the file's `defaults`; options merge shallowly per case. -- `js/test/skip.json` is for port-specific gaps only, keyed by case id with a reason. It can only +- `js/test/skip.json` (and `python/tests/skip.json`, `rust/tests/skip.json`, + `go/testdata/skip.json`) is for port-specific gaps only, keyed by case id with a reason. It can only shrink: a skip-listed case that passes fails the run. Shared "known wrong" belongs in `xfail`. ## Documentation site and READMEs @@ -316,14 +401,14 @@ PR: |---|---| | a rule's behaviour (R1–R12) | the guide for that area (`guides/what-it-understands`, `artists`, `versions`, `junk-and-flags`, `modes`, `formatting`), the root README tables | | tracklists (R13) | `guides/tracklists`, `guides/editing-tracklists`, `reference/tracklist`, `reference/warnings` | -| a function, option, field or type | `reference/parse`, `reference/options`, `reference/functions` or `reference/tracklist`; the API sections of `js/README.md`, `python/README.md` and `rust/README.md` | +| a function, option, field or type | `reference/parse`, `reference/options`, `reference/functions` or `reference/tracklist`; the API sections of `js/README.md`, `python/README.md`, `rust/README.md` and `go/README.md`, and the Go doc comments and `go/example_test.go` | | a warning code | `reference/warnings` | | fixture counts, file counts, the size budget | `components/Stats.astro`, `index.mdx`, `start/introduction`, `project/testing`, `project/ports`, the root README "At a glance" and "How it's tested" | | a port, a command, CI or the release flow | `project/ports`, `project/contributing`, `project/testing` ("Run it yourself") | | `spec/SPEC.md` | nothing by hand: `reference/spec` is generated from it at build time | -**Every code example is trilingual.** There are no per-language pages. Each example on the site is -three synced tabs, in the order JavaScript, Python, Rust: +**Every code example is in four languages.** There are no per-language pages. Each example on the +site is four synced tabs, in the order JavaScript, Python, Rust, Go: ````mdx @@ -347,6 +432,13 @@ parse("Noisia - Stigma (2015)").year # 2015 parse("Noisia - Stigma (2015)").year; // Some(2015) ``` + + + +```go +fmt.Println(*trackparse.Parse("Noisia - Stigma (2015)").Year) // 2015 +``` + ```` @@ -360,19 +452,31 @@ parse("Noisia - Stigma (2015)").year; // Some(2015) builders (`parse_with(s, &ParseOptions::new().known_artists([…]))`), snake_case fields (`version_type`, `full_title`), `Option` and `Vec`, and results as their `Debug` output (`Junk { raw: "HD", kind: Quality }`, `Some(2015)`). +- Write the Go version in Go terms: the package name `trackparse` (import path + `github.com/4matic/trackparse/go`), exported CamelCase functions and fields (`ParseWith`, + `FormatWith`, `VersionType`, `FullTitle`), options as struct literals + (`trackparse.ParseWith(s, trackparse.ParseOptions{KnownArtists: []string{…}})`), and nullable + fields as pointers (`*t.Year`, after a `nil` check in real code). Go has no expression results, + so every output is printed: the example is a `fmt` call and the output its comment. Use + `fmt.Println` for numbers and plain values, `%q` for strings and string slices (`"Stigma"`, + `["Chase" "Status"]`), `%+v` for structs and slices of structs + (`[{Raw:HD Kind:quality}]`), and `json.Marshal` when the page is about the JSON form. Don't + print a pointer field without `*`: `%+v` writes its address. - Run every example and paste the real output; never write an output by hand. For Rust, a scratch - cargo project that depends on the crate by path (`trackparse = { path = "…/rust" }`) is enough. Language-specific + cargo project that depends on the crate by path (`trackparse = { path = "…/rust" }`) is enough. For Go, + a scratch module with `go mod edit -replace=github.com/4matic/trackparse/go=…/go` and + `GOFLAGS=-mod=mod`. Language-specific notes (typing, `to_dict()`, `TypeError`) go on the page they concern, not on a separate page. - The playground and the landing demo import `js/` directly, so they follow the code automatically; check them in a browser when the output shape changes. The playground's code panels generate - JS, Python and Rust (`code()` and `listCode()` in `Playground.astro`): when an option or an edit - changes, update all three generators and compile a generated Rust snippet. + JS, Python, Rust and Go (`code()` and `listCode()` in `Playground.astro`): when an option or an + edit changes, update all four generators and compile a generated Rust and Go snippet. **READMEs link to the site.** Each README section opens with a `**Docs:**` line that links the matching site pages (`README.md`, `js/README.md`, `python/README.md`, `rust/README.md`, -`spec/fixtures/README.md`, `spec/generator/README.md`). Add one for a new section, and fix the links -when a page or heading moves. Use full `https://4matic.github.io/trackparse/...` URLs: npm and PyPI -render the package READMEs where relative links break. +`go/README.md`, `spec/fixtures/README.md`, `spec/generator/README.md`). Add one for a new section, and fix the links +when a page or heading moves. Use full `https://4matic.github.io/trackparse/...` URLs: npm, PyPI, +crates.io and pkg.go.dev render the package READMEs where relative links break. **Moving or removing a page.** npm (`homepage`), PyPI (`[project.urls]`) and published READMEs point at site URLs that can't be changed after a release. When a page moves or disappears, add a @@ -393,39 +497,44 @@ Each of these was written wrong at least once and caught in review. Check them w | Don't write | Write instead, and why | |---|---| -| "linear time" | Hand-written scanners, no regex backtracking. The R9.2 dedup in JS and Python is quadratic on thousands of repeated `feat.` credits (Rust is near-linear). | -| "under 100 ms" for every port | True for JS (10 to 70 ms on 10,000 code points) and Rust (under 20 ms, release build). Python takes 40 to 170 ms. The suites enforce 1 s (JS, Python) and 2 s (Rust). | +| "linear time" | Hand-written scanners, no regex backtracking. The R9.2 dedup in JS and Python is quadratic on thousands of repeated `feat.` credits (Rust and Go are near-linear). | +| "under 100 ms" for every port | True for JS (10 to 70 ms on 10,000 code points) and Rust (under 20 ms, release build). Python takes 40 to 170 ms. The suites enforce 1 s (JS, Python) and 2 s (Rust). Go: 3 to 7 ms (`go test -bench Parse10k` in `go/`, on an i7-4770S, Go 1.24, with other jobs running; JS on the same inputs 4 to 18 ms), ceiling 2 s. So "at most tens of milliseconds" holds for JS, Rust and Go, not Python. A 10,000-line tracklist: Go 0.33 to 0.38 s, JS 0.8 to 0.9 s. | | "identical output for any input" | Identical on every fixture input. The Rust crate takes NFC from `unicode-normalization` (Unicode 18), Node 24 has Unicode 17, so 32 new combining marks can be ordered differently. Link `project/ports/#what-the-rust-port-taught`. | -| "zero dependencies" for the project | Zero in JS and Python. Rust has one, `unicode-normalization`. | -| a size in mixed units | Core: about 18 kB gzip. Tracklist entry: about 8.4 KiB (8,607 B), budget 9 KiB. Re-measure with `pnpm --filter trackparse build && pnpm --filter trackparse size`. | -| every suite checks "no word goes missing" | Only `rust/tests/properties.rs` has that test today. | +| "zero dependencies" for the project | Zero in JS, Python and Go (the Go tables are generated from Node, not taken from `golang.org/x/text`). Rust has one, `unicode-normalization`. | +| a size in mixed units | Core: about 18 kB gzip. Tracklist entry: about 8.4 KiB (8,606 B), budget 9 KiB. Re-measure with `pnpm --filter trackparse build && pnpm --filter trackparse size`. | +| every suite checks "no word goes missing" | Only `rust/tests/properties.rs` and `go/properties_test.go` have that test today. | | "Neuropunk" on the site | "a private corpus of real podcast tracklists". Fixture file names and `source` values keep the name; the site and READMEs don't. | Numbers that appear in many files (grep all of them when one changes): fixture counts (13,130 = 1,203 handwritten + 11,927 generated), test counts (vitest 1,352, pytest 1,342), CI matrices -(Node 22/24 + 18/20, Python 3.9 to 3.14, Rust stable + 1.74), the 27 version types, the sizes +(Node 22/24 + 18/20, Python 3.9 to 3.14, Rust stable + 1.74, Go stable + 1.22), the 27 version types, the sizes above. `spec/generator/README.md` links the site anchor `#generated-11927-cases`, which changes with the count. ### Checking examples and links - **Run every block, in every language.** A harness that extracts the fenced `js` / `python` / - `rust` blocks per file, runs them and compares each `expr // output` line takes minutes to write - and has caught every wrong output so far. JS runs against `js/dist` after a build, Python with - `uv run python`, Rust in a scratch cargo project with a path dependency (`features = ["serde"]`, - plus `serde_json`). + `rust` / `go` blocks per file, runs them and compares each `expr // output` line takes minutes to + write and has caught every wrong output so far. JS runs against `js/dist` after a build, Python + with `uv run python`, Rust in a scratch cargo project with a path dependency + (`features = ["serde"]`, plus `serde_json`), Go in a scratch module with a `replace` to `go/`. - **Rust blocks must compile as written, in page order.** A bare `value;` moves a non-`Copy` value, so a later line that uses it fails (E0382, E0507). Borrow instead: `&track.artists;`, `&list.warnings;`, `&parse(…).versions[0];`. Type listings (`pub struct …`) go in their own block, apart from runnable code. - **`rust/README.md` is compiled.** `lib.rs` includes it as crate docs, so every Rust block in it is a doc test: run `cargo test --doc --all-features` after editing it. +- **Go blocks are statements, not a program.** Wrap them in `func main()` with the imports to + run them, in page order; a variable declared with `:=` in one block is reassigned with `=` in a + later one on the same page. The pkg.go.dev examples are `Example` functions in + `go/example_test.go` with an `// Output:` block, so `go test` checks them. - **Python examples need their imports** (`from trackparse import ParsedTrack`). Functions that take a string raise `TypeError` on other input; `format_track` and `all_artists` take a `ParsedTrack` unchecked. - **Links.** Package READMEs use full `https://` URLs. Check site URLs against the built HTML (`site/dist`), ids included. `curl` gets 403 from npmjs.com and 404 from crates.io pages without `Accept: text/html`: use `registry.npmjs.org/trackparse` and `crates.io/api/v1/crates/trackparse`. + For Go, `proxy.golang.org/github.com/4matic/trackparse/go/@v/list` lists the published versions. Shields badges can lag a release by some hours. - **Renaming a heading breaks published links.** Keep the old id with an `` alias, as `reference/parse.mdx` does for `serialising-to-json` and `json-and-python-objects`. @@ -465,18 +574,28 @@ with the count. ## Known gaps (not yet fixed) -- R9.2 dedup is quadratic in JS and Python on thousands of repeated credits (Rust already fixed). -- `format(track, { feat: "nope" })` drops the featured artists in JS and Python instead of falling +- R9.2 dedup is quadratic in JS and Python on thousands of repeated credits (Rust and Go are + near-linear). +- `format(track, { feat: "nope" })` drops the featured artists in JS and Python (and in Go, which + matches JS: `FormatOptions{Feat: "nope"}`) instead of falling back to the default, unlike other bad options. Needs a spec decision and a fixture first. +- `format(track, { featMarker: null })` writes the literal marker `null` in JS, Rust and Go; + Python falls back to the input's marker (found by `scripts/fuzz-ports.mjs`). Needs a spec + decision and a fixture. +- R13.9.5: `insert` next to a bare CR can merge the new line with an empty LF line on re-read + (`"\r\r\n\n\r"`, insert after 2 gives 4 lines). All ports agree; no fixture pins it yet. - Python tracklist types have `to_dict()` but no `from_dict()`; `ParsedTrack` has both. -- JS and Python do not test invariant 6 ("no word goes missing"); only Rust does. -- The npm and PyPI publish jobs use actions by tag; the crates.io job pins its auth action by SHA. -- The playground's Rust snippet is a whole program, the JS and Python ones are bare expressions. +- JS and Python do not test invariant 6 ("no word goes missing"); only Rust and Go do. +- The npm, PyPI and crates.io publish jobs use actions by tag (only the crates.io auth action is + pinned by SHA); the Go job and `go.yml` pin every action by SHA. +- The playground's Rust and Go snippets are whole programs, the JS and Python ones are bare + expressions. -## Porting guide (Rust, others) +## Porting guide (Rust, Go, others) -A port is done when it passes every fixture and every invariant. The Python and Rust ports are done -and are good second references next to JS: their modules map one to one onto `js/src`. Checklist: +A port is done when it passes every fixture and every invariant. The Python, Rust and Go ports are +done and are good second references next to JS: their modules map one to one onto `js/src`. +Checklist: 1. **Codegen from `spec/data` and `spec/VERSION`** into a source file (like `js/scripts/gen-data.ts`), with a `--check` mode wired into CI. Expose `SPEC_VERSION`. @@ -493,11 +612,14 @@ and are good second references next to JS: their modules map one to one onto `js file against the fixture schema, each output against `parsed-track.schema.json` (or `tracklist.schema.json` for `fn: "parseTracklist"`; `applyEdits` cases also check `text`), honour `status` (pass / xfail / ambiguous), and keep a port-local skip list that can only shrink. -6. **Property tests** for the SPEC invariants (Hypothesis for Python; the Rust crate uses a small seeded generator of its own, to stay free of dev dependencies). +6. **Property tests** for the SPEC invariants (Hypothesis for Python; the Rust crate and the Go + module use a small seeded generator of their own, to stay free of dev dependencies; Go adds + `go test -fuzz` targets). 7. **API** idiomatic for the language but equivalent: Python `parse`, `parse_artists`, `format_track`, `normalize` (snake_case fields are fine only if the JSON output keeps the spec's keys); Rust with `serde` behind a feature flag and `unicode-normalization` as the only required - dependency. + dependency; Go with exported fields, option structs whose zero value is the default (a pointer + where the zero value is also a real setting), and `MarshalJSON` writing the spec's JSON. 8. **Conformance report** script and a CI workflow mirroring `js.yml`. 9. **Cross-port diff.** Extend `scripts/compare-ports.mjs` (or write the same thing) so every fixture's full output is compared with JS, not only the fields the fixture asserts. @@ -539,6 +661,52 @@ found these: - **Lone surrogates.** A Rust `str` cannot hold them; the crate's JSON reader (`json.rs`) turns an unpaired `\uD800` escape into U+FFFD. +Hazards the Go port ran into. Most were found by probing Go and the x/text sources before the +port started, the rest by compare-ports and the differential run against JS: + +- **The user's Go version picks the Unicode tables.** `unicode.IsLetter` / `IsUpper` and + `strings.ToLower` use the toolchain's Unicode (15.0 in Go 1.24), and `golang.org/x/text`'s + `norm` package ships Unicode 15 tables for Go before 1.27 and 17 from 1.27 (build tags). Two + users of the same module version would get different output. The module generates L, Lu, the + lowercase map and the NFC/NFD tables from Node instead (`scripts/gen_unicode.mjs`, + `unicode_gen.go`), so its Unicode version is the reference engine's, and it has no dependency. +- **Combining classes are ranks.** Node has no API for canonical combining classes, so + `gen_unicode.mjs` derives them from `normalize()` as ranks: normalization only compares classes + for order and equality, and ranks keep both. The real Unicode values are not in the tables. +- **`strings.ToLower` has no final-sigma rule** (`ΟΔΟΣ` gives `οδοσ`, JS `οδος`), and + **`strings.TrimSpace` is not JS `trim()`**: it strips U+0085 and keeps U+FEFF, the opposite of + JS on both. Use `jsToLower` and `jsTrim`. +- **Invalid UTF-8.** JS strings are UTF-16 and cannot hold it; Go strings can. `for range` gives + one U+FFFD per bad byte, while `TextDecoder` and Rust's `from_utf8_lossy` give one per maximal + ill-formed subpart (WHATWG). The public functions sanitize input with the WHATWG rule first + (`sanitize` in `words.go`), so Go and Rust read the same bytes as the same text. +- **`at()` returns -1, not 0.** Out-of-range lookups return `noRune` (-1), which is not a code + point and fails every class test. Returning 0 would be wrong: U+0000 is real input and must be + treated as a character. +- **Typed strings remove Rust's `RawTrack` split.** Enums are `type VersionType string` and so on, + so a version type or junk kind introduced by `Keywords` travels to the output unchanged; the + typed API needs no "unknown name" mapping. +- **Zero-value options must not hide a setting.** An option struct's zero value means the + default, so a field whose zero value is also a real JS setting is a pointer: `FeatMarker + *string` (a pointer to `""` is JS `featMarker: ""`) and `AudioSeconds *float64` (a pointer to 0 + is JS `audioSeconds: 0`), set with `trackparse.Ptr`. `ModeAuto` is `"auto"` and `""` means the + function's default (auto for a parse, tracklist for a tracklist), so both can be asked for. JS + reads an empty string as an unknown name; in Go any other unknown name says that. + `TestTypedOptionsExpressEveryFixture` (`options_test.go`) maps every fixture's JSON options to + the typed structs and requires the same output bytes as the JSON door. +- **Ordered slices for the two keyword maps.** `Keywords.VersionHeads` and `Keywords.Junk` are + slices, read in JS `Object.entries` order (integer-like keys first, ascending, then insertion + order; a repeated key keeps its first place and the last value). A Go map has no insertion order. +- **Stable sorts and no map iteration on output paths.** JS `sort` is stable, `sort.Slice` is not: + use `slices.SortStableFunc` (go.yml greps for `sort.Slice(`). Never `range` over a map where the + order can reach the output. +- **JSON bytes.** `encoding/json` escapes `<`, `>`, `&` and U+2028/U+2029 even inside a + `MarshalJSON` result, so `json.Marshal(track)` is not byte-identical to `JSON.stringify` (the + values are equal). `json.go` writes JS's bytes; `MarshalJSON` called directly, or an encoder with + `SetEscapeHTML(false)`, keeps them. +- **Rounding.** Half up is `math.Floor(v*10^d + 0.5)`. `math.Round` differs on values such as + `0.49999999999999994` and on negatives. + R13 (tracklists) notes for a new port: - **Two passes per text.** First a cheap *probe* per line: the R13.2 time scan, then R1, R2 and R4 @@ -564,7 +732,8 @@ R13 (tracklists) notes for a new port: hazard above does not apply here. - **Time ceilings.** R13.11 asks for linear time; each port's suite picks its own 10,000-line ceilings: `parseTracklist` JS 3 s, Python 15 s; `applyEdits` (shift + sort, 2,000 edits) JS 1 s, - Python 2 s / 5 s. The Rust ceilings are in `rust/tests/tracklist_properties.rs`. + Python 2 s / 5 s; Go 3 s and 1 s, ten times that under `-race` (`go/bench_test.go`). The Rust + ceilings are in `rust/tests/tracklist_properties.rs`. ## Versioning and release @@ -573,17 +742,18 @@ Releases are automated with [release-please](https://github.com/googleapis/relea 1. Feature PRs are **rebase-merged**, so every commit lands on `main` and becomes its own changelog line: each commit message must be a conventional commit, and so must the PR title (`pr-title.yml` enforces the title). Release PRs (`chore: release main`) are squash-merged. Types: `feat`, `fix`, `perf`, `revert`, `docs` (shown in the changelog) and `refactor`, - `test`, `build`, `ci`, `chore` (hidden). Scopes: `js`, `python`, `rust`, `spec`, `generator`, `fixtures`, `site`, `ci`, `deps`… + `test`, `build`, `ci`, `chore` (hidden). Scopes: `js`, `python`, `rust`, `go`, `spec`, `generator`, `fixtures`, `site`, `ci`, `deps`… 2. On every push to `main`, `release.yml` updates a **release PR** (`chore: release main`) that bumps `js/package.json`, `spec/VERSION`, `SPEC_VERSION` in `js/src/data.generated.ts`, the - Python and Rust version files (below), and writes `js/CHANGELOG.md` / `spec/CHANGELOG.md` / - `python/CHANGELOG.md` / `rust/CHANGELOG.md`. -3. **Merging the release PR** creates tags `js-vX.Y.Z`, `spec-vX.Y.Z`, `python-vX.Y.Z` and - `rust-vX.Y.Z`, GitHub Releases with the changelog as notes, then publishes `trackparse` to npm - and to PyPI via trusted publishing (OIDC, no stored token), attaches the tarball / wheel + sdist - and appends install instructions to each release. The crates.io job (`publish-crates`) runs - only when the repository variable `CRATES_PUBLISH` is `true` (see below). For a bigger release, - add `.github/release-notes/X.Y.Z.md` beforehand: it is prepended to the notes. + Python, Rust and Go version files (below), and writes `js/CHANGELOG.md` / `spec/CHANGELOG.md` / + `python/CHANGELOG.md` / `rust/CHANGELOG.md` / `go/CHANGELOG.md`. +3. **Merging the release PR** creates tags `js-vX.Y.Z`, `spec-vX.Y.Z`, `python-vX.Y.Z`, + `rust-vX.Y.Z` and `go/vX.Y.Z`, GitHub Releases with the changelog as notes, then publishes + `trackparse` to npm and to PyPI via trusted publishing (OIDC, no stored token), attaches the + tarball / wheel + sdist and appends install instructions to each release. The crates.io job + (`publish-crates`) runs only when the repository variable `CRATES_PUBLISH` is `true` (see + below). The Go module needs no upload: the tag is the release (see below). For a bigger + release, add `.github/release-notes/X.Y.Z.md` beforehand: it is prepended to the notes. Version rules: @@ -593,10 +763,11 @@ Version rules: existing fixture expectation is a behaviour change → `feat`. Adding fixtures for behaviour that already passes is not. - `python` is **linked** too: same version as `js` and `spec`. The release PR also bumps - `python/pyproject.toml`, `__version__` in `python/src/trackparse/__init__.py` and `SPEC_VERSION` - in `python/src/trackparse/_data.py`, and writes `python/CHANGELOG.md`. Merging it tags + `python/pyproject.toml`, `__version__` in `python/src/trackparse/__init__.py`, `SPEC_VERSION` + in `python/src/trackparse/_data.py` and the package's own entry in `python/uv.lock`, and writes `python/CHANGELOG.md`. Merging it tags `python-vX.Y.Z` and publishes to PyPI via trusted publishing (environment `pypi`), with the wheel - and sdist attached to the release. `spec.yml` checks that all four versions match. + and sdist attached to the release. `spec.yml` checks that all five versions match (js, spec, + python, rust, go). - `rust` is **linked** as well: a release-please component (`release-type: rust`) in the same `linked-versions` group. The release PR bumps `rust/Cargo.toml` (the line marked `x-release-please-version`) and `SPEC_VERSION` in `rust/src/data.rs`, and writes @@ -610,21 +781,46 @@ Version rules: 0.4.0 was published by hand, because crates.io can only configure trusted publishing for a crate that already exists. With the variable off, a release still tags `rust-vX.Y.Z` but skips the job. +- `go` is **linked** as well: a release-please component (`release-type: go`, which bumps no + version file of its own) in the same `linked-versions` group. The release PR bumps `SpecVersion` + in `go/data_gen.go` (the line marked `x-release-please-version`, which + `go/scripts/gen_data.mjs` writes, so `--check` stays clean after the bump) and writes + `go/CHANGELOG.md`. The component sets `"tag-separator": "/"`, so its tag is `go/vX.Y.Z` and its + GitHub Release is named `go: vX.Y.Z`. The go command only finds a module in the `go/` + subdirectory under tags with exactly that prefix: `go-v0.6.0` would be ignored. The release + workflow outputs keep the path as their key (`go--release_created`, `go--tag_name`, + `go--version`). +- **Go publishing is the tag.** There is no registry upload and no token: the module proxy + (`proxy.golang.org`) fetches `go/vX.Y.Z` on the first request, and the checksum database + (`sum.golang.org`) records its hash. The `publish-go` job in `release.yml` (environment `go`) + checks out the tag, checks that `SpecVersion`, `spec/VERSION` and the tag agree and that + `gen_data.mjs --check` passes, runs `go vet` and `go test`, makes that first request with + retries (`GOPROXY=https://proxy.golang.org go list -m github.com/4matic/trackparse/go@vX.Y.Z`), + runs `go get` and a small program from a clean module, requests the version's `.info` from the + proxy (pkg.go.dev adds versions it sees there; the page can take a few minutes), and appends + install notes to the GitHub Release. **A published Go version is permanent**: the proxy and the + checksum database keep the tag's content forever, even if the tag is deleted or moved. Never + move or re-create a `go/v…` tag. A bad version can only be marked with a `retract` directive in + `go/go.mod`, released in a new version. - **A publish job failed after the tags were created?** Fix the cause on `main` with a hidden commit type (`ci`/`chore`, so no new release), then re-run publishing for the existing tag: `gh workflow run release.yml -f python_tag=python-vX.Y.Z` (PyPI) or - `-f rust_tag=rust-vX.Y.Z` (crates.io). The npm job always republishes from a fresh release; a + `-f rust_tag=rust-vX.Y.Z` (crates.io) or `-f go_tag=go/vX.Y.Z` (the Go checks, proxy request + and release notes; the module itself was published by the tag). The npm job always republishes from a fresh release; a failed npm publish needs the same treatment by hand. - **Things the 0.5.0 release taught:** - The release PR is opened with `GITHUB_TOKEN`, so no CI runs on it and GitHub shows it as `UNSTABLE`. That is expected; `main` was green when it was generated. - - A `docs:` commit under `js/`, `python/` or `rust/` (a package README) opens a release PR. A + - A `docs:` commit under `js/`, `python/`, `rust/` or `go/` (a package README) opens a release PR. A commit that touches only the root README, `AGENTS.md`, `site/` or `.github/` does not. - A component's first changelog lists every commit that ever touched its folder, because there is no earlier tag to start from. - crates.io refuses to publish until the account has a verified email address. - - After a release, check all three registries by API, not by badge: `registry.npmjs.org`, - `pypi.org/pypi/trackparse/json`, `crates.io/api/v1/crates/trackparse`. + - After a release, check every registry by API, not by badge: `registry.npmjs.org`, + `pypi.org/pypi/trackparse/json`, `crates.io/api/v1/crates/trackparse`, and the Go proxy: + `proxy.golang.org/github.com/4matic/trackparse/go/@v/list`. + - The Go component's first changelog links `go/v0.5.1...go/vX.Y.Z`, a tag that never existed + (the manifest starts Go at the linked 0.5.1), as rust's first entry linked `rust-v0.4.0`. - Don't force-push a PR branch to pick up `main`: GitHub's rebase-merge rebases it when there are no conflicts. - **Agents never merge release PRs, publish, push tags or bump versions on their own initiative.** @@ -641,9 +837,16 @@ Version rules: - Rust: rustfmt (100 columns), clippy with `-D warnings`, MSRV 1.74, `unicode-normalization` as the only required dependency, no `unsafe`. `unwrap`, `expect`, `panic!` and indexing are denied in `src/` (R0.8): use `get`, iterators and `Option`. -- Public types in `js/src/types.ts`, `python/src/trackparse/types.py` and `rust/src/types.rs` - mirror the schemas; change them together. -- No `throw` on any input path. Bad options fall back to defaults. +- Go: `gofmt`, `go vet` and staticcheck clean, `go 1.22` in `go.mod`, no `require` lines (no + dependencies), no `unsafe`, no cgo. Sorts are stable (`slices.SortStableFunc`, never + `sort.Slice`); no `range` over a map on a path that reaches the output. No `recover()` in the + library: a panic is a bug to fix, found by fuzzing and the differential run, not hidden. No + `init()` except `wire_hook.go`, which only `-tags trackparse_wire` builds. Go has + no lint against indexing, so look up code points with `at()` (it returns -1 out of range). + Every exported identifier has a doc comment; examples are `Example` functions with `// Output:`. +- Public types in `js/src/types.ts`, `python/src/trackparse/types.py`, `rust/src/types.rs` and + `go/types.go` mirror the schemas; change them together. +- No `throw` (or panic) on any input path. Bad options fall back to defaults. ## Definition of done @@ -656,10 +859,13 @@ Version rules: 100%; `python/tests/skip.json` did not grow - [ ] Rust: `gen_data.mjs --check`, `cargo fmt --check`, clippy and `cargo test` pass; the `TRACKPARSE_REPORT=1` report is 100%; `rust/tests/skip.json` did not grow -- [ ] `node scripts/compare-ports.mjs` reports 0 differences (all three ports) +- [ ] Go: `gen_data.mjs --check`, `gen_unicode.mjs --check`, `gofmt -l` empty, `go vet`, staticcheck + and `go test -race ./...` pass; the `TRACKPARSE_REPORT=1` report is 100%; + `go/testdata/skip.json` did not grow +- [ ] `node scripts/compare-ports.mjs` reports 0 differences (all four ports) - [ ] `pnpm --filter trackparse size` and `check:package` pass - [ ] R13 changes: `node scripts/corpus-check.mjs` passes when you have the corpus - [ ] Conventional commits and PR title; `feat` if any fixture expectation changed - [ ] Site pages (`site/src/content/docs`) and READMEs updated in the same PR, examples in - JavaScript, Python and Rust tabs with real output, `**Docs:**` links still pointing at existing + JavaScript, Python, Rust and Go tabs with real output, `**Docs:**` links still pointing at existing pages, `pnpm docs:build` passes diff --git a/README.md b/README.md index 7391078..8bfead6 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,12 @@ [![PyPI](https://img.shields.io/pypi/v/trackparse?color=3775a9&logo=pypi&logoColor=white)](https://pypi.org/project/trackparse/) [![crates.io](https://img.shields.io/crates/v/trackparse?color=e6822a&logo=rust&logoColor=white)](https://crates.io/crates/trackparse) [![docs.rs](https://img.shields.io/docsrs/trackparse?logo=docsdotrs&logoColor=white)](https://docs.rs/trackparse) +[![Go Reference](https://pkg.go.dev/badge/github.com/4matic/trackparse/go.svg)](https://pkg.go.dev/github.com/4matic/trackparse/go)
[![js](https://img.shields.io/github/actions/workflow/status/4matic/trackparse/js.yml?branch=main&label=js&logo=github)](https://github.com/4matic/trackparse/actions/workflows/js.yml) [![python](https://img.shields.io/github/actions/workflow/status/4matic/trackparse/python.yml?branch=main&label=python&logo=github)](https://github.com/4matic/trackparse/actions/workflows/python.yml) [![rust](https://img.shields.io/github/actions/workflow/status/4matic/trackparse/rust.yml?branch=main&label=rust&logo=github)](https://github.com/4matic/trackparse/actions/workflows/rust.yml) +[![go](https://img.shields.io/github/actions/workflow/status/4matic/trackparse/go.yml?branch=main&label=go&logo=github)](https://github.com/4matic/trackparse/actions/workflows/go.yml) [![spec](https://img.shields.io/github/actions/workflow/status/4matic/trackparse/spec.yml?branch=main&label=spec&logo=github)](https://github.com/4matic/trackparse/actions/workflows/spec.yml)
[![fixtures](https://img.shields.io/badge/fixtures-13%2C130%20passing-2ea44f)](#how-its-tested) @@ -38,11 +40,11 @@ that Becky Hill is featured, that Sub Focus did the remix, or that it's a VIP. trackparse keeps all of it. Its one rule is **extract, don't delete**: everything it recognizes goes into a field, and anything it doesn't recognize stays in the title, word for word. -It comes as an npm package, a PyPI package and a Rust crate, all named `trackparse`. One -[spec](spec/SPEC.md) and one set of fixtures define the behaviour. The three pass the same fixtures -and give the same output on every fixture input. The example below is JavaScript; [Quick start](#quick-start) has the -same calls in Python and Rust, and you can try any string in the -[playground](https://4matic.github.io/trackparse/playground/). +It comes as an npm package, a PyPI package, a Rust crate and a Go module, all named `trackparse`. +One [spec](spec/SPEC.md) and one set of fixtures define the behaviour. The four pass the same +fixtures and give the same output on every fixture input. The example below is JavaScript; +[Quick start](#quick-start) has the same calls in Python, Rust and Go, and you can try any string in +the [playground](https://4matic.github.io/trackparse/playground/). ```js import { parse } from "trackparse"; @@ -97,7 +99,7 @@ track.position; // { raw: '01', number: 1 } ``` Every key is always present. When a guess was involved, `warnings` says which one. Python's -`to_dict()` and Rust's `to_json()` give this same JSON. +`to_dict()`, Rust's `to_json()` and Go's `MarshalJSON` give this same JSON. @@ -107,16 +109,17 @@ Every key is always present. When a guess was involved, `warnings` says which on | Number | What it means | |---|---| -| **13,130** shared fixtures | 1,203 written by hand, 11,927 generated from combinations. 100% pass in JS, Python and Rust, nothing skipped. | +| **13,130** shared fixtures | 1,203 written by hand, 11,927 generated from combinations. 100% pass in JS, Python, Rust and Go, nothing skipped. | | **1,239** of them on tracklists | 303 handwritten, 936 generated. They cover line splitting, times, bullets and Markdown, warnings and edits | | **1,352** JS tests | Every fixture, a schema check on every output, property-based tests of the spec invariants, API tests | | **27** version types | Remix, VIP, bootleg, extended, radio, original, live, remaster, sped up and more | -| **0** dependencies in JS and Python | The Rust crate has one, `unicode-normalization`. The JS package is ESM + CJS with TypeScript types, about 18 kB gzipped. `trackparse/tracklist` adds about 8.4 KiB, only if you import it | +| **0** dependencies in JS, Python and Go | The Rust crate has one, `unicode-normalization`. The JS package is ESM + CJS with TypeScript types, about 18 kB gzipped. `trackparse/tracklist` adds about 8.4 KiB, only if you import it | | **Node 18+** | CI runs the full suite on 22 and 24, and every fixture against the built package on 18 and 20 | | **Python 3.9+** | 1,342 pytest tests on 3.9 to 3.14, plus every fixture against the built wheel. Output is byte-identical to JS | | **Rust 1.74+** | Every fixture, the tracklist invariants and the typed API tests on stable and on 1.74. Output is byte-identical to JS on every fixture and on about 790,000 random inputs | +| **Go 1.22+** | Every fixture, the spec invariants and the examples with `go test -race` on 1.22 and on the latest stable. Output is byte-identical to JS on every fixture and on about 790,000 random inputs | | **5,031** real tracklist lines | 117 podcast tracklists the tracklist rules were checked against. Every line round-trips byte for byte | -| **1** spec | [`spec/SPEC.md`](spec/SPEC.md) defines the behaviour. The three packages share its version (0.5.0 today) and are released together | +| **1** spec | [`spec/SPEC.md`](spec/SPEC.md) defines the behaviour. The packages share its version and are released together; the Go module's first release is 0.6.0 | ## Install @@ -143,11 +146,19 @@ Rust ([crates.io](https://crates.io/crates/trackparse), [docs.rs](https://docs.r cargo add trackparse # add --features serde for Serialize / Deserialize on the types ``` +Go ([pkg.go.dev](https://pkg.go.dev/github.com/4matic/trackparse/go), +[module README](go/README.md)). Go 1.22+, no dependencies. The import path ends in `/go`, the +package is `trackparse`. + +```sh +go get github.com/4matic/trackparse/go@latest +``` + ## Quick start **Docs:** [Getting started](https://4matic.github.io/trackparse/start/getting-started/) · [Introduction](https://4matic.github.io/trackparse/start/introduction/) -The three examples parse the same strings. The comments show what each expression evaluates to. +The four examples parse the same strings. The comments show what each expression evaluates to. ### JavaScript @@ -234,14 +245,65 @@ Options are builders passed to the `_with` form of a function: `parse_with(s, &ParseOptions::new().known_artists(["Chase & Status"]))`. The full Rust API is in [`rust/README.md`](rust/README.md) and on [docs.rs](https://docs.rs/trackparse). +### Go + +Results are structs with exported fields; fields that can be `null` are pointers. Roles, version +types and junk kinds are typed strings with constants (`trackparse.RoleFeatured`). `json.Marshal` +gives the spec's JSON, with `&`, `<` and `>` escaped as `&`, `<` and `>`: the same +values in different bytes. For the exact bytes of `JSON.stringify`, call `MarshalJSON` directly. + +```go +import ( + "encoding/json" + "fmt" + + trackparse "github.com/4matic/trackparse/go" +) + +track := trackparse.Parse("Noisia feat. Foreign Beggars - Shellshock") +for _, a := range track.Artists { + fmt.Println(a.Name, a.Role) +} +// Noisia primary +// Foreign Beggars featured + +v := trackparse.Parse("Queen - Bohemian Rhapsody (Live at Wembley 1986)").Versions[0] +fmt.Println(v.Type, v.Raw, *v.Descriptor, *v.Year) +// live Live at Wembley 1986 at Wembley 1986 + +var credits []string +for _, a := range trackparse.ParseArtists("Sub Focus, Wilkinson & Dimension feat. Kojo") { + credits = append(credits, fmt.Sprintf("%s:%s", a.Name, a.Role)) +} +fmt.Println(credits) +// [Sub Focus:primary Wilkinson:primary Dimension:primary Kojo:featured] + +fmt.Println(trackparse.FormatWith( + trackparse.Parse("Wilkinson ft. Becky Hill - Afterglow (Sub Focus Remix)"), + trackparse.FormatOptions{Feat: trackparse.FeatTitle, Joiners: trackparse.JoinersCanonical}, +)) +// Wilkinson - Afterglow (feat. Becky Hill) (Sub Focus Remix) + +b, _ := json.Marshal(track.Artists[1]) +fmt.Println(string(b)) +// {"name":"Foreign Beggars","role":"featured","joiner":"feat.","source":"artist"} +``` + +Options are plain structs whose zero value is the default (a field that must be told apart +from its zero value is a pointer, set with `trackparse.Ptr`), passed to the `With` form of a +function: `trackparse.ParseWith(s, trackparse.ParseOptions{KnownArtists: []string{"Chase & Status"}})`. +The full Go API is in [`go/README.md`](go/README.md) and on +[pkg.go.dev](https://pkg.go.dev/github.com/4matic/trackparse/go). + Every example on the [documentation site](https://4matic.github.io/trackparse/) has JavaScript, -Python and Rust tabs. +Python, Rust and Go tabs. > [!TIP] > `&` is a joiner, so `Chase & Status` comes out as two artists. There's no built-in artist > database. Pass the names you know instead: `parse(s, { knownArtists: ["Chase & Status"] })` in > JS, `parse(s, known_artists=["Chase & Status"])` in Python, -> `parse_with(s, &ParseOptions::new().known_artists(["Chase & Status"]))` in Rust. +> `parse_with(s, &ParseOptions::new().known_artists(["Chase & Status"]))` in Rust, +> `ParseWith(s, ParseOptions{KnownArtists: []string{"Chase & Status"}})` in Go. > See [knownArtists](https://4matic.github.io/trackparse/guides/artists/#knownartists). ## What it understands @@ -249,7 +311,7 @@ Python and Rust tabs. **Docs:** [What it understands](https://4matic.github.io/trackparse/guides/what-it-understands/) · [Artists and credits](https://4matic.github.io/trackparse/guides/artists/) · [Versions and remixes](https://4matic.github.io/trackparse/guides/versions/) · [Junk, flags and prefixes](https://4matic.github.io/trackparse/guides/junk-and-flags/) These are real outputs of `parse(input)` with default options, unless noted. They are the same in -all three languages. To try your own strings, use the +all four languages. To try your own strings, use the [playground](https://4matic.github.io/trackparse/playground/). | Input | Artists | Title | Versions / other | @@ -289,7 +351,8 @@ all three languages. To try your own strings, use the Mixes and podcasts come with a tracklist: a block of text, one track per line, usually with a start time in front. The tracklist module reads the whole block: `trackparse/tracklist` in JavaScript, -`trackparse.tracklist` in Python, `trackparse::tracklist` in Rust. Each line gets its kind, its time +`trackparse.tracklist` in Python, `trackparse::tracklist` in Rust, and `ParseTracklist` in the +main Go package. Each line gets its kind, its time and a full `ParsedTrack`. The list as a whole gets checks with line numbers, and edits rewrite only the lines you name. @@ -368,7 +431,7 @@ hour, so it became `01:00:16` to match the list's other hour times, and the edit (missing line, line without a time, `NaN`) changes nothing and warns `edit-invalid`. Neither function throws. -Python and Rust have the same two functions. Here `text` is the tracklist from the JavaScript +Python, Rust and Go have the same two functions. Here `text` is the tracklist from the JavaScript example. In Python an edit is a plain dict with the same keys as in JS: ```python @@ -398,6 +461,21 @@ result.changed; // [5, 6, 7, 8, 9] result.warnings; // [EditWarning { code: StyleUpgraded, edit: 1, line: Some(5) }] ``` +In Go an edit is an `Edit` value built by a constructor, and seconds are `float64`: + +```go +fmt.Println(*trackparse.ParseTracklist(text).Warnings[1].Suggestion) +// {8 01:11:02 4262} + +result := trackparse.ApplyEdits(text, []trackparse.Edit{ + trackparse.SetTime(8, 4262), + trackparse.ShiftFrom(45, 5), +}) +fmt.Println(result.Changed) // [5 6 7 8 9] +w := result.Warnings[0] +fmt.Println(w.Code, w.Edit, *w.Line) // style-upgraded 1 5 +``` + Lists pasted from Discord, Reddit, Telegram or YouTube comments often keep their list bullets and Markdown. `* 14:21 Artist - Title`, `**[**14:21**] 10. Artist - Title**` and `[14:21] **Artist** - _Title_` all read like the plain line; the decoration stays in `raw` and @@ -415,7 +493,7 @@ Inside a tracklist the first ` - ` is the artist/title separator on practically track string doesn't get that benefit of the doubt, so `parse()` sometimes reads the part after the dash as a version or a genre. `parseTracklist` parses each line with `mode: "tracklist"`, which trusts the first spaced dash. You can ask `parse()` for it too (`mode="tracklist"` in Python, -`ModeOption::Tracklist` in Rust). These are real lines from a podcast archive: +`ModeOption::Tracklist` in Rust, `ModeTracklist` in Go). These are real lines from a podcast archive: | Line | `parse(line)` | In a tracklist | |---|---|---| @@ -438,14 +516,16 @@ of the list uses spaced dashes. The fixtures in [`spec/fixtures`](spec/fixtures) are the source of truth ([format and matching rules](spec/fixtures/README.md)). The spec says what should happen, the -fixtures pin it down, and every port has to pass all of them. The JS and Python packages and the -Rust crate all do: **13,130 of 13,130**, with empty skip lists, in CI on every push. +fixtures pin it down, and every port has to pass all of them. The JS and Python packages, the +Rust crate and the Go module all do: **13,130 of 13,130**, with empty skip lists, in CI on every +push. Passing a fixture only checks the fields the case asserts, so [`scripts/compare-ports.mjs`](scripts/compare-ports.mjs) also runs every fixture input through all -three ports and diffs the complete outputs, tracklists and edits included. Result: 0 differences, -byte for byte. The Rust crate was also compared with JS on about 500,000 random single-track cases -and 290,000 random tracklists with edits: 0 differences. +four ports and diffs the complete outputs, tracklists and edits included. Result: 0 differences, +byte for byte. [`scripts/fuzz-ports.mjs`](scripts/fuzz-ports.mjs) does the same with random input. +The Rust crate and the Go module were each compared with JS on about 500,000 random single-track +cases and 290,000 random tracklists with edits: 0 differences. ### Handwritten: 1,203 cases in 27 files @@ -495,16 +575,17 @@ line; the expected tracks are the plain lines' tracks. Each port also checks the invariants from the spec on thousands of random strings. The JS suite uses [fast-check](https://github.com/dubzzz/fast-check), the Python suite -[Hypothesis](https://hypothesis.works), and the Rust crate a small seeded generator of its own, so -it needs no extra dev dependency. The invariants: +[Hypothesis](https://hypothesis.works), and the Rust crate and the Go module small seeded +generators of their own, so they need no extra dev dependency. The Go module also has fuzz +targets for `go test -fuzz`. The invariants: - it never throws or panics, on any input; - 10,000-code-point inputs built from repeated blocks finish inside a time limit (one second in the - JS and Python suites), which catches anything that blows up on long input; + JS and Python suites, two in Rust and Go), which catches anything that blows up on long input; - `normalize` is idempotent; - whitespace, dash and zero-width noise don't change the result; - every output validates against the schema; -- no word of the input goes missing (the Rust suite); +- no word of the input goes missing (the Rust and Go suites); - `parse(format(parse(s)))` round-trips. For tracklists, on random multi-line text and random edit lists: @@ -512,7 +593,7 @@ For tracklists, on random multi-line text and random edit lists: - `raw + eol` over all entries gives the input back, and `lead + time + gap + rest` gives `raw`; - `applyEdits(t, [])` returns `t`, and an edit never touches a line it doesn't name; - `shift(+s)` then `shift(-s)` restores the text when nothing was clamped or upgraded; -- 10,000 lines parse inside each suite's ceiling (3 s in JS); +- 10,000 lines parse inside each suite's ceiling (3 s in JS and Go); - a one-line list gives the same track as `parse()` in tracklist mode on its text without Markdown emphasis or a leading `w/`; - Markdown emphasis around a time or a track line gives the same kind, time and track as the plain @@ -545,9 +626,11 @@ pnpm conformance # pass rate per fixture file and per spec rule (cd python && uv run pytest) # the same fixtures and invariants in Python (cd rust && cargo test) # and in Rust +(cd go && go test ./...) # and in Go pnpm --filter trackparse build -node scripts/compare-ports.mjs # all three ports on every fixture; must print "differences: 0" +node scripts/compare-ports.mjs # all four ports on every fixture; must print "differences: 0" +node scripts/fuzz-ports.mjs # the same diff on random tracks and tracklists with edits node scripts/corpus-check.mjs spec/corpus/.jsonl # only if you have the corpus ``` @@ -557,26 +640,30 @@ Every other command is in [AGENTS.md](AGENTS.md#commands). **Docs:** [parse and ParsedTrack](https://4matic.github.io/trackparse/reference/parse/) · [Options](https://4matic.github.io/trackparse/reference/options/) · [Other functions](https://4matic.github.io/trackparse/reference/functions/) · [Tracklist API](https://4matic.github.io/trackparse/reference/tracklist/) · [Warnings](https://4matic.github.io/trackparse/reference/warnings/) -The three packages have the same functions: +The four packages have the same functions: -| JavaScript | Python | Rust | -|---|---|---| -| `parse(input, options?)` | `parse(input, **options)` | `parse(input)`, `parse_with(input, &options)` | -| `parseArtists(input, options?)` | `parse_artists(input, **options)` | `parse_artists(input)`, `parse_artists_with(input, &options)` | -| `format(track, options?)` | `format_track(track, **options)` | `format_track(&track)`, `format_track_with(&track, &options)` | -| `normalize(input)` | `normalize(input)` | `normalize(input)` | -| `allArtists(track)` | `all_artists(track)` | `all_artists(&track)` | -| `createParser(options)` | `create_parser(**options)` | `Parser::new(&options)` | -| `SPEC_VERSION` | `SPEC_VERSION` | `SPEC_VERSION` | -| `parseTracklist`, `applyEdits` from `trackparse/tracklist` | `parse_tracklist`, `apply_edits` from `trackparse.tracklist` | `parse_tracklist(_with)`, `apply_edits(_with)` from `trackparse::tracklist` | +| JavaScript | Python | Rust | Go | +|---|---|---|---| +| `parse(input, options?)` | `parse(input, **options)` | `parse(input)`, `parse_with(input, &options)` | `Parse(input)`, `ParseWith(input, options)` | +| `parseArtists(input, options?)` | `parse_artists(input, **options)` | `parse_artists(input)`, `parse_artists_with(input, &options)` | `ParseArtists(input)`, `ParseArtistsWith(input, options)` | +| `format(track, options?)` | `format_track(track, **options)` | `format_track(&track)`, `format_track_with(&track, &options)` | `Format(track)`, `FormatWith(track, options)` | +| `normalize(input)` | `normalize(input)` | `normalize(input)` | `Normalize(input)` | +| `allArtists(track)` | `all_artists(track)` | `all_artists(&track)` | `AllArtists(track)` | +| `createParser(options)` | `create_parser(**options)` | `Parser::new(&options)` | `NewParser(options)` | +| `SPEC_VERSION` | `SPEC_VERSION` | `SPEC_VERSION` | `SpecVersion` | +| `parseTracklist`, `applyEdits` from `trackparse/tracklist` | `parse_tracklist`, `apply_edits` from `trackparse.tracklist` | `parse_tracklist(_with)`, `apply_edits(_with)` from `trackparse::tracklist` | `ParseTracklist(With)`, `ApplyEdits(With)` in the same package | The tables below use the JavaScript names, which are also the keys of the JSON output. In Python and Rust, options and fields are snake_case (`knownArtists` is `known_artists`, `fullTitle` is `full_title`). Python results are frozen dataclasses with tuples and `None`. Rust results are structs with `Vec` and `Option`, the fixed sets of names are enums (`VersionType::Remix`, -`JunkKind::Video`), and `Version.type` is the field `version_type`. Each package README lists its -own signatures and types: [JavaScript](js/README.md#api), [Python](python/README.md#api), -[Rust](rust/README.md#api). The Rust items are also on [docs.rs](https://docs.rs/trackparse). +`JunkKind::Video`), and `Version.type` is the field `version_type`. Go results are structs with +exported CamelCase fields (`FullTitle`, `Version.Type`), pointers where the JSON has `null`, and +typed string constants for the fixed sets (`trackparse.VersionTypeRemix`). Each package README +lists its own signatures and types: [JavaScript](js/README.md#api), [Python](python/README.md#api), +[Rust](rust/README.md#api), [Go](go/README.md#api). The Rust items are also on +[docs.rs](https://docs.rs/trackparse), the Go ones on +[pkg.go.dev](https://pkg.go.dev/github.com/4matic/trackparse/go). No function throws or panics on any string, and bad options fall back to the defaults. The one exception is Python, which raises `TypeError` when the input is not a `str`. @@ -644,8 +731,10 @@ The JSON shape is fixed by [`spec/schema/parsed-track.schema.json`](spec/schema/ | `keywords` | – | Extra vocabulary: `versionHeads`, `descriptors`, `genres`, `junk`, `featMarkers` | JavaScript takes an options object, Python takes keyword arguments -(`parse(s, mode="youtube", uploader="Daft Punk")`), and Rust takes a builder -(`parse_with(s, &ParseOptions::new().mode(ModeOption::Youtube).uploader("Daft Punk"))`). +(`parse(s, mode="youtube", uploader="Daft Punk")`), Rust takes a builder +(`parse_with(s, &ParseOptions::new().mode(ModeOption::Youtube).uploader("Daft Punk"))`), and Go +takes a struct whose zero value is the default +(`ParseWith(s, ParseOptions{Mode: ModeYouTube, Uploader: "Daft Punk"})`). ### Other functions @@ -693,6 +782,17 @@ let parser = Parser::new( parser.parse("Chase & Status x Camo & Krooked - Track (Alix Perez Rerub)").versions[0].version_type; // Rework ``` +```go +parser := trackparse.NewParser(trackparse.ParseOptions{ + KnownArtists: []string{"Chase & Status", "Camo & Krooked"}, + Keywords: trackparse.Keywords{ + VersionHeads: []trackparse.VersionHead{{Key: "rerub", Type: trackparse.VersionTypeRework}}, + }, +}) + +fmt.Println(parser.Parse("Chase & Status x Camo & Krooked - Track (Alix Perez Rerub)").Versions[0].Type) // rework +``` + ### Modes **Docs:** [Modes](https://4matic.github.io/trackparse/guides/modes/) @@ -709,7 +809,8 @@ parser.parse("Chase & Status x Camo & Krooked - Track (Alix Perez Rerub)").versi **Docs:** [Tracklist API](https://4matic.github.io/trackparse/reference/tracklist/) · [Warnings](https://4matic.github.io/trackparse/reference/warnings/) · [Editing tracklists](https://4matic.github.io/trackparse/guides/editing-tracklists/) -Import from `trackparse/tracklist` (Python: `trackparse.tracklist`, Rust: `trackparse::tracklist`). +Import from `trackparse/tracklist` (Python: `trackparse.tracklist`, Rust: `trackparse::tracklist`, +Go: the main package). In JavaScript it's a separate entry, so code that only parses single tracks never loads it. The JSON shape is fixed by [`spec/schema/tracklist.schema.json`](spec/schema/tracklist.schema.json). @@ -800,6 +901,14 @@ constructors on `Edit`: `set_time(line, seconds)`, `shift(seconds)`, `shift_from `shift_lines(seconds, lines)`, `sort_by_time()`, `set_rest(line, rest)`, `insert(after, text)` and `delete(line)`. +Go has `ParseTracklistWith` and `ApplyEditsWith`, which take +`TracklistOptions{AudioSeconds: trackparse.Ptr(3600.0), MarkerWords: []string{"drop"}}`. Edits +are built with `SetTime(line, seconds)`, `Shift(seconds)`, `ShiftFrom(seconds, from)`, +`ShiftLines(seconds, lines...)`, `SortByTime()`, `SetRest(line, rest)`, `Insert(after, text)` and +`Delete(line)`. `AudioSeconds` is a pointer, so `nil` (unknown) and an audio of length 0 are +different values, and `Mode: trackparse.ModeAuto` parses each line in auto mode +([details](go/README.md#pointer-fields-and-ptr)). + More on the options: [Tracklist options](https://4matic.github.io/trackparse/reference/options/#tracklist-options). ## How it works @@ -809,7 +918,7 @@ More on the options: [Tracklist options](https://4matic.github.io/trackparse/ref The parser is a fixed pipeline of hand-written scanners over code points. It uses no regexes with lookaround or backreferences and nothing backtracks, so long input can't make it hang: each port's tests parse 10,000-code-point inputs under a time limit. Writing it this way is also what lets the -Python and Rust ports give the same output as JavaScript. +Python, Rust and Go ports give the same output as JavaScript. ```mermaid flowchart LR @@ -844,19 +953,24 @@ spaced dashes. The checks run last, over the finished entries. | JavaScript / TypeScript | [`trackparse`](https://www.npmjs.com/package/trackparse) on npm | Node 18+ or any ES2020 runtime, no dependencies | [js/README.md](js/README.md) | [js/CHANGELOG.md](js/CHANGELOG.md) | | Python | [`trackparse`](https://pypi.org/project/trackparse/) on PyPI | Python 3.9+, no dependencies | [python/README.md](python/README.md) | [python/CHANGELOG.md](python/CHANGELOG.md) | | Rust | [`trackparse`](https://crates.io/crates/trackparse) on crates.io ([docs.rs](https://docs.rs/trackparse)) | Rust 1.74+, `unicode-normalization`, optional `serde` feature | [rust/README.md](rust/README.md) | [rust/CHANGELOG.md](rust/CHANGELOG.md) | +| Go | [`github.com/4matic/trackparse/go`](https://pkg.go.dev/github.com/4matic/trackparse/go) on pkg.go.dev | Go 1.22+, no dependencies | [go/README.md](go/README.md) | [go/CHANGELOG.md](go/CHANGELOG.md) | -The JavaScript package is the reference implementation. All three pass 13,130 of 13,130 fixtures, -and the Python and Rust output is byte-identical to JavaScript on every fixture input. +The JavaScript package is the reference implementation. All four pass 13,130 of 13,130 fixtures, +and the Python, Rust and Go output is byte-identical to JavaScript on every fixture input. Go +releases are the tags `go/vX.Y.Z`, which the Go module proxy serves. -The spec and the three packages share one version number and are released together, so the same +The spec and the packages share one version number and are released together, so the same version means the same spec and the same fixtures in every language. The one known difference outside the fixtures is a -[Unicode version note](https://4matic.github.io/trackparse/project/ports/#what-the-rust-port-taught) for the Rust crate. Changes to the rules and the fixtures are in -[spec/CHANGELOG.md](spec/CHANGELOG.md). +[Unicode version note](https://4matic.github.io/trackparse/project/ports/#what-the-rust-port-taught) +for the Rust crate. The Go module generates its Unicode tables from Node, so it doesn't have that +difference ([what the Go port taught](https://4matic.github.io/trackparse/project/ports/#what-the-go-port-taught)). +Changes to the rules and the fixtures are in [spec/CHANGELOG.md](spec/CHANGELOG.md). -Want another language? The porting checklist is in -[AGENTS.md](AGENTS.md#porting-guide-rust-others), along with the problems the Python and Rust ports -ran into. +Want another language? Start with +[Adding a language](https://4matic.github.io/trackparse/project/ports/#adding-a-language). The +full porting checklist is in [AGENTS.md](AGENTS.md#porting-guide-rust-go-others), along with the +problems the earlier ports ran into. ## Compared to other libraries @@ -893,7 +1007,7 @@ Not there yet: doesn't yet learn names from its other lines. - Warnings for gaps or overlaps between consecutive tracklist times. -These limits are the same in all three packages, since they come from the spec. To see what the +These limits are the same in all four packages, since they come from the spec. To see what the parser does with a string today, paste it into the [playground](https://4matic.github.io/trackparse/playground/). @@ -905,14 +1019,14 @@ The most useful bug report is an input string plus the output you expected, file [issue](https://github.com/4matic/trackparse/issues). It usually becomes a fixture as is. Behaviour changes start in the spec: a rule in [SPEC.md](spec/SPEC.md), a fixture that pins it -([fixture format](spec/fixtures/README.md)), then the code in all three ports (`js/`, `python/`, -`rust/`). A change is done when every port passes every fixture and +([fixture format](spec/fixtures/README.md)), then the code in all four ports (`js/`, `python/`, +`rust/`, `go/`). A change is done when every port passes every fixture and `node scripts/compare-ports.mjs` prints `differences: 0`. [AGENTS.md](AGENTS.md) has the repo map, the workflow and every command. The documentation site lives in [`site/`](site) (Astro + Starlight, `pnpm docs` to run it locally) -and deploys to GitHub Pages on every push to `main`. Its examples have JavaScript, Python and Rust -tabs, and a change to behaviour updates them in the same pull request. +and deploys to GitHub Pages on every push to `main`. Its examples have JavaScript, Python, Rust and +Go tabs, and a change to behaviour updates them in the same pull request. ## License diff --git a/go/README.md b/go/README.md new file mode 100644 index 0000000..e0cfe13 --- /dev/null +++ b/go/README.md @@ -0,0 +1,792 @@ +# trackparse + +[![Go Reference](https://pkg.go.dev/badge/github.com/4matic/trackparse/go.svg)](https://pkg.go.dev/github.com/4matic/trackparse/go) +[![Go version](https://img.shields.io/github/go-mod/go-version/4matic/trackparse?filename=go%2Fgo.mod&logo=go&logoColor=white)](https://github.com/4matic/trackparse/blob/main/go/go.mod) +[![tests](https://img.shields.io/github/actions/workflow/status/4matic/trackparse/go.yml?branch=main&label=tests&logo=github)](https://github.com/4matic/trackparse/actions/workflows/go.yml) +[![license](https://img.shields.io/badge/license-MIT-blue)](https://github.com/4matic/trackparse/blob/main/LICENSE) + +**[Documentation](https://4matic.github.io/trackparse/)** · **[Getting started](https://4matic.github.io/trackparse/start/getting-started/)** · **[Playground](https://4matic.github.io/trackparse/playground/)** · **[API on pkg.go.dev](https://pkg.go.dev/github.com/4matic/trackparse/go)** + +**Turn messy track names into structured data: who made it, who's featured, who remixed it, and +what's just noise.** + +```text +01. Wilkinson ft. Becky Hill & Tom Cane - Afterglow (Sub Focus VIP Remix) [Official Video] +``` + +Most title parsers split that into `"Wilkinson ft. Becky Hill & Tom Cane"` and +`"Afterglow (Sub Focus VIP Remix)"` and stop. Others "clean" it and throw the feat and the remix +away. trackparse keeps all of it. Everything it recognizes goes into a field, and anything it +doesn't recognize stays in the title, word for word. + +This is the Go port of [trackparse](https://github.com/4matic/trackparse). Its behaviour is defined +by a [shared spec](https://github.com/4matic/trackparse/blob/main/spec/SPEC.md) and pinned by +13,130 fixtures. It passes all of them, and for every fixture input its output is byte-identical +to the [JavaScript, Python and Rust packages](#other-languages). + +- Go 1.22 or later (the `go` line of `go.mod`; CI runs the tests on 1.22 and on the latest stable) +- No dependencies: `go.mod` has no `require` line +- No `unsafe`, no cgo, no regular expressions +- Never panics and never returns an error: any string gives a result + +## Install + +```sh +go get github.com/4matic/trackparse/go@latest +``` + +```go +import trackparse "github.com/4matic/trackparse/go" +``` + +The import path ends in `/go` because the module lives in the `go/` folder of the repository, +next to the other ports. The package name is `trackparse`, so the alias in the import line is +optional; it only makes the name visible to readers and to tools that guess it from the path. + +## Quick start + +**Docs:** [Getting started](https://4matic.github.io/trackparse/start/getting-started/) + +```go +track := trackparse.Parse( + "01. Wilkinson ft. Becky Hill & Tom Cane - Afterglow (Sub Focus VIP Remix) [Official Video]", +) + +for _, a := range track.Artists { + fmt.Printf("%s (%s)\n", a.Name, a.Role) +} +// Wilkinson (primary) +// Becky Hill (featured) +// Tom Cane (featured) + +fmt.Println(track.Title) // Afterglow +fmt.Println(track.FullTitle) // Afterglow (Sub Focus VIP Remix) +v := track.Versions[0] +fmt.Println(v.Type, v.Artists[0].Name, v.Modifiers) // remix Sub Focus [vip] +fmt.Println(track.Junk[0].Raw, track.Junk[0].Kind) // Official Video video +fmt.Println(track.Position.Number, track.Mode) // 1 youtube + +fmt.Println(trackparse.FormatWith(track, trackparse.FormatOptions{ + Joiners: trackparse.JoinersCanonical, +})) +// Wilkinson feat. Becky Hill & Tom Cane - Afterglow (Sub Focus VIP Remix) +``` + +`json.Marshal` gives the spec's JSON, with the same camelCase keys the JavaScript package uses: + +```go +track := trackparse.Parse("Wilkinson ft. Becky Hill - Afterglow (Sub Focus VIP Remix) [HD]") +b, _ := json.Marshal(track) +fmt.Println(string(b)) +``` + +
+Output + +```json +{ + "input": "Wilkinson ft. Becky Hill - Afterglow (Sub Focus VIP Remix) [HD]", + "mode": "youtube", + "position": null, + "timestamp": null, + "artists": [ + { "name": "Wilkinson", "role": "primary", "joiner": null, "source": "artist" }, + { "name": "Becky Hill", "role": "featured", "joiner": "ft.", "source": "artist" } + ], + "title": "Afterglow", + "fullTitle": "Afterglow (Sub Focus VIP Remix)", + "versions": [ + { + "type": "remix", + "raw": "Sub Focus VIP Remix", + "artists": [{ "name": "Sub Focus", "role": "remixer", "joiner": null, "source": "version" }], + "modifiers": ["vip"], + "descriptor": null, + "year": null, + "unknownArtist": false, + "delimiter": "(" + } + ], + "year": null, + "flags": { "explicit": false, "clean": false, "unknownArtist": false, "unknownTitle": false }, + "junk": [{ "raw": "HD", "kind": "quality" }], + "warnings": [] +} +``` + +(Reformatted for width; the keys and values are exactly what `json.Marshal` returns.) + +
+ +The examples on [pkg.go.dev](https://pkg.go.dev/github.com/4matic/trackparse/go#pkg-examples) are +`Example` functions in +[`example_test.go`](https://github.com/4matic/trackparse/blob/main/go/example_test.go), so +`go test` checks their output. + +## API + +**Docs:** [Other functions](https://4matic.github.io/trackparse/reference/functions/) + +```text +Parse(input string) Track +ParseWith(input string, options ParseOptions) Track +ParseArtists(input string) []Artist +ParseArtistsWith(input string, options ParseOptions) []Artist +Format(track Track) string +FormatWith(track Track, options FormatOptions) string +Normalize(input string) string +AllArtists(track Track) []Artist +NewParser(options ParseOptions) *Parser // parser.Parse(..), parser.ParseArtists(..) +SpecVersion string + +ParseTracklist(text string) Tracklist +ParseTracklistWith(text string, options TracklistOptions) Tracklist +ApplyEdits(text string, edits []Edit) EditResult +ApplyEditsWith(text string, edits []Edit, options TracklistOptions) EditResult +``` + +Every function has a plain form with the default options and a `With` form that takes them. +Tracklists are in the same package; there is no subpackage. + +### `Parse` and `ParseOptions` + +**Docs:** [parse and ParsedTrack](https://4matic.github.io/trackparse/reference/parse/) · [Options](https://4matic.github.io/trackparse/reference/options/) + +| Field | Zero value means | | +|---|---|---| +| `Mode` | `ModeAuto` | `ModeClean`, `ModeYouTube`, `ModeFilename`, `ModeTracklist`, or `ModeAuto` to detect from the string. See [Modes](#modes) | +| `Uploader` | none | YouTube channel name, used as the artist when there's no separator (`- Topic` and `VEVO` are dropped) | +| `KnownArtists` | none | Names that are never split. There is no built-in list | +| `SplitAnd` | `SplitAndAuto` | `SplitAndAuto` splits on `and` only after a comma (`A, B and C`), so `Simon and Garfunkel` stays whole. Also `SplitAndAlways`, `SplitAndNever` | +| `Keywords` | none | Extra vocabulary, added to the built-in lists (see below) | + +Options are plain structs, and the zero value of every struct is the default: `Parse(s)` is +`ParseWith(s, ParseOptions{})`. Set only the fields you need. + +```go +names := func(t trackparse.Track) []string { + var out []string + for _, a := range t.Artists { + out = append(out, a.Name) + } + return out +} + +fmt.Println(names(trackparse.Parse("Chase & Status - Baddadan"))) // [Chase Status] +fmt.Println(names(trackparse.ParseWith("Chase & Status - Baddadan", trackparse.ParseOptions{ + KnownArtists: []string{"Chase & Status"}, +}))) // [Chase & Status] +fmt.Println(names(trackparse.ParseWith("Simon and Garfunkel - Mrs. Robinson", trackparse.ParseOptions{ + SplitAnd: trackparse.SplitAndAlways, +}))) // [Simon Garfunkel] +``` + +`Keywords` adds words to the built-in lists: + +| Field | Type | | +|---|---|---| +| `VersionHeads` | `[]VersionHead` | Word that sets a version type (`{Key: "rerub", Type: VersionTypeRework}`) | +| `Descriptors` | `[]string` | Words kept as a version's `Descriptor` | +| `Genres` | `[]string` | Genre words | +| `Junk` | `[]JunkPhrase` | Phrase to junk kind (`{Phrase: "some label rip", Kind: JunkKindLabel}`) | +| `FeatMarkers` | `[]string` | Extra feat markers | + +The two maps of the JavaScript options are ordered slices here. A key given twice keeps its first +place and takes the last value, as in a JavaScript object. + +```go +fmt.Println(trackparse.Parse("Artist - Song [Some Label Rip]").Title) // Song [Some Label Rip] + +track := trackparse.ParseWith("Artist - Song [Some Label Rip]", trackparse.ParseOptions{ + Keywords: trackparse.Keywords{ + Junk: []trackparse.JunkPhrase{{Phrase: "some label rip", Kind: trackparse.JunkKindLabel}}, + }, +}) +fmt.Println(track.Title) // Song +fmt.Println(track.Junk[0].Raw, track.Junk[0].Kind) // Some Label Rip label +``` + +#### Pointer fields and `Ptr` + +Every option value of the other ports has a Go spelling. Where the zero value of a field is also +a value someone may want to pass, the field is a pointer, and `nil` means "not set": + +- `FormatOptions.FeatMarker` is a `*string`. `nil` keeps the input's marker; a pointer to `""` + writes an empty marker, as `featMarker: ""` does in JavaScript. +- `TracklistOptions.AudioSeconds` is a `*float64`. `nil` means the length is unknown; a pointer to + `0` is an audio of length 0, which flags every time after `0:00`. + +`trackparse.Ptr(v)` returns a pointer to a copy of `v`, so a literal fits in one expression: +`FormatOptions{FeatMarker: trackparse.Ptr("featuring")}`, +`TracklistOptions{AudioSeconds: trackparse.Ptr(3600.0)}`. + +`Mode` is a string field whose zero value `""` means the default of the function: `ModeAuto` +(`"auto"`) for `ParseWith`, `ModeTracklist` for `ParseTracklistWith`. Both constants can also be +passed explicitly, so `TracklistOptions{Mode: trackparse.ModeAuto}` parses each line in auto mode. + +Option values are typed strings, so a value outside the constants compiles. It behaves as the +JavaScript package behaves with that value, as the doc comment of each type says: an unknown +`SplitAnd` is `SplitAndAlways` in `ParseOptions`, an unknown `Versions` is `VersionsNone`, and so +on. Nothing panics. + +### `Track` + +**Docs:** [ParsedTrack fields](https://4matic.github.io/trackparse/reference/parse/#parsedtrack) + +| Field | Type | | +|---|---|---| +| `Input` | `string` | The original string, untouched | +| `Mode` | `Mode` | Resolved mode: `ModeClean`, `ModeYouTube`, `ModeFilename` or `ModeTracklist` | +| `Position` | `*Position` | Track number: `&Position{Raw: "01", Number: 1}` | +| `Timestamp` | `*Timestamp` | Leading cue time: `[12:34]` gives `&Timestamp{Raw: "12:34", Seconds: 754}` | +| `Artists` | `[]Artist` | Primary, featured and producer credits. Remixers live in `Versions` | +| `Title` | `string` | Clean title. Brackets it doesn't recognize stay in | +| `FullTitle` | `string` | `Title` with the versions re-attached | +| `Versions` | `[]Version` | Remixes and other versions, left to right | +| `Year` | `*int` | From `(2015)` or `- 2015` | +| `Flags` | `Flags` | `Explicit`, `Clean`, `UnknownArtist`, `UnknownTitle` | +| `Junk` | `[]Junk` | What was taken out, each with a `Kind` | +| `Warnings` | `[]Warning` | Heuristics that fired | + +Fields that are `null` in JSON are pointers, `nil` when absent. Slices in a result from the parser +are never `nil`, so they marshal as `[]`. + +`Artist{Name, Role, Joiner, Source}`: + +- `Role` is `RolePrimary`, `RoleFeatured`, `RoleRemixer` or `RoleProducer`. +- `Joiner` is the text before the name as written (`"&"`, `","`, `"ft."`, `"prod. by"`), or `nil` + for the first name in a list. +- `Source` is where the credit came from: `SourceArtist` (left of the dash), `SourceTitle` (right + of it) or `SourceVersion`. + +`Version{Type, Raw, Artists, Modifiers, Descriptor, Year, UnknownArtist, Delimiter}`: + +```go +track := trackparse.Parse("Pendulum - Watercolour (Extended VIP Mix)") +v := track.Versions[0] +fmt.Println(v.Type, v.Raw, v.Modifiers, v.Delimiter) // vip Extended VIP Mix [extended] ( + +track = trackparse.Parse("Queen - Bohemian Rhapsody (Live at Wembley 1986)") +v = track.Versions[0] +fmt.Println(v.Type, *v.Descriptor, *v.Year) // live at Wembley 1986 +``` + +Version types, junk kinds, warnings, roles, modes and the tracklist codes are typed strings +(`type VersionType string`) with one constant per spec name: `VersionTypeRemix`, +`JunkKindVideo`, `WarningNoSeparator`, `WarningCodeTimeOutOfOrder`. The value is the name used in +the spec and in JSON, so `string(v.Type)` is `"remix"` and a `switch` on the constants works. A +function per type returns every constant in the spec's order, as a new slice each time +(`AllVersionTypes()`, `AllJunkKinds()`, `AllWarnings()`, ...): + +```go +fmt.Println(trackparse.VersionTypeSpedUp) // spedUp +fmt.Println(len(trackparse.AllVersionTypes())) // 27 +fmt.Println(trackparse.AllRoles()) // [primary featured remixer producer] +``` + +A later spec version can add a version type or a warning, so a `switch` on them needs a +`default` case. A version head or junk phrase added through `Keywords` can carry any string as +its type or kind, and the result keeps that string as given. + +### JSON + +**Docs:** [Serializing to JSON](https://4matic.github.io/trackparse/reference/parse/#serializing-to-json) + +Every result type has `MarshalJSON`, which writes compact JSON matching +[`parsed-track.schema.json`](https://github.com/4matic/trackparse/blob/main/spec/schema/parsed-track.schema.json) +and +[`tracklist.schema.json`](https://github.com/4matic/trackparse/blob/main/spec/schema/tracklist.schema.json): +camelCase keys in the schema's order, every key present, whole seconds as integers (`3167`, not +`3167.0`). Its bytes are those of `JSON.stringify(parse(s))` in JavaScript. `Track` also has +`UnmarshalJSON`, which reads that form back; `Edit` marshals as the spec writes an edit +(`{"op":"set-time","line":3,"seconds":90}`). + +`encoding/json` changes some bytes of what `MarshalJSON` returns, not the values: +`json.Marshal` escapes `<`, `>`, `&`, U+2028 and U+2029 (`"&"` becomes `"\u0026"`). For the exact +`JSON.stringify` bytes, call `MarshalJSON` directly or use an `Encoder` with +`SetEscapeHTML(false)` (which adds a newline after each value): + +```go +track := trackparse.Parse("Chase & Status - Baddadan") + +b, _ := json.Marshal(track.Artists[1]) +fmt.Println(string(b)) // {"name":"Status","role":"primary","joiner":"\u0026","source":"artist"} + +enc := json.NewEncoder(os.Stdout) +enc.SetEscapeHTML(false) +enc.Encode(track.Artists[1]) // {"name":"Status","role":"primary","joiner":"&","source":"artist"} + +b, _ = track.Artists[1].MarshalJSON() +fmt.Println(string(b)) // {"name":"Status","role":"primary","joiner":"&","source":"artist"} +``` + +`UnmarshalJSON` ignores unknown keys, leaves missing keys at their zero value, keeps enum values +as written, and returns an error for a key of the wrong type. The options structs have no JSON +methods. + +### `ParseArtists` + +**Docs:** [parseArtists](https://4matic.github.io/trackparse/reference/functions/#parseartistsinput-options) · [Artists and credits](https://4matic.github.io/trackparse/guides/artists/) + +Splits a bare artist string (no title). `ParseArtistsWith` takes the same options as `ParseWith`. + +```go +for _, a := range trackparse.ParseArtists("Sub Focus, Wilkinson & Dimension feat. Kojo") { + fmt.Printf("%s:%s\n", a.Name, a.Role) +} +// Sub Focus:primary +// Wilkinson:primary +// Dimension:primary +// Kojo:featured +``` + +### `Format` and `FormatOptions` + +**Docs:** [format](https://4matic.github.io/trackparse/reference/functions/#formattrack-options) · [Formatting](https://4matic.github.io/trackparse/guides/formatting/) + +Renders a track back to a string. + +| Field | Zero value means | | +|---|---|---| +| `Feat` | `FeatSource` | Where featured artists go: `FeatSource` (where they were), `FeatArtist`, `FeatTitle` (`(feat. X)` after the title) or `FeatOmit` | +| `FeatMarker` | `nil`: the input's marker | Marker for featured artists, such as `trackparse.Ptr("featuring")`. A pointer to `""` writes an empty marker | +| `Joiners` | `JoinersOriginal` | `JoinersOriginal` keeps the joiners as written. `JoinersCanonical` writes `and` as `&`, `vs` as `vs.` and every feat marker as `feat.` | +| `Versions` | `VersionsAll` | `VersionsAll` or `VersionsNone` | +| `OmitProducers` | `false` | Leave out `(prod. ...)` credits (`producers: false` in JavaScript) | +| `Position` | `false` | Include the track number (`01. `) | + +```go +track := trackparse.Parse("01. Wilkinson ft. Becky Hill - Afterglow (Sub Focus Remix)") + +fmt.Println(trackparse.Format(track)) +// Wilkinson ft. Becky Hill - Afterglow (Sub Focus Remix) +fmt.Println(trackparse.FormatWith(track, trackparse.FormatOptions{ + Feat: trackparse.FeatTitle, + Joiners: trackparse.JoinersCanonical, +})) +// Wilkinson - Afterglow (feat. Becky Hill) (Sub Focus Remix) +fmt.Println(trackparse.FormatWith(track, trackparse.FormatOptions{ + Feat: trackparse.FeatOmit, + Versions: trackparse.VersionsNone, +})) +// Wilkinson - Afterglow +fmt.Println(trackparse.FormatWith(track, trackparse.FormatOptions{Position: true})) +// 01. Wilkinson ft. Becky Hill - Afterglow (Sub Focus Remix) +fmt.Println(trackparse.FormatWith(track, trackparse.FormatOptions{FeatMarker: trackparse.Ptr("featuring")})) +// Wilkinson featuring Becky Hill - Afterglow (Sub Focus Remix) +``` + +### `Normalize` + +**Docs:** [normalize](https://4matic.github.io/trackparse/reference/functions/#normalizeinput) + +The Unicode cleanup every function runs first: NFC, zero-width spaces, BOM and soft hyphens +removed, fullwidth brackets, smart quotes and dash variants mapped to ASCII, whitespace collapsed. +Running it twice changes nothing. + +```go +fmt.Println(trackparse.Normalize("Noisia\u200b – Stigma (VIP)")) // Noisia - Stigma (VIP) +``` + +### `AllArtists` + +**Docs:** [allArtists](https://4matic.github.io/trackparse/reference/functions/#allartiststrack) + +Credits plus every remixer, deduplicated. + +```go +track := trackparse.Parse("Wilkinson ft. Becky Hill - Afterglow (Sub Focus Remix)") +for _, a := range trackparse.AllArtists(track) { + fmt.Printf("%s:%s\n", a.Name, a.Role) +} +// Wilkinson:primary +// Becky Hill:featured +// Sub Focus:remixer +``` + +### `Parser` + +**Docs:** [createParser](https://4matic.github.io/trackparse/reference/functions/#createparseroptions) + +Resolves the options and builds the word tables once, for many calls. `ParseWith` builds them on +every call, so use a `Parser` when the options are the same each time. + +```go +parser := trackparse.NewParser(trackparse.ParseOptions{ + KnownArtists: []string{"Chase & Status", "Camo & Krooked"}, + Keywords: trackparse.Keywords{ + VersionHeads: []trackparse.VersionHead{{Key: "rerub", Type: trackparse.VersionTypeRework}}, + }, +}) + +track := parser.Parse("Chase & Status x Camo & Krooked - Track (Alix Perez Rerub)") +fmt.Println(len(track.Artists), track.Versions[0].Type) // 2 rework + +var plain trackparse.Parser // the zero Parser uses the default options +fmt.Println(len(plain.Parse("Chase & Status - Baddadan").Artists)) // 2 +``` + +A `Parser` is safe for concurrent use by many goroutines, and so are the package functions. The +default tables are built once, on first use. + +### `SpecVersion` + +The spec version this module implements. It equals the module version: the Go module, the npm +package, the PyPI package, the Rust crate and the spec are released together and always share one +version number. + +## Modes + +**Docs:** [Modes](https://4matic.github.io/trackparse/guides/modes/) + +| Mode | For | Adds | +|---|---|---| +| `ModeClean` | Store metadata, tags | Only a spaced dash separates artist and title | +| `ModeYouTube` | Video titles, scrobbles | Pipe segments, `"Title" by Artist`, `Artist: "Title"`, unspaced dashes, trailing junk, uploader fallback | +| `ModeFilename` | Files | Strips the extension, `_` becomes a space, `01-Track` numbering | +| `ModeAuto` | Anything | `ModeFilename` for known extensions, `ModeYouTube` when it sees junk, pipes or platform suffixes, `ModeClean` otherwise | +| `ModeTracklist` | One line of a tracklist | The first spaced dash always separates; `_-_` too. Never picked by `ModeAuto` | + +```go +youtube := trackparse.ParseOptions{Mode: trackparse.ModeYouTube} +track := trackparse.ParseWith(`"Numb" by Linkin Park`, youtube) +fmt.Println(track.Artists[0].Name, "/", track.Title, track.Warnings) // Linkin Park / Numb [bySplit] + +track = trackparse.Parse("07_Burial_-_Archangel.mp3") +fmt.Println(track.Mode, track.Artists[0].Name, track.Title, track.Position.Number) // filename Burial Archangel 7 + +youtube.Uploader = "Porter Robinson" +fmt.Println(trackparse.ParseWith("Shelter", youtube).Artists[0].Name) // Porter Robinson +``` + +## Warnings + +**Docs:** [Warnings](https://4matic.github.io/trackparse/reference/warnings/) + +The parser never fails, but it says when it had to guess. `track.Warnings` is a `[]Warning`, +empty when every decision was unambiguous. + +| Constant | JSON name | Means | +|---|---|---| +| `WarningNoSeparator` | `noSeparator` | No artist/title separator was found. The whole string is the title | +| `WarningAmbiguousSeparator` | `ambiguousSeparator` | A two-part pipe title with no dash was read as artist and title | +| `WarningUnspacedDashSplit` | `unspacedDashSplit` | Split at a dash without spaces around it | +| `WarningAsymmetricDashSplit` | `asymmetricDashSplit` | Split at a dash with a space on one side only | +| `WarningBySplit` | `bySplit` | Read `"Title" by Artist` | +| `WarningQuotedTitleSplit` | `quotedTitleSplit` | Took a quoted span as the title and the text before it as the artist | +| `WarningAmbiguousMixCredit` | `ambiguousMixCredit` | ` Mix` was read as a remix, but the name is long enough to be a style | +| `WarningUnbalancedBrackets` | `unbalancedBrackets` | A bracket was opened and never closed | + +```go +track := trackparse.Parse("Around the World") +fmt.Println(len(track.Artists), track.Title, track.Warnings) // 0 Around the World [noSeparator] +fmt.Println(track.Warnings[0] == trackparse.WarningNoSeparator) // true + +fmt.Println(trackparse.Parse("Noisia - Stigma (VIP").Warnings) // [unbalancedBrackets] +``` + +Tracklists have their own warnings, with line numbers. They are listed under +[Tracklists](#tracklists). + +## Tracklists + +**Docs:** [Tracklists](https://4matic.github.io/trackparse/guides/tracklists/) · [Editing tracklists](https://4matic.github.io/trackparse/guides/editing-tracklists/) · [Tracklist API](https://4matic.github.io/trackparse/reference/tracklist/) · [Warnings](https://4matic.github.io/trackparse/reference/warnings/#tracklist-warnings) + +`ParseTracklist` parses a whole tracklist, one entry per line, and checks it. Each entry keeps its +line exactly as written plus its own line ending, so joining every `Raw` and `Eol` is always the +input, CRLF or not. + +```go +text := strings.Join([]string{ + "Hour 2", + "48:20 Noisia - Stigma", + "52:47 Mefjus & Kasra - Bandwagon (Phace Remix)", + "56:05 Black Sun Empire - ID", + "59:31 Alix Perez - Fade Away", + "01:03:10 Interview with Hybris", + "01:07:44 Imanu - Sacrifice", + "00:11:02 Current Value feat. Teddy Killerz - Payload", // typo for 01:11:02 + "01:15:36 Hybris - Spinning Top", +}, "\r\n") + +list := trackparse.ParseTracklist(text) + +var joined strings.Builder +var kinds []trackparse.EntryKind +for _, e := range list.Entries { + joined.WriteString(e.Raw + string(e.Eol)) + kinds = append(kinds, e.Kind) +} +fmt.Println(joined.String() == text) // true +fmt.Println(kinds) // [header track track track track marker track track track] + +e := list.Entries[2] +fmt.Println(e.Time.Raw, e.Time.Seconds) // 52:47 3167 +fmt.Printf("%q\n", e.Parts.Rest) // "Mefjus & Kasra - Bandwagon (Phace Remix)" +fmt.Println(len(e.Track.Artists), e.Track.Title, e.Track.Versions[0].Type) // 2 Bandwagon remix +fmt.Println(list.Entries[3].Track.Flags.UnknownTitle) // true (the ID) + +for _, w := range list.Warnings { + fmt.Println(w.Code, w.Line, w.Severity) + if s := w.Suggestion; s != nil { + fmt.Println(" suggestion:", s.Line, s.Raw, s.Seconds) + } +} +// no-start-at-zero 2 info +// time-out-of-order 8 warning +// suggestion: 8 01:11:02 4262 + +s := list.Stats +fmt.Println(s.Lines, s.Tracks, s.Markers, s.Timed, *s.FirstTime, *s.LastTime) // 9 7 1 8 2900 4536 +``` + +The suggestion exists because exactly one time, one digit away from `00:11:02`, fits between its +neighbours. With several candidates or none, `Suggestion` is `nil`. + +`ApplyEdits` takes a slice of `Edit` values and only rewrites the lines they name: + +```go +text := "48:20 Noisia - Stigma\r\n59:31 Alix Perez - Fade Away\r\n00:03:10 Imanu - Sacrifice\r\n" + +result := trackparse.ApplyEdits(text, []trackparse.Edit{ + trackparse.SetTime(3, 3790), + trackparse.ShiftFrom(45, 2), +}) +fmt.Printf("%q\n", result.Text) +// "48:20 Noisia - Stigma\r\n01:00:16 Alix Perez - Fade Away\r\n01:03:55 Imanu - Sacrifice\r\n" +fmt.Println(result.Changed) // [2 3] +w := result.Warnings[0] +fmt.Println(w.Code, w.Edit, *w.Line) // style-upgraded 1 2 + +result = trackparse.ApplyEdits(text, []trackparse.Edit{trackparse.ShiftLines(-3000, 1)}) +fmt.Println(result.Warnings[0].Code) // time-clamped + +result = trackparse.ApplyEdits(text, []trackparse.Edit{trackparse.Delete(9)}) +fmt.Println(result.Warnings[0].Code, result.Text == text) // edit-invalid true +``` + +A rewritten time keeps its line's style: `48:20` stays `MM:SS`, and a time that crosses the hour +gets hours, with a `style-upgraded` warning. A time pushed below zero stops at zero and warns +`time-clamped`. A bad edit changes nothing and warns `edit-invalid`. + +Edits are built with `SetTime(line, seconds)`, `Shift(seconds)` (all timed lines), +`ShiftFrom(seconds, from)`, `ShiftLines(seconds, lines...)`, `SortByTime()`, +`SetRest(line, rest)`, `Insert(after, text)` (`after` 0 inserts at the top) and `Delete(line)`. +`Edit` is a plain struct with an `Op` field, so you can also fill it yourself; each operation reads +only its own fields. Line numbers are 1-based. + +`TracklistOptions` has `Mode` (zero value: `ModeTracklist`; `ModeAuto` picks a mode per line), +`KnownArtists`, `SplitAnd`, `Keywords`, `AudioSeconds` (a `*float64`; it enables +`time-after-audio-end`) and `MarkerWords`: + +```go +list := trackparse.ParseTracklistWith("00:00 A - B\n1:02:03 C - D", trackparse.TracklistOptions{ + AudioSeconds: trackparse.Ptr(3600.0), +}) +fmt.Println(list.Warnings[0].Code, list.Warnings[0].Line) // time-after-audio-end 2 +``` + +| Result | Fields | +|---|---| +| `Tracklist` | `SpecVersion`, `Entries`, `Warnings`, `Stats` | +| `Entry` | `Line` (1-based), `Kind` (`EntryKindTrack`, `EntryKindMarker`, `EntryKindHeader`, `EntryKindLink`, `EntryKindNote`, `EntryKindBlank`), `Eol`, `Raw`, `Parts`, `Time` (`*TracklistTime`), `Track` (`*Track`), `Layered` (the track text after any time starts with `w/`) | +| `Parts` | `Lead`, `Time`, `Gap`, `Rest`, joined they give `Raw` | +| `TracklistWarning` | `Code` (`WarningCode`), `Line`, `Severity` (`SeverityInfo` or `SeverityWarning`), `Suggestion` (`*Suggestion`) | +| `TracklistTime` | `Raw`, `Seconds` (`float64`; `Entry.Time`, `nil` on untimed lines) | +| `Suggestion` | `Line`, `Raw`, `Seconds` | +| `Stats` | `Lines`, `Tracks`, `Markers`, `Timed`, `FirstTime`, `LastTime` (`*float64`) | +| `EditResult` | `Text`, `Changed`, `Warnings` (`EditWarning{Code, Edit, Line}`, `Line` is `*int`) | + +`Eol` is the terminator itself (`EolLF` is `"\n"`, `EolCRLF` is `"\r\n"`, `EolCR` is `"\r"`, and +`EolNone` is `""` for a last line without one), so `e.Raw + string(e.Eol)` is the line as it was. + +Lists pasted with list bullets or Markdown emphasis (`* 14:21 Artist - Title`, +`**[**14:21**] Artist - Title**`) read like plain lines; the decoration stays in `Raw` and `Parts`. +A line whose track text (after any time) starts with `w/` is `Layered`: a track played over the +previous one +([Markdown](https://4matic.github.io/trackparse/guides/tracklists/#markdown), +[layered tracks](https://4matic.github.io/trackparse/guides/tracklists/#layered-tracks)). + +Warning codes (`WarningCode`): `time-missing`, `time-out-of-order`, `time-duplicate`, +`no-start-at-zero`, `time-after-audio-end` (needs `AudioSeconds`), `invalid-time`, `position-gap`, +`position-duplicate`, `line-unparsed`, as the constants `WarningCodeTimeMissing` to +`WarningCodeLineUnparsed`. Edit warnings (`EditWarningCode`): `EditWarningCodeEditInvalid`, +`EditWarningCodeTimeClamped`, `EditWarningCodeStyleUpgraded`. The +[Tracklist API reference](https://4matic.github.io/trackparse/reference/tracklist/) explains each +one, and the rules are in +[SPEC R13](https://github.com/4matic/trackparse/blob/main/spec/SPEC.md#r13-tracklists). + +Every line is parsed with `ModeTracklist`, where the first spaced dash always separates artist and +title. `ParseWith` accepts it too: + +```go +track := trackparse.Parse("Electrosoul System - Liquid Metal") +fmt.Println(track.Title, "/", track.Junk[0].Raw, track.Junk[0].Kind) // Electrosoul System / Liquid Metal genre + +track = trackparse.ParseWith("Electrosoul System - Liquid Metal", trackparse.ParseOptions{ + Mode: trackparse.ModeTracklist, +}) +fmt.Println(track.Title) // Liquid Metal +``` + +## Errors + +No function returns an `error` and none panics. `Parse` gives a complete `Track` for any string, +`""` included, and `ParseTracklist` and `ApplyEdits` return for any text. `ApplyEdits` reports an +edit it cannot apply (a line that does not exist, non-finite seconds) as an +`EditWarningCodeEditInvalid` warning and leaves the text alone. The only function with an `error` +result is `Track.UnmarshalJSON`, which reads JSON you give it. + +A Go string can hold bytes that are not valid UTF-8. Every function reads such input with the +WHATWG rule, the one `TextDecoder` uses in JavaScript and `String::from_utf8_lossy` in Rust: each +maximal ill-formed subsequence becomes one U+FFFD. So the Go module and the Rust crate read the +same bytes as the same text, and every output string is valid UTF-8. + +```go +fmt.Printf("%q\n", trackparse.Parse("Noisia - Sti\xffgma\xe2\x82").Title) // "Sti�gma�" +``` + +`\xff` is one replacement character, and the truncated three-byte sequence `\xe2\x82` is one more. +(Go's own `for range` over a string would give one per byte.) + +## How it is tested + +**Docs:** [How it's tested](https://4matic.github.io/trackparse/project/testing/) · [Ports](https://4matic.github.io/trackparse/project/ports/) + +- `go test ./...` runs all 13,130 shared fixtures (1,203 written by hand, the rest generated from + the rules) and checks every output against the JSON Schema. The skip list is empty. The fixture + test skips itself when `../spec` is missing, as in the module zip that `go get` downloads. +- The R0 primitives (whitespace, word keys, dedup keys, letters, NFC and NFD) are tested against + values dumped from the JavaScript package. +- Seeded property tests check the spec's invariants on generated input: no panic in any mode, + `Normalize` idempotent, whitespace and dash noise not changing the result, no word of the input + going missing, the `Format` round trip, and for tracklists the byte-for-byte round trip, edit + locality and the shift round trip. Fuzz targets (`go test -fuzz`) check that nothing panics on + any bytes and that every output string is valid UTF-8; one feeds `Track.UnmarshalJSON` and + checks the JSON round trip. +- A `Parser` with options, the zero `Parser`, the package functions, `ParseTracklistWith` and + `ApplyEdits` are called from 16 goroutines at once and compared with a sequential run, under + the race detector in CI. +- The `Example` functions in `example_test.go` are checked by `go test`, so the examples on + pkg.go.dev run as shown. +- [`scripts/compare-ports.mjs`](https://github.com/4matic/trackparse/blob/main/scripts/compare-ports.mjs) + runs every fixture input through the JavaScript package and this module and compares the + complete JSON output, every field of it, not only the ones a fixture asserts. The Python and + Rust packages are checked the same way. +- CI runs `go vet`, staticcheck and `go test -race` on Go 1.22 and on the latest stable, and fails + if `go.mod` gains a `require` line or the code calls `sort.Slice` (JavaScript sorts are stable, + `sort.Slice` is not). + +## Unicode version + +The Unicode facts the rules need (letters, uppercase letters, the lowercase mapping, and the NFC +and NFD tables) are generated from Node 24, which has Unicode 17, and compiled into the module. +Neither source that a Go program would usually take them from is used, because both follow the +Go toolchain that builds the program: + +- the standard library's `unicode` package has the tables of its Go release (`unicode.Version` is + `"15.0.0"` in Go 1.24); +- `golang.org/x/text/unicode/norm` picks its NFC and NFD tables by build tag: Unicode 15 below + Go 1.27, Unicode 17 from Go 1.27. + +So the output does not depend on the Go version you build with. + +This differs from the Rust crate, which takes NFC and NFD from the `unicode-normalization` crate +and its Unicode 18 tables. Unicode 18 added 32 combining marks, so a string containing one of +them can come out with its marks in another order in Rust than in JavaScript and Go. Strings +without those marks are not affected, and every shared fixture gives the same bytes in all four +ports. + +## Performance + +There are no regular expressions, so there is no regex backtracking. Measured with +`go test -bench . -run '^$' -benchtime 2s` (the benchmarks in `bench_test.go`) on an Intel +i7-4770S, Go 1.24, and the JavaScript package on Node 24 with the same inputs on the same machine. +Other programs were running, so the numbers vary by about 20% between runs: + +| Input | Go | JavaScript | +|---|---|---| +| A typical track (`Noisia feat. Foreign Beggars - Shellshock (Phace Remix) [Official Video]`) | 0.04 to 0.06 ms | 0.07 to 0.09 ms | +| 10,000 code points of one repeated block (`a & `, `a feat. `, `feat. X `, `(Remix) `, `[HD] `, `- `, or the typical track) | 3 to 7 ms | 4 to 18 ms | +| A 42-line tracklist | 1.4 to 1.8 ms | 2.9 ms | +| A 10,000-line tracklist | 0.33 to 0.38 s | 0.8 to 0.9 s | +| `ApplyEdits` with a shift and a sort on 10,000 lines | 60 to 67 ms | 100 to 160 ms | + +## Versioning + +**Changelog:** [go/CHANGELOG.md](https://github.com/4matic/trackparse/blob/main/go/CHANGELOG.md) + +The module version is the spec version (`SpecVersion`). Releases are tagged `go/vX.Y.Z` in the +repository, the tag form the Go toolchain expects for a module in a subfolder, and the Go +module proxy serves them from there. There is no upload step: the tag is the release. + +While it is 0.x, a release that changes the output for some input bumps the minor version, and a +patch release only fixes bugs. `go get -u` moves to the newest minor, so if you store parsed +results, upgrade on purpose and read the changelog first. + +## Other languages + +**Docs:** [Ports](https://4matic.github.io/trackparse/project/ports/) + +The same parser exists for JavaScript, Python and Rust. All four implement one spec, pass the +same fixtures, are released together under one version number, and return identical JSON for +every fixture input. You can parse in one language and read the result in another. The one known +difference is described under [Unicode version](#unicode-version). + +| Language | Package | Install | +|---|---|---| +| JavaScript / TypeScript | [trackparse on npm](https://www.npmjs.com/package/trackparse) | `npm install trackparse` | +| Python | [trackparse on PyPI](https://pypi.org/project/trackparse/) | `pip install trackparse` | +| Rust | [trackparse on crates.io](https://crates.io/crates/trackparse) | `cargo add trackparse` | +| Go | [github.com/4matic/trackparse/go](https://pkg.go.dev/github.com/4matic/trackparse/go) | `go get github.com/4matic/trackparse/go` | + +## Limitations + +**Docs:** [Limitations and roadmap](https://4matic.github.io/trackparse/project/roadmap/) + +- `Parse` takes one track string. Whole tracklists go through `ParseTracklist`, which reads start + times only: no durations, trailing times or time ranges. +- Catalog numbers, key and BPM are not fields. They stay in the title. +- There is no artist database. Pass `KnownArtists` for names that contain a joiner + (`Earth, Wind & Fire`). + +## Development + +From `go/` in the [repository](https://github.com/4matic/trackparse) (Node 24 is needed for the +codegen scripts and the artist-side test data only): + +```sh +node scripts/gen_data.mjs --check # spec/data codegen is up to date +node scripts/gen_unicode.mjs --check # Unicode tables are up to date +pnpm --filter trackparse build && node scripts/dump_artist_cases.mjs # data for the artist-side tests +gofmt -l . # prints nothing +go vet ./... +go test -race ./... # every shared fixture, primitives, examples, API +TRACKPARSE_REPORT=1 go test -run TestFixtures -v # pass rate per fixture file and per rule +``` + +The Go side of `scripts/compare-ports.mjs` is a command behind a build tag, so it is not part of +the package API: `go run -tags trackparse_wire ./internal/cmd/dump` reads fixture calls as JSON +lines and writes each result as the JavaScript package would. CI also runs `go vet` and +staticcheck with `-tags trackparse_wire`. + +Files mirror the JS reference one to one (`scanner.go` is `scanner.ts`, `tl_parse.go` is +`tracklist/parse.ts`, and so on) and cite the same spec rule IDs. Behaviour changes start in the +spec, not here: see [AGENTS.md](https://github.com/4matic/trackparse/blob/main/AGENTS.md). + +## Links + +- [Documentation](https://4matic.github.io/trackparse/), with every example in JavaScript, Python, + Rust and Go, and a [playground](https://4matic.github.io/trackparse/playground/) that runs the + parser in your browser +- [API documentation on pkg.go.dev](https://pkg.go.dev/github.com/4matic/trackparse/go) +- [Spec](https://github.com/4matic/trackparse/blob/main/spec/SPEC.md) and its + [changelog](https://github.com/4matic/trackparse/blob/main/spec/CHANGELOG.md) +- [Changelog](https://github.com/4matic/trackparse/blob/main/go/CHANGELOG.md) +- [Project README](https://github.com/4matic/trackparse#readme) +- [GitHub repository](https://github.com/4matic/trackparse) +- [npm package](https://www.npmjs.com/package/trackparse) · [PyPI package](https://pypi.org/project/trackparse/) · [Rust crate](https://crates.io/crates/trackparse) + +## License + +[MIT](https://github.com/4matic/trackparse/blob/main/LICENSE) diff --git a/go/artist_side_test.go b/go/artist_side_test.go new file mode 100644 index 0000000..c3fbdef --- /dev/null +++ b/go/artist_side_test.go @@ -0,0 +1,475 @@ +package trackparse + +// Tests of the artist side (classify.go, credits.go, artists.go, assemble.go, format.go) that +// run without the title side of the pipeline, against values dumped from the JS reference +// (testdata/artist_cases.json, written by scripts/dump_artist_cases.mjs). +// +// The file is about 2.3 MB, so it is not committed (it would ship in the module zip). Write it +// with `pnpm --filter trackparse build && node scripts/dump_artist_cases.mjs`; without it these +// tests skip, unless TRACKPARSE_REQUIRE_ARTIST_CASES=1 (set in CI) makes that a failure. + +import ( + "bytes" + "errors" + "io/fs" + "math/rand" + "os" + "strings" + "sync" + "testing" + "time" +) + +const artistCasesPath = "testdata/artist_cases.json" + +var artistCases = sync.OnceValues(func() (jsonValue, error) { + text, err := os.ReadFile(artistCasesPath) + if err != nil { + return jsonValue{}, err + } + return parseJSON(text) +}) + +// casesOf is one section of testdata/artist_cases.json. +func casesOf(t *testing.T, section string) []jsonValue { + t.Helper() + all, err := artistCases() + if errors.Is(err, fs.ErrNotExist) && os.Getenv("TRACKPARSE_REQUIRE_ARTIST_CASES") != "1" { + t.Skipf("%s not found: run pnpm --filter trackparse build && "+ + "node scripts/dump_artist_cases.mjs", artistCasesPath) + } + if err != nil { + t.Fatal(err) + } + v, ok := all.get(section) + if !ok || v.kind != jsonArray || len(v.arr) == 0 { + t.Fatalf("testdata/artist_cases.json: no %s", section) + } + return v.arr +} + +// optionsOf is the case's options object ({} when absent). +func optionsOf(c jsonValue) jsonValue { + if o, ok := c.get("options"); ok { + return o + } + return jsonValue{kind: jsonObject} +} + +// localRunArtists is R10 as the title-side parser.go will run it, minus R1: the input is +// already normalized. +func localRunArtists(e *engine, norm string) []Artist { + if norm == "" { + return []Artist{} + } + c := e.newCtx() + s, _ := scan([]rune(norm), 0) + side := parseArtistSide(&s, c) + artists := dedupArtists(side.credits) + for i := range artists { + artists[i].Source = SourceArtist + } + return artists +} + +func TestParseArtistsMatchesJS(t *testing.T) { + failed := 0 + for _, c := range casesOf(t, "artists") { + input, _ := c.getString("input") + want, _ := c.get("expected") + got := marshal(artistList(localRunArtists(newEngine(resolveParseJSON(optionsOf(c))), input))) + if exp := marshal(want); !bytes.Equal(got, exp) { + failed++ + if failed <= 20 { + t.Errorf("%q %s\n got %s\nwant %s", input, marshal(optionsOf(c)), got, exp) + } + } + } + if failed > 0 { + t.Errorf("%d artist lists differ", failed) + } +} + +func TestVersionsMatchJS(t *testing.T) { + failed := 0 + for _, c := range casesOf(t, "versions") { + want, _ := c.get("version") + var d decoder + v := d.version(want, "$") + if d.err != nil { + t.Fatal(d.err) + } + e := newEngine(resolveParseJSON(optionsOf(c))) + cl := classify(v.Raw, site{source: SourceTitle, delimiter: v.Delimiter, pos: 0}, e.newCtx()) + var got []byte + if cl.kind == classVersions && len(cl.versions) == 1 { + out := toVersion(cl.versions[0]) + got = marshal(&out) + } else { + got = []byte("not one version") + } + if exp := marshal(want); !bytes.Equal(got, exp) { + failed++ + if failed <= 20 { + t.Errorf("%q\n got %s\nwant %s", v.Raw, got, exp) + } + } + } + if failed > 0 { + t.Errorf("%d versions differ", failed) + } +} + +func TestFormatAndAllArtistsMatchJS(t *testing.T) { + formats := 0 + for _, c := range casesOf(t, "tracks") { + tv, _ := c.get("track") + var d decoder + track := d.track(tv, "$") + if d.err != nil { + t.Fatal(d.err) + } + list, _ := c.get("formats") + for _, pair := range list.arr { + if len(pair.arr) != 2 { + t.Fatalf("bad formats entry %s", marshal(pair)) + } + got := formatTrack(&track, resolveFormatJSON(pair.arr[0])) + if want := pair.arr[1].str; got != want { + t.Errorf("format(%q, %s)\n got %q\nwant %q", track.Input, marshal(pair.arr[0]), got, want) + } + formats++ + } + want, _ := c.get("allArtists") + if got := marshal(artistList(allArtists(&track))); !bytes.Equal(got, marshal(want)) { + t.Errorf("allArtists(%q)\n got %s\nwant %s", track.Input, got, marshal(want)) + } + } + if formats < 1000 { + t.Errorf("only %d format checks", formats) + } +} + +// TestFormatDefaults checks the typed door: the zero FormatOptions are the JS defaults. +func TestFormatDefaults(t *testing.T) { + feat := "ft." + amp := "&" + track := Track{ + Title: "Out the Blue", + Artists: []Artist{ + {Name: "Sub Focus", Role: RolePrimary, Source: SourceArtist}, + {Name: "Alice Gold", Role: RoleFeatured, Joiner: &feat, Source: SourceTitle}, + {Name: "Kele", Role: RoleFeatured, Joiner: &, Source: SourceTitle}, + }, + Versions: []Version{{Raw: "Wilkinson Remix", Delimiter: DelimiterParen}}, + Position: &Position{Raw: "03", Number: 3}, + } + cases := []struct { + o FormatOptions + want string + }{ + {FormatOptions{}, "Sub Focus - Out the Blue (ft. Alice Gold & Kele) (Wilkinson Remix)"}, + {FormatOptions{Feat: FeatArtist}, "Sub Focus ft. Alice Gold & Kele - Out the Blue (Wilkinson Remix)"}, + {FormatOptions{Feat: FeatOmit, Versions: VersionsNone, Position: true}, "03. Sub Focus - Out the Blue"}, + {FormatOptions{Joiners: JoinersCanonical}, "Sub Focus - Out the Blue (feat. Alice Gold & Kele) (Wilkinson Remix)"}, + {FormatOptions{FeatMarker: Ptr("with")}, "Sub Focus - Out the Blue (with Alice Gold & Kele) (Wilkinson Remix)"}, + } + for _, c := range cases { + if got := FormatWith(track, c.o); got != c.want { + t.Errorf("%+v\n got %q\nwant %q", c.o, got, c.want) + } + } + if got := Format(Track{}); got != "" { + t.Errorf("empty track: %q", got) + } +} + +func TestCleanName(t *testing.T) { + cases := map[string]string{ + " Noisia ": "Noisia", + `"Camo & Krooked"`: "Camo & Krooked", + "'x'": "x", + `"`: `"`, + "Phace,;": "Phace", + "Phace , ": "Phace", + "by Skrillex": "Skrillex", + "By Skrillex": "Skrillex", + "Bypass Skrillex": "Bypass Skrillex", + "by": "by", + "": "", + "'Noisia' & 'Mefjus'": "Noisia' & 'Mefjus", // only unwrapList checks inside + } + for in, want := range cases { + if got := cleanName(in); got != want { + t.Errorf("cleanName(%q) = %q, want %q", in, got, want) + } + } +} + +func TestSplitMultiParts(t *testing.T) { + cases := map[string][]string{ + "A Remix / B Remix": {"A Remix", "B Remix"}, + "A Remix; B Remix": {"A Remix", "B Remix"}, + "A/B Remix": {"A/B Remix"}, + "A (x / y) Remix / B Remix": {"A (x / y) Remix", "B Remix"}, + "/ x": {"/ x"}, + "x /": {"x /"}, + } + for in, want := range cases { + got := splitMultiParts([]rune(in)) + if strings.Join(got, "|") != strings.Join(want, "|") { + t.Errorf("splitMultiParts(%q) = %q, want %q", in, got, want) + } + } +} + +func TestClassifyKinds(t *testing.T) { + c := sharedEngine().newCtx() + s := site{source: SourceTitle, delimiter: DelimiterParen} + cases := []struct { + inner string + kind classKind + }{ + {"", classUnknown}, + {"Official Video", classJunk}, + {"Official Video 2015", classJunk}, + {"feat. Alice Gold", classFeat}, + {"feat.", classUnknown}, + {"prod. by Noisia", classProducer}, + {"Explicit", classFlag}, + {"Radio Clean", classFlag}, + {"2015", classYear}, + {"1850", classUnknown}, + {"Skrillex Remix", classVersions}, + {"Remix by Skrillex", classVersions}, + {"Live at Wembley 1986", classVersions}, + {"A Remix / B VIP", classVersions}, + {"Hello World", classUnknown}, + } + for _, x := range cases { + if got := classify(x.inner, s, c); got.kind != x.kind { + t.Errorf("classify(%q) = %d, want %d", x.inner, got.kind, x.kind) + } + } + got := classify("A Remix / B VIP", s, c) + if len(got.versions) != 2 || got.versions[1].vtype != VersionTypeVIP { + t.Errorf("multi-version: %+v", got.versions) + } +} + +// TestArtistSideNeverPanics feeds random strings over a small alphabet of the characters the +// artist side reacts to through classify and parseArtistSide (R0.8). +func TestArtistSideNeverPanics(t *testing.T) { + alphabet := []string{ + "(", ")", "[", "]", "{", "}", " ", " ", "a", "B", "&", ",", ";", "-", "'", `"`, "feat.", "ft", + "x", "vs", "and", "with", "prod.", "by", "Remix", "Mix", "VIP", "2015", "ID", "1,000", + "'s", "/", "é", "\U0001F600", "", "Official", "Video", "Live", " ", + } + r := rand.New(rand.NewSource(7)) + e := newEngine(resolveParse(&ParseOptions{KnownArtists: []string{"Chase & Status", "a B"}})) + for range 20000 { + var b strings.Builder + for n := r.Intn(14); n > 0; n-- { + b.WriteString(alphabet[r.Intn(len(alphabet))]) + } + in := b.String() + c := e.newCtx() + _ = classify(collapseSpaces(in), site{source: SourceArtist, delimiter: DelimiterSquare, pos: 3}, c) + artists := localRunArtists(e, in) + track := Track{Artists: artists, Title: in} + _ = formatTrack(&track, resolveFormat(&FormatOptions{Joiners: JoinersCanonical, Feat: FeatTitle})) + _ = allArtists(&track) + } +} + +// --------------------------------------------------------------------------------------------- +// R9.2 dedup + +// referenceDedup is R9.2 / R7.6 written the plain (quadratic) way, as in the JS reference: +// every "first remaining name of the list" is a scan. dedupArtists must give exactly this. +func referenceDedup(credits []credit) []Artist { + entries := make([]dedupEntry, len(credits)) + for i, c := range credits { + entries[i] = dedupEntry{a: toArtist(c), list: c.list, alive: true} + } + pass := func(e int, joiner *string) { + list := entries[e].list + var members []int + for i := range entries { + if entries[i].alive && entries[i].list == list { + members = append(members, i) + } + } + if len(members) == 0 || members[0] != e { + return + } + if len(members) > 1 { + entries[members[1]].a.Joiner = joiner + } + } + index := map[string]int{} + for i := range entries { + key := dedupKeyOf(&entries[i].a) + k, dup := index[key] + if !dup { + index[key] = i + continue + } + if precedence(entries[i].a.Role) > precedence(entries[k].a.Role) { + pass(k, entries[k].a.Joiner) + entries[k].a.Role = entries[i].a.Role + entries[k].a.Joiner = entries[i].a.Joiner + entries[k].a.Source = entries[i].a.Source + entries[k].list = entries[i].list + } else { + pass(i, entries[i].a.Joiner) + } + entries[i].alive = false + } + out := []Artist{} + for _, e := range entries { + if e.alive { + out = append(out, e.a) + } + } + return out +} + +func joinerText(j *string) string { + if j == nil { + return "" + } + return *j +} + +func artistsEqual(a, b []Artist) bool { + if len(a) != len(b) { + return false + } + for i := range a { + if a[i].Name != b[i].Name || a[i].Role != b[i].Role || a[i].Source != b[i].Source || + joinerText(a[i].Joiner) != joinerText(b[i].Joiner) { + return false + } + } + return true +} + +// randomCredits is n credits over a few names, roles, sources, joiners and lists. +func randomCredits(r *rand.Rand, n, names, lists int) []credit { + roles := []Role{RolePrimary, RoleFeatured, RoleProducer, RoleRemixer} + sources := []Source{SourceArtist, SourceTitle, SourceVersion} + pool := []string{"a", "A", "b", "c", "é", "é", "d", "D ", "f", "g"} + if names > len(pool) { + names = len(pool) + } + out := make([]credit, n) + for i := range out { + var j *string + switch r.Intn(3) { + case 1: + s := "&" + j = &s + case 2: + s := "j" + string(rune('0'+i%10)) + j = &s + } + out[i] = credit{ + name: pool[r.Intn(names)], + role: roles[r.Intn(len(roles))], + joiner: j, + source: sources[r.Intn(len(sources))], + pos: i, + list: r.Intn(lists), + } + } + return out +} + +// TestDedupMatchesThePlainAlgorithm is rust/src/assemble.rs dedup_matches_the_plain_algorithm. +func TestDedupMatchesThePlainAlgorithm(t *testing.T) { + r := rand.New(rand.NewSource(0x2545f491)) + for range 20000 { + credits := randomCredits(r, r.Intn(14), 6, 1+r.Intn(4)) + if got, want := dedupArtists(credits), referenceDedup(credits); !artistsEqual(got, want) { + t.Fatalf("credits %+v\n got %+v\nwant %+v", credits, got, want) + } + } +} + +// TestDedupManyDuplicates compares with the reference on long lists made of thousands of +// duplicates, and checks the near-linear version stays fast where the plain one is quadratic. +func TestDedupManyDuplicates(t *testing.T) { + r := rand.New(rand.NewSource(42)) + for _, shape := range []struct{ n, names, lists int }{ + {3000, 2, 1}, {3000, 3, 2}, {3000, 10, 40}, {4000, 1, 3}, {2000, 5, 1000}, + } { + credits := randomCredits(r, shape.n, shape.names, shape.lists) + if got, want := dedupArtists(credits), referenceDedup(credits); !artistsEqual(got, want) { + t.Fatalf("shape %+v differs", shape) + } + } + credits := randomCredits(r, 200000, 3, 2) + start := time.Now() + out := dedupArtists(credits) + if d := time.Since(start); d > 2*time.Second { + t.Errorf("200,000 credits took %v", d) + } + if len(out) == 0 || len(out) > 6 { + t.Errorf("200,000 credits over 3 names gave %d artists", len(out)) + } +} + +func TestDedupExamples(t *testing.T) { + s := func(v string) *string { return &v } + credits := []credit{ + {name: "Noisia", role: RolePrimary, source: SourceArtist, list: 0}, + {name: "Mefjus", role: RolePrimary, joiner: s("&"), source: SourceArtist, list: 0}, + {name: "noisia", role: RoleFeatured, joiner: s("feat."), source: SourceTitle, list: 1}, + {name: "Alix Perez", role: RoleFeatured, joiner: s("&"), source: SourceTitle, list: 1}, + {name: "Noisia", role: RoleProducer, joiner: s("prod."), source: SourceTitle, list: 2}, + } + got := dedupArtists(credits) + // The featured duplicate of Noisia goes, so Alix Perez inherits feat. (R7.6); the producer + // is its own class (R9.2). + want := []Artist{ + {Name: "Noisia", Role: RolePrimary, Source: SourceArtist}, + {Name: "Mefjus", Role: RolePrimary, Joiner: s("&"), Source: SourceArtist}, + {Name: "Alix Perez", Role: RoleFeatured, Joiner: s("feat."), Source: SourceTitle}, + {Name: "Noisia", Role: RoleProducer, Joiner: s("prod."), Source: SourceTitle}, + } + if !artistsEqual(got, want) { + t.Errorf("got %+v", got) + } + // Role upgrade: a later primary credit lifts an earlier featured one. + up := dedupArtists([]credit{ + {name: "A", role: RoleFeatured, joiner: s("ft."), source: SourceTitle, list: 0}, + {name: "B", role: RoleFeatured, joiner: s("&"), source: SourceTitle, list: 0}, + {name: "a", role: RolePrimary, source: SourceArtist, list: 1}, + }) + wantUp := []Artist{ + {Name: "A", Role: RolePrimary, Source: SourceArtist}, + {Name: "B", Role: RoleFeatured, Joiner: s("ft."), Source: SourceTitle}, + } + if !artistsEqual(up, wantUp) { + t.Errorf("upgrade: got %+v", up) + } + if got := dedupArtists(nil); len(got) != 0 { + t.Errorf("nil: %+v", got) + } +} + +func TestFullTitleOf(t *testing.T) { + vs := []Version{ + {Raw: "VIP", Delimiter: DelimiterParen}, + {Raw: "x", Delimiter: DelimiterSquare}, + {Raw: "y", Delimiter: DelimiterCurly}, + {Raw: "Radio Edit", Delimiter: DelimiterDash}, + } + if got := fullTitleOf("Stigma", vs); got != "Stigma (VIP) [x] {y} - Radio Edit" { + t.Errorf("got %q", got) + } + if got := fullTitleOf("", vs[:1]); got != "(VIP)" { + t.Errorf("got %q", got) + } +} diff --git a/go/artists.go b/go/artists.go new file mode 100644 index 0000000..94d0a68 --- /dev/null +++ b/go/artists.go @@ -0,0 +1,133 @@ +package trackparse + +import ( + "cmp" + "slices" +) + +// R7: the artist side. Port of js/src/artists.ts and rust/src/artists.rs. + +// artistSideResult is what R7 found on the artist side. +type artistSideResult struct { + credits []credit + junk []positionedJunk + years []positionedYear + unknownArtist bool + // explicit and clean are R7.1: artist-side Flag groups. + explicit bool + clean bool +} + +// featMarker is an unbracketed feat marker: its code-point span and its text as written. +type featMarker struct { + start int + end int + marker string +} + +// findFeatMarker is R7.2: the leftmost unbracketed feat marker at or after from, with a space +// (or placeholder) on its left and a space on its right. +func findFeatMarker(s *skel, c *ctx, from int) (featMarker, bool) { + spans := wordSpans(s.text) + words := spanTexts(spans) + for i, span := range spans { + if span.start < from { + continue + } + if b := before(s.text, span.start); b != ' ' && b != ph { + continue + } + m, ok := c.t.featMarkers.matchAt(words, i) + if !ok { + continue + } + lastIndex := i + m.length - 1 + if lastIndex < 0 || lastIndex >= len(spans) { + continue + } + last := spans[lastIndex] + if at(s.text, last.end) != ' ' { + continue + } + return featMarker{ + start: span.start, + end: last.end, + marker: string(sub(s.text, span.start, last.end)), + }, true + } + return featMarker{}, false +} + +// parseArtistSide is R7.1 to R7.5 over an artist-side skeleton. +func parseArtistSide(side *skel, c *ctx) artistSideResult { + var result artistSideResult + removed := map[int]struct{}{} + + // R7.1 + for _, ig := range groupsOf(side) { + g := ig.group + cl := classify(g.inner, site{source: SourceArtist, delimiter: g.open, pos: g.pos}, c) + switch cl.kind { + case classFeat, classProducer: + result.credits = append(result.credits, cl.list.credits...) + result.years = append(result.years, cl.list.years...) + if cl.list.unknown { + result.unknownArtist = true + } + case classFlag: + if cl.flag == flagExplicit { + result.explicit = true + } else { + result.clean = true + } + case classYear: + result.years = append(result.years, positionedYear{year: cl.year, pos: g.pos}) + case classJunk: + result.junk = append(result.junk, positionedJunk{raw: g.inner, kind: cl.junk, pos: g.pos}) + default: + // Versions and unknown groups stay in the names. + continue + } + removed[g.pos] = struct{}{} + } + text := removeGroups(side, removed) + + // R7.2 + feat, hasFeat := findFeatMarker(&text, c, 0) + var main skel + if hasFeat { + head := sliceSkel(&text, 0, feat.start) + main = trimSkel(&head) + } else { + main = trimSkel(&text) + } + mainList := splitCredits(&main, &listOptions{ + role: RolePrimary, + source: SourceArtist, + splitWith: true, + }, c) + result.credits = append(result.credits, mainList.credits...) + result.years = append(result.years, mainList.years...) + if mainList.unknown { + result.unknownArtist = true + } + if hasFeat { + rest := sliceFrom(&text, feat.end) + trimmed := trimSkel(&rest) + marker := feat.marker + featured := splitCredits(&trimmed, &listOptions{ + role: RoleFeatured, + source: SourceArtist, + lead: &marker, + featMarkersJoin: true, + }, c) + result.credits = append(result.credits, featured.credits...) + result.years = append(result.years, featured.years...) + if featured.unknown { + result.unknownArtist = true + } + } + // Stable, like the JS sort. + slices.SortStableFunc(result.credits, func(a, b credit) int { return cmp.Compare(a.pos, b.pos) }) + return result +} diff --git a/go/assemble.go b/go/assemble.go new file mode 100644 index 0000000..c7959a9 --- /dev/null +++ b/go/assemble.go @@ -0,0 +1,241 @@ +package trackparse + +import "strings" + +// R9: assembly and dedup. Port of js/src/assemble.ts and rust/src/assemble.rs. + +// precedence is the R9.2 role order: a later duplicate with a higher one upgrades the kept +// entry. +func precedence(role Role) int { + switch role { + case RolePrimary: + return 2 + case RoleFeatured: + return 1 + } + return 0 +} + +// toArtist is the public form of a credit. +func toArtist(c credit) Artist { + return Artist{Name: c.name, Role: c.role, Joiner: c.joiner, Source: c.source} +} + +// dedupEntry is one credit during R9.2. +type dedupEntry struct { + a Artist + list int + alive bool +} + +// creditLists holds the remaining names of each credit list, so "the list's first remaining +// name" and "the next one" are cheap and dedup stays near-linear (O(n log n)) on inputs with +// thousands of duplicate credits. The JS reference scans the whole list for each duplicate, +// which is quadratic; the output is the same. +// +// Each list is a min-heap of entry indexes with lazy deletion: an index on a heap is a member +// only while its entry is alive and still belongs to that list. An index can sit on a heap more +// than once (an entry that left a list and came back, which R9.2 role upgrades allow); copies +// are popped together. +type creditLists struct { + entries []dedupEntry + heaps map[int][]int +} + +// newCreditLists indexes the lists of entries. +func newCreditLists(entries []dedupEntry) *creditLists { + l := &creditLists{entries: entries, heaps: map[int][]int{}} + for i := range entries { + l.insert(entries[i].list, i) + } + return l +} + +// member reports whether entry x is a remaining name of list. +func (l *creditLists) member(list, x int) bool { + return x >= 0 && x < len(l.entries) && l.entries[x].alive && l.entries[x].list == list +} + +// insert puts entry e on the heap of list. +func (l *creditLists) insert(list, e int) { + h := append(l.heaps[list], e) + // Sift up. + for i := len(h) - 1; i > 0; { + p := (i - 1) / 2 + if h[p] <= h[i] { + break + } + h[p], h[i] = h[i], h[p] + i = p + } + l.heaps[list] = h +} + +// pop removes the smallest index of list's heap. +func (l *creditLists) pop(list int) { + h := l.heaps[list] + n := len(h) + if n == 0 { + return + } + h[0] = h[n-1] + h = h[:n-1] + // Sift down. + for i := 0; ; { + a, b, m := 2*i+1, 2*i+2, i + if a < len(h) && h[a] < h[m] { + m = a + } + if b < len(h) && h[b] < h[m] { + m = b + } + if m == i { + break + } + h[m], h[i] = h[i], h[m] + i = m + } + l.heaps[list] = h +} + +// first is the smallest remaining index of list after dropping stale heap entries, or -1. +func (l *creditLists) first(list int) int { + for { + h := l.heaps[list] + if len(h) == 0 { + return -1 + } + if l.member(list, h[0]) { + return h[0] + } + l.pop(list) + } +} + +// heir is the entry that follows e in list when e is the list's first remaining name, else -1. +// It must only be called when e is about to leave list: it takes e off the heap. +func (l *creditLists) heir(list, e int) int { + if l.first(list) != e { + return -1 + } + for { + h := l.heaps[list] + if len(h) == 0 { + return -1 + } + if x := h[0]; x != e && l.member(list, x) { + return x + } + l.pop(list) + } +} + +// passJoiner is R7.6: entry e leaves its list. If it was the list's first remaining name, the +// next remaining name of that list takes joiner. +func (l *creditLists) passJoiner(e int, joiner *string) { + if e < 0 || e >= len(l.entries) { + return + } + if next := l.heir(l.entries[e].list, e); next >= 0 { + l.entries[next].a.Joiner = joiner + } +} + +// dedupKeyOf is the R9.2 key: producers are a separate credit class, deduped only among +// themselves. +func dedupKeyOf(a *Artist) string { + class := "c:" + if a.Role == RoleProducer { + class = "p:" + } + return class + dedupKey(a.Name) +} + +// dedupArtists is R9.2: keep the first occurrence. A later lower/equal-precedence duplicate is +// removed (R7.6 joiner inheritance); a later higher-precedence duplicate (role upgrade) gives +// the kept entry its role, joiner and source, and the kept entry moves into that occurrence's +// list. +func dedupArtists(credits []credit) []Artist { + entries := make([]dedupEntry, len(credits)) + for i, c := range credits { + entries[i] = dedupEntry{a: toArtist(c), list: c.list, alive: true} + } + lists := newCreditLists(entries) + index := map[string]int{} + for i := range entries { + e := &entries[i] + key := dedupKeyOf(&e.a) + k, dup := index[key] + if !dup { + index[key] = i + continue + } + kept := &entries[k] + if precedence(e.a.Role) > precedence(kept.a.Role) { + lists.passJoiner(k, kept.a.Joiner) + kept.a.Role = e.a.Role + kept.a.Joiner = e.a.Joiner + kept.a.Source = e.a.Source + kept.list = e.list + lists.insert(e.list, k) + } else { + lists.passJoiner(i, e.a.Joiner) + } + e.alive = false + } + out := make([]Artist, 0, len(entries)) + for _, e := range entries { + if e.alive { + out = append(out, e.a) + } + } + return out +} + +// toVersion is the public form of a version draft. Version types are typed strings, so a type +// added through keywords.versionHeads reaches the output as given. +func toVersion(v versionDraft) Version { + artists := make([]Artist, len(v.artists)) + for i, c := range v.artists { + artists[i] = toArtist(c) + } + modifiers := make([]string, len(v.modifiers)) + copy(modifiers, v.modifiers) + return Version{ + Type: v.vtype, + Raw: v.raw, + Artists: artists, + Modifiers: modifiers, + Descriptor: v.descriptor, + Year: v.year, + UnknownArtist: v.unknownArtist, + Delimiter: v.delimiter, + } +} + +// renderVersion is R9.4: a version rendered with its delimiter. +func renderVersion(raw string, delimiter Delimiter) string { + switch delimiter { + case DelimiterParen: + return "(" + raw + ")" + case DelimiterSquare: + return "[" + raw + "]" + case DelimiterCurly: + return "{" + raw + "}" + } + return "- " + raw +} + +// fullTitleOf is R9.4: the title followed by its versions as written, empty pieces skipped. +func fullTitleOf(title string, versions []Version) string { + pieces := make([]string, 0, len(versions)+1) + if title != "" { + pieces = append(pieces, title) + } + for _, v := range versions { + if s := renderVersion(v.Raw, v.Delimiter); s != "" { + pieces = append(pieces, s) + } + } + return strings.Join(pieces, " ") +} diff --git a/go/bench_test.go b/go/bench_test.go new file mode 100644 index 0000000..74c1827 --- /dev/null +++ b/go/bench_test.go @@ -0,0 +1,244 @@ +package trackparse + +// Time ceilings (SPEC invariant 1 and R13.11.2) and benchmarks. +// +// The ceilings are generous on purpose: they catch super-linear blowups, not CI noise. Each +// timing is the best of three runs, and -race (several times slower) widens them. The other +// suites enforce 1 s (JS, Python) and 2 s (Rust) for 10,000 code points, and 3 s / 1 s for +// 10,000 lines (parseTracklist / shift + sort). +// +// go test -run '^$' -bench . -benchmem + +import ( + "fmt" + "strings" + "testing" + "time" +) + +// slowdown widens the ceilings under -race. +func slowdown() time.Duration { + if raceEnabled { + return 10 + } + return 1 +} + +// bestOf3 is the fastest of three runs of f. +func bestOf3(f func()) time.Duration { + best := time.Duration(1<<63 - 1) + for i := 0; i < 3; i++ { + start := time.Now() + f() + if d := time.Since(start); d < best { + best = d + } + } + return best +} + +// repeated is block repeated to exactly n code points. +func repeated(block string, n int) string { + rs := []rune(block) + out := make([]rune, n) + for i := range out { + out[i] = rs[i%len(rs)] + } + return string(out) +} + +// ceilingBlocks are the blocks of the JS suite plus the credit shapes that once made dedup +// quadratic. +var ceilingBlocks = []string{ + "(", "a - ", "A & B, ", "feat. X ", "[Remix] ", "-a", " by x", "\"q\" ", "xxxxxxx", + "prod. A feat. B ", "a by me ", "(x) - ", "Official Video ", "x - Official Video ", "Remix - ", + "a feat. ", "a & ", "(a remix) ", + "Noisia feat. Foreign Beggars - Shellshock (Phace Remix) [Official Video] ", +} + +func TestCeilingTenThousandCodePoints(t *testing.T) { + ceiling := 2 * time.Second * slowdown() + for _, block := range ceilingBlocks { + input := repeated(block, 10_000) + for _, mode := range []Mode{ModeAuto, ModeYouTube, ModeFilename} { + p := NewParser(ParseOptions{Mode: mode}) + if d := bestOf3(func() { p.Parse(input) }); d > ceiling { + t.Errorf("%q in %q: %v (ceiling %v)", block, mode, d, ceiling) + } + } + } +} + +func TestCeilingRepeatedFeatCredits(t *testing.T) { + // 1,250 `a feat. ` credits: 10,000 code points that all dedup to one name (R9.2). + input := strings.Repeat("a feat. ", 1250) + ceiling := 2 * time.Second * slowdown() + if d := bestOf3(func() { Parse(input) }); d > ceiling { + t.Errorf("parse: %v (ceiling %v)", d, ceiling) + } + if d := bestOf3(func() { ParseArtists(input) }); d > ceiling { + t.Errorf("parseArtists: %v (ceiling %v)", d, ceiling) + } +} + +func TestCeilingRepeatedTrailingJunk(t *testing.T) { + input := "A - T " + strings.Repeat("Official Video ", 2666) + track := ParseWith(input, ParseOptions{Mode: ModeYouTube}) + if track.Title != "T" || len(track.Junk) != 2666 { + t.Fatalf("title %q, %d junk", track.Title, len(track.Junk)) + } + ceiling := 2 * time.Second * slowdown() + if d := bestOf3(func() { ParseWith(input, ParseOptions{Mode: ModeYouTube}) }); d > ceiling { + t.Errorf("%v (ceiling %v)", d, ceiling) + } +} + +func TestRepeatedFragmentsScaleBelowQuadratic(t *testing.T) { + // Four times the input: linear work takes about 4 times as long, quadratic work 16 times. + if testing.Short() || raceEnabled { + t.Skip("timing ratios need an optimized, otherwise idle run") + } + for _, block := range []string{"a feat. ", "A feat. a, ", "(feat. a) ", "a & "} { + small, large := repeated(block, 40_000), repeated(block, 160_000) + credits := bestOf3(func() { ParseArtists(large) }).Seconds() / bestOf3(func() { ParseArtists(small) }).Seconds() + track := bestOf3(func() { Parse(large) }).Seconds() / bestOf3(func() { Parse(small) }).Seconds() + t.Logf("%q: ParseArtists x%.1f, Parse x%.1f", block, credits, track) + if credits > 8 || track > 8 { + t.Errorf("%q: 4 times the input takes ParseArtists x%.1f, Parse x%.1f", block, credits, track) + } + } +} + +func hms(s int) string { + return fmt.Sprintf("%02d:%02d:%02d", s/3600, (s%3600)/60, s%60) +} + +// tenThousandLines is the 10,000-line list of the other suites. +func tenThousandLines() string { + lines := make([]string, 10_000) + for i := range lines { + lines[i] = fmt.Sprintf("%s %d Artist %d & Other - Title %d (VIP Mix)", hms((i*37)%7200), i%100, i, i) + } + return strings.Join(lines, "\r\n") +} + +func TestCeilingTenThousandLines(t *testing.T) { + text := tenThousandLines() + if n := len(ParseTracklist(text).Entries); n != 10_000 { + t.Fatalf("%d entries", n) + } + parse := bestOf3(func() { ParseTracklist(text) }) + edits := []Edit{Shift(5), SortByTime()} + edit := bestOf3(func() { ApplyEdits(text, edits) }) + t.Logf("10,000 lines: ParseTracklist %v, shift + sort %v", parse, edit) + if c := 3 * time.Second * slowdown(); parse > c { + t.Errorf("ParseTracklist took %v (ceiling %v)", parse, c) + } + if c := time.Second * slowdown(); edit > c { + t.Errorf("ApplyEdits took %v (ceiling %v)", edit, c) + } +} + +func TestCeilingTwoThousandEdits(t *testing.T) { + // R13.11.2: ApplyEdits costs lines plus edits, not their product. + lines := make([]string, 5000) + for i := range lines { + lines[i] = fmt.Sprintf("%s A %d - T %d", hms(i*30), i, i) + } + text := strings.Join(lines, "\n") + setTimes := make([]Edit, 2000) + inserts := make([]Edit, 2000) + for k := range setTimes { + setTimes[k] = SetTime((k*7)%5000+1, float64(k*10)) + inserts[k] = Insert((k*7)%5000, "00:00 X - Y") + } + if n := len(ApplyEdits(text, setTimes).Changed); n != 2000 { + t.Fatalf("set-time changed %d lines", n) + } + if n := len(ApplyEdits(text, inserts).Changed); n != 2000 { + t.Fatalf("insert changed %d lines", n) + } + set := bestOf3(func() { ApplyEdits(text, setTimes) }) + ins := bestOf3(func() { ApplyEdits(text, inserts) }) + t.Logf("2,000 edits on 5,000 lines: set-time %v, insert %v", set, ins) + c := time.Second * slowdown() + if set > c || ins > c { + t.Errorf("set-time %v, insert %v (ceiling %v)", set, ins, c) + } +} + +// --------------------------------------------------------------------------------------------- +// Benchmarks + +const typicalTrack = "Noisia feat. Foreign Beggars - Shellshock (Phace Remix) [Official Video]" + +func BenchmarkParse(b *testing.B) { + for i := 0; i < b.N; i++ { + Parse(typicalTrack) + } +} + +func BenchmarkParser(b *testing.B) { + p := NewParser(ParseOptions{Mode: ModeYouTube, KnownArtists: []string{"Camo & Krooked"}}) + for i := 0; i < b.N; i++ { + p.Parse(typicalTrack) + } +} + +func BenchmarkParse10k(b *testing.B) { + for _, c := range []struct{ name, block string }{ + {"text", typicalTrack + " "}, + {"feat", "a feat. "}, + {"and", "a & "}, + {"featX", "feat. X "}, + {"remix", "(Remix) "}, + {"hd", "[HD] "}, + {"dash", "- "}, + } { + input := repeated(c.block, 10_000) + b.Run(c.name, func(b *testing.B) { + for i := 0; i < b.N; i++ { + Parse(input) + } + }) + } +} + +// corpusSizedList is a list the size of a podcast episode's: 40 timed lines, a header and a +// marker. +func corpusSizedList() string { + lines := []string{"Tracklist:", "00:00 Intro"} + for i := 1; i <= 40; i++ { + lines = append(lines, fmt.Sprintf("%s %s feat. %s - Title %d (%s Remix)", + hms(i*150), propArtists[i%len(propArtists)], propArtists[(i+3)%len(propArtists)], i, + propRemixers[i%len(propRemixers)])) + } + return strings.Join(lines, "\n") + "\n" +} + +func BenchmarkParseTracklist(b *testing.B) { + for _, c := range []struct{ name, text string }{ + {"corpus-sized", corpusSizedList()}, + {"10k-lines", tenThousandLines()}, + } { + b.Run(c.name, func(b *testing.B) { + for i := 0; i < b.N; i++ { + ParseTracklist(c.text) + } + }) + } +} + +func BenchmarkApplyEdits(b *testing.B) { + edits := []Edit{Shift(5), SortByTime()} + for _, c := range []struct{ name, text string }{ + {"corpus-sized", corpusSizedList()}, + {"10k-lines", tenThousandLines()}, + } { + b.Run(c.name, func(b *testing.B) { + for i := 0; i < b.N; i++ { + ApplyEdits(c.text, edits) + } + }) + } +} diff --git a/go/classify.go b/go/classify.go new file mode 100644 index 0000000..f77190c --- /dev/null +++ b/go/classify.go @@ -0,0 +1,555 @@ +package trackparse + +import "strings" + +// R5: classification of a group's inner text (also used for dash suffixes and pipe segments). +// Port of js/src/classify.ts and rust/src/classify.rs. + +// versionDraft is a version as R5 found it, before R9 orders and assembles it. +type versionDraft struct { + // vtype is a version type name; keywords.versionHeads values pass through as given. + vtype VersionType + raw string + artists []credit + modifiers []string + descriptor *string + year *int + // unknownArtist is set when the credit was an unknown token (R7.5). + unknownArtist bool + delimiter Delimiter + pos int + // ambiguousMix is the R5.7.2 ambiguousMixCredit warning; emitted only when the version is + // used. + ambiguousMix bool + // prefixForm is set when the R5.7.3 prefix form recognized it (R6.2 condition (ii) does not + // apply). + prefixForm bool +} + +// flag is an R5.4 flag. +type flag uint8 + +const ( + flagExplicit flag = iota + flagClean +) + +// classKind is the kind of a classification. +type classKind uint8 + +const ( + classUnknown classKind = iota + classJunk + classFeat + classProducer + classFlag + classYear + classVersions +) + +// classification is the result of R5 (the Rust enum Classification). Only the fields of its +// kind are set. +type classification struct { + kind classKind + // junk is the kind of a classJunk. + junk JunkKind + // list is the credits of a classFeat or classProducer. + list listResult + // flag is the flag of a classFlag. + flag flag + // year is the year of a classYear. + year int + // versions are the versions of a classVersions. + versions []versionDraft +} + +// site is where the classified text sits: credits' source, versions' delimiter, absolute +// offset (UTF-16 units). +type site struct { + source Source + delimiter Delimiter + pos int +} + +var explicitFlags = []string{"explicit", "explicit version", "dirty", "dirty version"} +var cleanFlags = []string{"clean", "clean version", "radio clean"} + +// classify is R5 on inner (already trimmed and whitespace-collapsed). +func classify(inner string, s site, c *ctx) classification { + words := splitWords(inner) + if len(words) == 0 { + return classification{kind: classUnknown} + } + if kind, ok := junkKindOf(words, c); ok { + return classification{kind: classJunk, junk: JunkKind(kind)} + } + if credit, ok := featOrProducer(inner, s, c); ok { + return credit + } + if f, ok := flagOf(words); ok { + return classification{kind: classFlag, flag: f} + } + if len(words) == 1 && isAllDigits(words[0]) { + if year, ok := yearOf(words[0]); ok { + return classification{kind: classYear, year: year} + } + } + versions, ok := multiVersion(inner, s, c) + if !ok { + versions, ok = singleVersion(inner, s, c) + } + if ok { + return classification{kind: classVersions, versions: versions} + } + return classification{kind: classUnknown} +} + +// --------------------------------------------------------------------------------------------- +// R5.1 Junk + +// junkKindOf is R5.1: the junk kind if the whole word list is junk vocabulary. +func junkKindOf(words []string, c *ctx) (string, bool) { + t := c.t + firstKind, found := "", false + i := 0 + for i < len(words) { + w := words[i] + if m, ok := t.junkOrGenre.matchAt(words, i); ok { + if !found { + firstKind, found = m.value, true + } + i += m.length + continue + } + // R5.1: connectors and year words may sit between junk phrases: Official Video 2015. + if _, isYear := yearOf(w); t.junkConnectors.has(w) || t.junkConnectors.has(wordKey(w)) || isYear { + i++ + continue + } + found = false + break + } + // JS truthiness: an empty kind (possible through keywords.junk) does not count. + if found && firstKind != "" { + return firstKind, true + } + if len(words) >= 2 && inVocab(words[len(words)-1], t.labelSuffixes) { + return string(JunkKindLabel), true + } + return "", false +} + +// --------------------------------------------------------------------------------------------- +// R5.2 Feat, R5.3 Producer + +func featOrProducer(inner string, s site, c *ctx) (classification, bool) { + t := c.t + text := []rune(inner) + spans := wordSpans(text) + words := spanTexts(spans) + featLen := 0 + bracketOnly := false + if m, ok := t.featMarkers.matchAt(words, 0); ok { + featLen = m.length + } else if m, ok := t.bracketOnlyFeat.matchAt(words, 0); ok { + featLen, bracketOnly = m.length, true + } + if featLen > 0 && len(words) > featLen { + stop := bracketOnly && featLen < len(words) && inVocab(words[featLen], t.stopwords) + if !stop { + r, ok := creditsAfter(text, spans, featLen, RoleFeatured, s, c) + return classification{kind: classFeat, list: r}, ok + } + } + prod, ok := t.producerMarkers.matchAt(words, 0) + if !ok { + return classification{}, false + } + n := prod.length + if n < len(words) && wordKey(words[n]) == "by" { + n++ + } + if len(words) > n { + r, ok := creditsAfter(text, spans, n, RoleProducer, s, c) + return classification{kind: classProducer, list: r}, ok + } + return classification{}, false +} + +func creditsAfter(inner []rune, spans []wordSpan, markerWords int, role Role, s site, c *ctx) (listResult, bool) { + if len(spans) == 0 || markerWords < 1 || markerWords >= len(spans) { + return listResult{}, false + } + first, lastMarker, firstName := spans[0], spans[markerWords-1], spans[markerWords] + lead := string(sub(inner, first.start, lastMarker.end)) + // Offsets are UTF-16 units (see the scanner). + base := s.pos + 1 + utf16Len(sub(inner, 0, firstName.start)) + opts := listOptions{ + role: role, + source: s.source, + lead: &lead, + splitWith: false, + featMarkersJoin: role == RoleFeatured, + } + return listFromText(tail(inner, firstName.start), base, c, &opts), true +} + +// listFromText splits a plain string (nested brackets protected by a fresh scan) as a credit +// list. +func listFromText(text []rune, base int, c *ctx, opts *listOptions) listResult { + s, _ := scan(text, base) + return splitCredits(&s, opts, c) +} + +// --------------------------------------------------------------------------------------------- +// R5.4 Flag + +func flagOf(words []string) (flag, bool) { + keys := make([]string, len(words)) + for i, w := range words { + keys[i] = wordKey(w) + } + key := strings.Join(keys, " ") + for _, f := range explicitFlags { + if key == f { + return flagExplicit, true + } + } + for _, f := range cleanFlags { + if key == f { + return flagClean, true + } + } + return 0, false +} + +// --------------------------------------------------------------------------------------------- +// R5.6 Multi-version + +// splitMultiParts splits at top-level " / " or "; " (outside nested brackets). +func splitMultiParts(inner []rune) []string { + var parts [][]rune + depth := 0 + start := 0 + for i, ch := range inner { + switch { + case ch == '(' || ch == '[' || ch == '{': + depth++ + case (ch == ')' || ch == ']' || ch == '}') && depth > 0: + depth-- + case depth == 0 && ch == '/' && before(inner, i) == ' ' && at(inner, i+1) == ' ': + parts = append(parts, sub(inner, start, i-1)) + start = i + 2 + case depth == 0 && ch == ';' && at(inner, i+1) == ' ': + parts = append(parts, sub(inner, start, i)) + start = i + 2 + } + } + parts = append(parts, tail(inner, start)) + out := make([]string, len(parts)) + for i, p := range parts { + out[i] = jsTrim(string(p)) + } + return out +} + +func multiVersion(inner string, s site, c *ctx) ([]versionDraft, bool) { + parts := splitMultiParts([]rune(inner)) + if len(parts) < 2 { + return nil, false + } + var out []versionDraft + for _, part := range parts { + if part == "" { + return nil, false + } + vs, ok := singleVersion(part, s, c) + if !ok { + return nil, false + } + out = append(out, vs...) + } + return out, true +} + +// --------------------------------------------------------------------------------------------- +// R5.7 Version + +func singleVersion(raw string, s site, c *ctx) ([]versionDraft, bool) { + text := []rune(raw) + spans := wordSpans(text) + words := spanTexts(spans) + if v, ok := headBy(raw, text, spans, words, s, c); ok { + return []versionDraft{v}, true + } + if v, ok := headScan(raw, words, s, c); ok { + return []versionDraft{v}, true + } + if v, ok := prefixForm(raw, words, s, c); ok { + return []versionDraft{v}, true + } + return nil, false +} + +func baseVersion(raw string, vtype string, s site) versionDraft { + return versionDraft{ + vtype: VersionType(vtype), + raw: raw, + artists: []credit{}, + modifiers: []string{}, + delimiter: s.delimiter, + pos: s.pos, + } +} + +func remixerOpts() listOptions { + return listOptions{role: RoleRemixer, source: SourceVersion} +} + +// dedupRemixers is R9.2 for remixers: deduped within their own version only. +func dedupRemixers(credits []credit) []credit { + seen := map[string]struct{}{} + out := make([]credit, 0, len(credits)) + for _, cr := range credits { + key := dedupKey(cr.name) + if _, dup := seen[key]; dup { + continue + } + seen[key] = struct{}{} + out = append(out, cr) + } + return out +} + +func setCredits(v *versionDraft, text []rune, s site, c *ctx) { + opts := remixerOpts() + r := listFromText(text, s.pos, c, &opts) + v.artists = dedupRemixers(r.credits) + if r.unknown { + v.unknownArtist = true + } + // R7.5: a dropped year-only name sets the version's year if it is still null. + if len(r.years) > 0 && v.year == nil { + y := r.years[0].year + v.year = &y + } +} + +// headBy is R5.7.1: Remix by Skrillex. +func headBy(raw string, text []rune, spans []wordSpan, words []string, s site, c *ctx) (versionDraft, bool) { + head, ok := c.t.heads.matchAt(words, 0) + if !ok || head.length+1 >= len(spans) || head.length >= len(words) { + return versionDraft{}, false + } + by, rest := words[head.length], spans[head.length+1] + if wordKey(by) != "by" { + return versionDraft{}, false + } + v := baseVersion(raw, head.value, s) + setCredits(&v, tail(text, rest.start), s, c) + return v, true +} + +// runItem is one entry of the R5.7.2 modifier run: a run word (info) or a year. +type runItem struct { + start int + end int + info runInfo + year *int +} + +// collectRun walks left from end collecting the modifier run (R5.7.2). +func collectRun(words []string, end int, c *ctx) []runItem { + var items []runItem + j := end + for j > 0 { + if m, ok := c.t.runWords.matchEnding(words, j); ok { + items = append(items, runItem{start: j - m.length, end: j, info: m.value}) + j -= m.length + continue + } + year, ok := yearOf(words[j-1]) + if !ok { + break + } + items = append(items, runItem{start: j - 1, end: j, year: &year}) + j-- + } + for a, b := 0, len(items)-1; a < b; a, b = a+1, b-1 { + items[a], items[b] = items[b], items[a] + } + return items +} + +// truthyName is a JS truthiness test on an optional type name: nil and "" do not count. +func truthyName(s *string) (string, bool) { + if s == nil || *s == "" { + return "", false + } + return *s, true +} + +// headScan is R5.7.2: Extended VIP Mix, Skrillex Remix, Taylor's Version. +func headScan(raw string, words []string, s site, c *ctx) (versionDraft, bool) { + t := c.t + head, ok := t.heads.matchEnding(words, len(words)) + if !ok { + return versionDraft{}, false + } + headType := head.value + headStart := len(words) - head.length + run := collectRun(words, headStart, c) + creditEnd := headStart + if len(run) > 0 { + creditEnd = run[0].start + } + creditWords := words[:creditEnd] + left := len(run) - 1 // -1: no run + + // R5.7.2 type resolution. Generic = canonical type mix/edit/version, any spelling. + generic := t.genericHeadTypes.has(headType) + vtype := headType + typeItem := -1 + viaMix := false + nearestHead := -1 + if generic { + nearestHead = nearestNonGenericHead(run, c) + } + var leftCapable, nearestType string + leftOK, nearestOK := false, false + if left >= 0 { + leftCapable, leftOK = truthyName(run[left].info.typeCapable) + } + if nearestHead >= 0 { + nearestType, nearestOK = truthyName(run[nearestHead].info.head) + } + switch { + case generic && leftOK: + vtype = leftCapable + typeItem = left + case nearestOK: + // 2011 Remastered Version: remaster + vtype = nearestType + typeItem = nearestHead + case headType == "mix" && len(creditWords) > 0: + vtype = "remix" + viaMix = true + } + v := baseVersion(raw, vtype, s) + + var descriptors []string + for i, item := range run { + if item.year != nil { + if v.year == nil { + y := *item.year + v.year = &y + } + continue + } + modifier := item.info.typeCapable + if modifier == nil { + modifier = item.info.descriptor + } + if modifier != nil { + if i != typeItem && !containsString(v.modifiers, *modifier) { + v.modifiers = append(v.modifiers, *modifier) + } + } else if item.info.genre { + descriptors = append(descriptors, strings.Join(words[item.start:item.end], " ")) + } + } + + if len(creditWords) > 0 { + credit := strings.Join(creditWords, " ") + lastWord := asciiLower(creditWords[len(creditWords)-1]) + switch { + case isUnknownToken(credit, t): + v.unknownArtist = true + case vtype == "version" || vtype == "cover" || isAllJunkPhrases(creditWords, c): + // R5.7.2: Japanese Version, Taylor's Version, Adele Cover, Video Edit. + descriptors = append([]string{credit}, descriptors...) + default: + name := []rune(credit) + if strings.HasSuffix(lastWord, "'s") { + name = name[:max(len(name)-2, 0)] + } + setCredits(&v, name, s, c) + if n := len(v.artists); viaMix && n > 0 && len(splitWords(v.artists[n-1].name)) >= 3 { + v.ambiguousMix = true + } + } + } + if len(descriptors) > 0 { + d := strings.Join(descriptors, " ") + v.descriptor = &d + } + return v, true +} + +// containsString reports whether list holds s. +func containsString(list []string, s string) bool { + for _, x := range list { + if x == s { + return true + } + } + return false +} + +// nearestNonGenericHead is R5.7.2 type rule 2: the index of the non-generic head in the run +// nearest the (generic) head, or -1. +func nearestNonGenericHead(run []runItem, c *ctx) int { + for i := len(run) - 1; i >= 0; i-- { + if h := run[i].info.head; h != nil && !c.t.genericHeadTypes.has(*h) { + return i + } + } + return -1 +} + +// isAllJunkPhrases is R5.7.2: the credit span is made entirely of junk phrases (Video in Video +// Edit). +func isAllJunkPhrases(words []string, c *ctx) bool { + i := 0 + for i < len(words) { + m, ok := c.t.junkPhrases.matchAt(words, i) + if !ok { + return false + } + i += m.length + } + return len(words) > 0 +} + +// prefixForm is R5.7.3: Live at Wembley 1986, Remastered 2015, Sped Up. +func prefixForm(raw string, words []string, s site, c *ctx) (versionDraft, bool) { + m, ok := c.t.prefixForms.matchAt(words, 0) + if !ok { + return versionDraft{}, false + } + v := baseVersion(raw, m.value, s) + v.prefixForm = true + var rest []string + for _, w := range tailWords(words, m.length) { + if v.year == nil { + if year, ok := yearOf(w); ok { + v.year = &year + continue + } + } + rest = append(rest, w) + } + if len(rest) > 0 { + d := strings.Join(rest, " ") + v.descriptor = &d + } + return v, true +} + +// tailWords is words[from:], or nil when from is past the end. +func tailWords(words []string, from int) []string { + if from < 0 || from >= len(words) { + return nil + } + return words[from:] +} diff --git a/go/concurrency_test.go b/go/concurrency_test.go new file mode 100644 index 0000000..046be91 --- /dev/null +++ b/go/concurrency_test.go @@ -0,0 +1,110 @@ +package trackparse + +// Concurrent use: a Parser with options, the zero Parser, the package functions, +// ParseTracklistWith and ApplyEdits, called from 16 goroutines at once, must give the same +// bytes as one goroutine calling them in turn. CI runs it under -race (go test -race ./...), +// which also reports any write to shared state. + +import ( + "strings" + "sync" + "testing" +) + +// concurrencyInputs is single-track inputs: fixture inputs when ../spec is there, plus a few +// written here so the test means something in the module zip too. +func concurrencyInputs(limit int) []string { + out := []string{ + "Chase & Status x Camo & Krooked - Track (Alix Perez Rerub)", + "01. Wilkinson ft. Becky Hill & Tom Cane - Afterglow (Sub Focus VIP Remix) [Official Video]", + "Noisia - Stigma (VIP", + "\"Numb\" by Linkin Park", + "07_Burial_-_Archangel.mp3", + "Sub Focus, Wilkinson & Dimension feat. Kojo - Out Now (Extended Mix) [HD]", + } + for _, c := range fixtureCases() { + if len(out) >= limit { + break + } + if c.fn == "parse" || c.fn == "parseArtists" { + out = append(out, c.input) + } + } + return out +} + +func TestConcurrentUse(t *testing.T) { + limit := 2000 + if raceEnabled { + limit = 300 + } + inputs := concurrencyInputs(limit) + parser := NewParser(ParseOptions{ + KnownArtists: []string{"Chase & Status", "Camo & Krooked", "Above & Beyond"}, + SplitAnd: SplitAndAlways, + Keywords: Keywords{ + VersionHeads: []VersionHead{{Key: "rerub", Type: VersionTypeRework}}, + Junk: []JunkPhrase{{Phrase: "out now", Kind: JunkKindPromo}}, + FeatMarkers: []string{"w/"}, + }, + }) + var zero Parser + listOptions := TracklistOptions{ + KnownArtists: []string{"Chase & Status"}, + AudioSeconds: Ptr(3600.0), + MarkerWords: []string{"drop"}, + } + text := strings.Join([]string{ + "Hour 2", + "48:20 Noisia - Stigma", + "52:47 Mefjus & Kasra - Bandwagon (Phace Remix)", + "03:00 Drop", + "59:31 Alix Perez - Fade Away", + "01:07:44 Chase & Status - Baddadan", + "00:11:02 Current Value feat. Teddy Killerz - Payload", + "1:02:03 Hybris - Spinning Top", + }, "\r\n") + edits := []Edit{SetTime(7, 4262), ShiftFrom(45, 2), SortByTime(), Insert(0, "00:00 Intro"), Delete(4)} + + // One run of every call for input i, as JSON. + run := func(i int) []string { + s := inputs[i] + a, b, c := parser.Parse(s), zero.Parse(s), Parse(s) + out := []string{ + string(marshal(&a)), string(marshal(&b)), string(marshal(&c)), + string(marshal(artistList(parser.ParseArtists(s)))), + FormatWith(a, FormatOptions{Feat: FeatTitle, FeatMarker: Ptr("ft.")}), + } + if i%10 == 0 { + list := ParseTracklistWith(text+"\r\n"+s, listOptions) + res := ApplyEdits(text+"\n"+s, edits) + out = append(out, string(marshal(&list)), string(marshal(&res))) + } + return out + } + want := make([][]string, len(inputs)) + for i := range inputs { + want[i] = run(i) + } + + const workers = 16 + var wg sync.WaitGroup + for g := 0; g < workers; g++ { + wg.Add(1) + go func(g int) { + defer wg.Done() + // Each goroutine starts at its own offset, so different inputs run side by side. + for k := range inputs { + i := (k + g*len(inputs)/workers) % len(inputs) + got := run(i) + for j := range got { + if got[j] != want[i][j] { + t.Errorf("goroutine %d, input %q, call %d: got\n%s\nwant\n%s", g, inputs[i], j, got[j], want[i][j]) + return + } + } + } + }(g) + } + wg.Wait() +} diff --git a/go/context.go b/go/context.go new file mode 100644 index 0000000..c540c7e --- /dev/null +++ b/go/context.go @@ -0,0 +1,107 @@ +package trackparse + +import "sync" + +// Per-call parse context (resolved options plus vocabulary tables) and the engine that holds +// what is computed once per Parser. + +// engine is resolved options with the tables and knownArtists keys built once (JS createParser +// and createListParser). It is read-only after newEngine, so it is safe for concurrent use; +// every call makes its own ctx. +type engine struct { + opts resolvedOptions + t *tables + knownKeys wordSet + // knownMaxLen is the longest knownArtists entry, in UTF-16 units. + knownMaxLen int +} + +// newEngine builds the tables and known keys for o. +func newEngine(o resolvedOptions) *engine { + keys, maxLen := knownKeysOf(o.knownArtists) + return &engine{opts: o, t: tablesFor(o.keywords), knownKeys: keys, knownMaxLen: maxLen} +} + +// sharedEngine is the engine behind Parse and ParseArtists without options. +var sharedEngine = sync.OnceValue(func() *engine { return newEngine(resolvedOptions{}) }) + +// ctx is the state of one parse. +type ctx struct { + t *tables + knownKeys wordSet + // knownMaxLen is the longest knownArtists entry, in UTF-16 units (bounds the R7.3a search). + knownMaxLen int + splitAnd splitAndMode + warnings []Warning + // listSeq gives every split credit list an id (R7.6 joiner inheritance across R9.2). + listSeq int +} + +// newCtx is a fresh per-call context. +func (e *engine) newCtx() *ctx { + return &ctx{t: e.t, knownKeys: e.knownKeys, knownMaxLen: e.knownMaxLen, splitAnd: e.opts.splitAnd} +} + +// knownKeysOf is the knownArtists part of a context: the dedup keys and the longest entry in +// UTF-16 units. +func knownKeysOf(known []string) (wordSet, int) { + keys := wordSet{} + maxLen := 0 + for _, k := range known { + if key := dedupKey(k); key != "" { + keys[key] = struct{}{} + } + if n := utf16LenString(k); n > maxLen { + maxLen = n + } + } + return keys, maxLen +} + +// warn adds w once. +func (c *ctx) warn(w Warning) { + for _, x := range c.warnings { + if x == w { + return + } + } + c.warnings = append(c.warnings, w) +} + +// matchKnownAt is R7.3a: the length (in code points) of the longest knownArtists entry +// matching text at start (dedup-key comparison), followed by the end, whitespace, "," or ";" +// (or extra, unless it is noRune: R4.2 also accepts "-", so 3 Doors Down-Kryptonite is +// protected). 0 when none matches. The search window is 2 * longest + 8 UTF-16 units, exactly +// as in the JS reference. +func matchKnownAt(text []rune, start int, c *ctx, extra rune) int { + if len(c.knownKeys) == 0 || start < 0 { + return 0 + } + budget := c.knownMaxLen*2 + 8 + limit, used := start, 0 + for limit < len(text) { + w := 1 + if text[limit] >= 0x10000 { + w = 2 + } + if used+w > budget { + break + } + used += w + limit++ + } + for end := limit; end > start; end-- { + next := at(text, end) + boundary := end == len(text) || next == ',' || next == ';' || isWhitespace(next) || + (extra != noRune && next == extra) + if boundary && c.knownKeys.has(dedupKey(string(sub(text, start, end)))) { + return end - start + } + } + return 0 +} + +// isKnownArtist reports whether text is a knownArtists entry (dedup-key comparison). +func isKnownArtist(text string, c *ctx) bool { + return len(c.knownKeys) > 0 && c.knownKeys.has(dedupKey(text)) +} diff --git a/go/credits.go b/go/credits.go new file mode 100644 index 0000000..a590e15 --- /dev/null +++ b/go/credits.go @@ -0,0 +1,265 @@ +package trackparse + +import "strings" + +// R7.3 to R7.5: splitting a credit list into names. Port of js/src/credits.ts and +// rust/src/credits.rs. + +// credit is an artist credit plus its absolute offset (UTF-16 units), used for ordering (R9.1). +type credit struct { + name string + role Role + joiner *string + source Source + pos int + // list is the id of the credit list it came from (R7.6 joiner inheritance in R9.2). + list int +} + +// positionedYear is a year with its absolute offset (R9.6: the track year is the first in text +// order). +type positionedYear struct { + year int + pos int +} + +// listOptions are how one credit list is split. +type listOptions struct { + role Role + source Source + // lead is the joiner of the first name: nil, or the feat / producer marker as written. + lead *string + // splitWith is R7.3: with splits only in the main list of the artist side. + splitWith bool + // featMarkersJoin is R7.2: later feat markers act as joiners inside a featured list. + featMarkersJoin bool +} + +// listResult is a split credit list. +type listResult struct { + credits []credit + // unknown is R7.5: an unknown token was dropped. + unknown bool + // years are R7.5: dropped year-only names. + years []positionedYear +} + +// joinerHit is a joiner found in a list: its code-point span and its text as written. +type joinerHit struct { + start int + end int + raw string +} + +var andLike = []string{"&", "and", "+"} + +// wordAt is the end of the word that starts at start. +func wordAt(text []rune, start int) int { + end := start + for end < len(text) && !isWhitespace(text[end]) { + end++ + } + return end +} + +// nextWord is the word after a joiner; a tight joiner (, ;) ends it, since the name ends there. +func nextWord(text []rune, from int) string { + a := from + for a < len(text) && isWhitespace(text[a]) { + a++ + } + b := a + for b < len(text) && !isWhitespace(text[b]) && text[b] != ',' && text[b] != ';' { + b++ + } + return string(sub(text, a, b)) +} + +// findJoiner is R7.3b: the leftmost joiner occurrence at or after from, honouring the guards. +func findJoiner(text []rune, from int, splitAtComma bool, opts *listOptions, c *ctx) (joinerHit, bool) { + for p := max(from, 0); p < len(text); p++ { + ch := text[p] + if ch == ',' || ch == ';' { + if ch == ',' && isDigit(before(text, p)) && isDigit(at(text, p+1)) { + continue // 1,000 + } + return joinerHit{start: p, end: p + 1, raw: string(ch)}, true + } + if p == 0 || before(text, p) != ' ' || isWhitespace(ch) { + continue + } + end := wordAt(text, p) + if end >= len(text) || text[end] != ' ' { + continue // spaced joiners need a space after + } + word := string(sub(text, p, end)) + if isSpacedJoiner(word, text, end, splitAtComma, opts, c) { + return joinerHit{start: p, end: end, raw: word}, true + } + } + return joinerHit{}, false +} + +func isSpacedJoiner(word string, text []rune, end int, splitAtComma bool, opts *listOptions, c *ctx) bool { + if opts.featMarkersJoin { + if _, ok := c.t.featMarkers.matchAt([]string{word}, 0); ok { + return true + } + } + for _, j := range c.t.spacedJoiners { + matches := word == j.raw + if !j.caseSensitive { + matches = wordMatches(word, j.raw) + } + if !matches { + continue + } + if j.raw == "with" && !opts.splitWith { + return false + } + if j.isAnd { + if c.splitAnd == splitNever { + return false + } + if c.splitAnd == splitAuto && !splitAtComma { + return false + } + } + if containsString(andLike, j.raw) && inVocab(nextWord(text, end), c.t.noSplitBefore) { + return false + } + return true + } + return false +} + +// cleanName is R7.4: clean one raw name. +func cleanName(raw string) string { + name := []rune(collapseSpaces(raw)) + if n := len(name); n >= 2 { + if first := name[0]; (first == '"' || first == '\'') && name[n-1] == first { + name = []rune(collapseRunes(name[1 : n-1])) + } + } + s := string(name) + for strings.HasSuffix(s, ",") || strings.HasSuffix(s, ";") { + s = jsTrimEnd(s[:len(s)-1]) + } + if space := strings.IndexByte(s, ' '); space > 0 && wordKey(s[:space]) == "by" { + s = s[space+1:] + } + return collapseSpaces(s) +} + +// rawName is a name before the R7.4 / R7.5 drops. +type rawName struct { + name string + joiner *string + pos int +} + +// unwrapList is R7.4: strip one pair of wrapping quotes from the whole list (no other such +// quote inside). +func unwrapList(list *skel) skel { + t := trimSkel(list) + n := len(t.text) + if n < 2 { + return t + } + q := t.text[0] + if (q != '"' && q != '\'') || t.text[n-1] != q { + return t + } + // indexOf(q, 1): the next such quote must be the last character. + next := -1 + for i := 1; i < n; i++ { + if t.text[i] == q { + next = i + break + } + } + if next != n-1 { + return t + } + inner := sliceSkel(&t, 1, n-1) + return trimSkel(&inner) +} + +// splitCredits is R7.3: split input into credits. +func splitCredits(input *skel, opts *listOptions, c *ctx) listResult { + list := unwrapList(input) // R7.4: "Camo & Krooked" + text := list.text + var raw []rawName + joiner := opts.lead + splitAtComma := false + start := 0 + for start <= len(text) { + for start < len(text) && isWhitespace(text[start]) { + start++ + } + known := matchKnownAt(text, start, c, '-') // R7.3a + hit, found := findJoiner(text, start+known, splitAtComma, opts, c) + end := len(text) + if found { + end = hit.start + } + piece := sliceSkel(&list, start, end) + pos := 0 + if start < len(list.pos) { + pos = list.pos[start] + } else if n := len(list.pos); n > 0 { + pos = list.pos[n-1] + } + raw = append(raw, rawName{name: cleanName(renderSkel(&piece)), joiner: joiner, pos: pos}) + joiner = nil + if !found { + break + } + if hit.raw == "," || hit.raw == ";" { + splitAtComma = true // R7.3: and after a tight joiner + } + start = hit.end + j := hit.raw + joiner = &j + } + return finishNames(raw, opts, c) +} + +// finishNames is the R7.4 empty drops and the R7.5 year/unknown drops. R7.6: the first +// survivor takes the lead joiner (nil, or the feat/producer marker). +func finishNames(raw []rawName, opts *listOptions, c *ctx) listResult { + named := make([]rawName, 0, len(raw)) + for _, r := range raw { + if r.name != "" { + named = append(named, r) + } + } + count := len(named) + unknown := false + var years []positionedYear + kept := make([]rawName, 0, len(named)) + for _, r := range named { + if isUnknownToken(r.name, c.t) { + unknown = true + continue + } + if isAllDigits(r.name) && count > 1 { + if year, ok := yearOf(r.name); ok { + years = append(years, positionedYear{year: year, pos: r.pos}) + continue + } + } + kept = append(kept, r) + } + list := c.listSeq + c.listSeq++ + credits := make([]credit, len(kept)) + for i, r := range kept { + j := r.joiner + if i == 0 { + j = opts.lead + } + credits[i] = credit{name: r.name, role: opts.role, joiner: j, source: opts.source, pos: r.pos, list: list} + } + return listResult{credits: credits, unknown: unknown, years: years} +} diff --git a/go/data_gen.go b/go/data_gen.go new file mode 100644 index 0000000..e27255a --- /dev/null +++ b/go/data_gen.go @@ -0,0 +1,526 @@ +// Code generated by go/scripts/gen_data.mjs from spec/data and spec/VERSION. DO NOT EDIT. + +package trackparse + +// SpecVersion is the version of the spec this module implements. +const SpecVersion = "0.5.1" // x-release-please-version + +// dataKV is one entry of a JSON object in spec/data, in file order. +type dataKV struct { + key string + value string +} + +// dataJoiner is one entry of spec/data/joiners.json. +type dataJoiner struct { + raw string + canonical string + kind string + caseSensitive bool +} + +// dataDescriptorsDescriptors is descriptors in spec/data/descriptors.json. +var dataDescriptorsDescriptors = []string{ + "radio", + "extended", + "club", + "original", + "instrumental", + "dub", + "vip", + "acoustic", + "live", + "demo", + "vocal", + "clean", + "dirty", + "explicit", + "short", + "long", + "full", + "album", + "single", + "alternate", + "alt", + "alternative", + "main", + "special", + "bonus", + "deluxe", + "mono", + "stereo", + "new", + "official", + "orchestral", + "piano", + "unplugged", + "12\"", + "7\"", + "12''", + "7''", + "12 inch", + "7 inch", + "re", + "final", + "second", + "2nd", + "3rd", +} + +// dataExtensionsExtensions is extensions in spec/data/extensions.json. +var dataExtensionsExtensions = []string{ + "mp3", + "flac", + "wav", + "m4a", + "ogg", + "opus", + "aac", + "aiff", + "aif", + "wma", + "alac", + "mp4", + "webm", + "mkv", +} + +// dataFeatMarkersMarkers is markers in spec/data/feat-markers.json. +var dataFeatMarkersMarkers = []string{ + "feat.", + "feat", + "ft.", + "ft", + "featuring", + "feat:", + "ft:", +} + +// dataFeatMarkersBracketOnly is bracketOnly in spec/data/feat-markers.json. +var dataFeatMarkersBracketOnly = []string{ + "with", + "w/", +} + +// dataFeatMarkersProducer is producer in spec/data/feat-markers.json. +var dataFeatMarkersProducer = []string{ + "prod.", + "prod", + "produced", + "prod.by", + "prod:", +} + +// dataFeatMarkersTitleMarkers is titleMarkers in spec/data/feat-markers.json. +var dataFeatMarkersTitleMarkers = []string{ + "feat.", + "ft.", + "featuring", +} + +// dataFeatMarkersTitleProducer is titleProducer in spec/data/feat-markers.json. +var dataFeatMarkersTitleProducer = []string{ + "prod.", + "prod. by", + "produced by", + "prod.by", +} + +// dataFeatMarkersProducerBy is producerBy in spec/data/feat-markers.json. +const dataFeatMarkersProducerBy = "by" + +// dataGenresGenres is genres in spec/data/genres.json. +var dataGenresGenres = []string{ + "d'n'b", + "dnb", + "d&b", + "d & b", + "drum & bass", + "drum&bass", + "drum and bass", + "drum n bass", + "drum 'n' bass", + "drum'n'bass", + "neurofunk", + "neuro", + "liquid", + "liquid funk", + "jump up", + "jump-up", + "jungle", + "halftime", + "dancefloor", + "dubstep", + "riddim", + "brostep", + "trap", + "future bass", + "house", + "deep house", + "tech house", + "progressive house", + "electro house", + "techno", + "trance", + "psytrance", + "psy", + "hardstyle", + "hardcore", + "breaks", + "breakbeat", + "garage", + "uk garage", + "ukg", + "2step", + "2-step", + "grime", + "bass", + "bass house", + "edm", + "electronic", + "idm", + "synthwave", + "phonk", + "hip hop", + "hip-hop", + "rap", + "pop", + "rock", + "metal", + "ambient", + "chillout", + "lofi", + "lo-fi", +} + +// dataHeaderWordsWords is words in spec/data/header-words.json. +var dataHeaderWordsWords = []string{ + "tracklist", + "setlist", + "playlist", + "part", + "hour", + "cd", + "disc", + "side", + "chapter", + "segment", + "set", +} + +// dataJoinersSpaced is spaced in spec/data/joiners.json. +var dataJoinersSpaced = []dataJoiner{ + {raw: "&", canonical: "&"}, + {raw: "and", canonical: "&", kind: "and"}, + {raw: "x", canonical: "x", caseSensitive: true}, + {raw: "\u00d7", canonical: "x"}, + {raw: "vs.", canonical: "vs."}, + {raw: "vs", canonical: "vs."}, + {raw: "versus", canonical: "vs."}, + {raw: "/", canonical: "/"}, + {raw: "+", canonical: "+"}, + {raw: "with", canonical: "with"}, + {raw: "meets", canonical: "meets"}, + {raw: "pres.", canonical: "pres."}, + {raw: "presents", canonical: "pres."}, + {raw: "b2b", canonical: "b2b"}, +} + +// dataJoinersTight is tight in spec/data/joiners.json. +var dataJoinersTight = []dataJoiner{ + {raw: ",", canonical: ","}, + {raw: ";", canonical: ","}, +} + +// dataJoinersFeatCanonical is featCanonical in spec/data/joiners.json. +const dataJoinersFeatCanonical = "feat." + +// dataJunkPhrases is phrases in spec/data/junk.json. +var dataJunkPhrases = []dataKV{ + {"official video", "video"}, + {"official music video", "video"}, + {"music video", "video"}, + {"official video clip", "video"}, + {"video clip", "video"}, + {"official clip", "video"}, + {"clip officiel", "video"}, + {"official hd video", "video"}, + {"official 4k video", "video"}, + {"official mv", "video"}, + {"mv", "video"}, + {"m/v", "video"}, + {"video", "video"}, + {"official visualizer", "video"}, + {"official visualiser", "video"}, + {"visualizer", "video"}, + {"visualiser", "video"}, + {"audio visualizer", "video"}, + {"official animated video", "video"}, + {"animated video", "video"}, + {"live video", "video"}, + {"official live video", "video"}, + {"performance video", "video"}, + {"official performance video", "video"}, + {"official audio", "audio"}, + {"audio", "audio"}, + {"audio only", "audio"}, + {"full audio", "audio"}, + {"official lyric video", "lyrics"}, + {"official lyrics video", "lyrics"}, + {"lyric video", "lyrics"}, + {"lyrics video", "lyrics"}, + {"lyrics", "lyrics"}, + {"lyric", "lyrics"}, + {"with lyrics", "lyrics"}, + {"lyrics on screen", "lyrics"}, + {"letra", "lyrics"}, + {"hd", "quality"}, + {"hq", "quality"}, + {"uhd", "quality"}, + {"4k", "quality"}, + {"8k", "quality"}, + {"1080p", "quality"}, + {"720p", "quality"}, + {"480p", "quality"}, + {"high quality", "quality"}, + {"full hd", "quality"}, + {"free download", "promo"}, + {"free dl", "promo"}, + {"out now", "promo"}, + {"premiere", "promo"}, + {"exclusive", "promo"}, + {"preview", "promo"}, + {"teaser", "promo"}, + {"snippet", "promo"}, + {"new song", "promo"}, + {"available now", "promo"}, + {"ncs release", "label"}, + {"monstercat release", "label"}, + {"official", "other"}, +} + +// dataJunkConnectors is connectors in spec/data/junk.json. +var dataJunkConnectors = []string{ + "-", + "|", + "/", + "&", + "+", + ",", +} + +// dataJunkLabelSuffixes is labelSuffixes in spec/data/junk.json. +var dataJunkLabelSuffixes = []string{ + "release", + "records", + "recordings", +} + +// dataLayeredWordsWords is words in spec/data/layered-words.json. +var dataLayeredWordsWords = []string{ + "w/", +} + +// dataMarkerWordsWords is words in spec/data/marker-words.json. +var dataMarkerWordsWords = []string{ + "intro", + "outro", + "break", + "interlude", + "intermission", + "jingle", + "ad", + "advert", + "advertisement", + "talk", + "interview", + "speech", + "announcement", + "shoutout", + "shout-out", + "pause", + "start", + "end", + "silence", + "applause", + "skit", +} + +// dataNoSplitBeforeWords is words in spec/data/no-split-before.json. +var dataNoSplitBeforeWords = []string{ + "sons", + "daughters", + "friends", + "co", + "co.", + "company", + "his", + "her", + "their", + "orchestra", +} + +// dataPlatformSuffixesSuffixes is suffixes in spec/data/platform-suffixes.json. +var dataPlatformSuffixesSuffixes = []string{ + " - YouTube Music", + " - YouTube", + " | Free Listening on SoundCloud", + " - SoundCloud", + " | SoundCloud", + " - Topic", + " | Bandcamp", + " - Bandcamp", +} + +// dataStopwordsWords is words in spec/data/stopwords.json. +var dataStopwordsWords = []string{ + "you", + "me", + "him", + "her", + "us", + "them", + "it", + "i", + "love", + "my", + "your", + "our", + "the", + "a", + "an", + "this", + "that", + "myself", + "yourself", + "everyone", + "everybody", + "somebody", + "someone", + "nobody", + "nothing", + "all", + "night", + "side", + "day", +} + +// dataUnknownTokensCaseSensitive is caseSensitive in spec/data/unknown-tokens.json. +var dataUnknownTokensCaseSensitive = []string{ + "ID", + "IDs", + "ID?", +} + +// dataUnknownTokensCaseInsensitive is caseInsensitive in spec/data/unknown-tokens.json. +var dataUnknownTokensCaseInsensitive = []string{ + "unknown", + "unknown artist", + "unknown title", + "untitled", + "?", + "??", + "???", +} + +// dataVersionKeywordsHeads is heads in spec/data/version-keywords.json. +var dataVersionKeywordsHeads = []dataKV{ + {"remix", "remix"}, + {"rmx", "remix"}, + {"mix", "mix"}, + {"bootleg", "bootleg"}, + {"vip", "vip"}, + {"edit", "edit"}, + {"re-edit", "edit"}, + {"reedit", "edit"}, + {"flip", "flip"}, + {"refix", "refix"}, + {"rework", "rework"}, + {"re-work", "rework"}, + {"mashup", "mashup"}, + {"mash-up", "mashup"}, + {"mash up", "mashup"}, + {"blend", "blend"}, + {"dub", "dub"}, + {"version", "version"}, + {"ver", "version"}, + {"remaster", "remaster"}, + {"remastered", "remaster"}, + {"cover", "cover"}, + {"reprise", "reprise"}, +} + +// dataVersionKeywordsGenericHeads is genericHeads in spec/data/version-keywords.json. +var dataVersionKeywordsGenericHeads = []string{ + "mix", + "edit", + "version", +} + +// dataVersionKeywordsTypeCapableModifiers is typeCapableModifiers in spec/data/version-keywords.json. +var dataVersionKeywordsTypeCapableModifiers = []dataKV{ + {"radio", "radio"}, + {"extended", "extended"}, + {"club", "club"}, + {"original", "original"}, + {"instrumental", "instrumental"}, + {"dub", "dub"}, + {"vip", "vip"}, + {"acoustic", "acoustic"}, + {"live", "live"}, + {"acapella", "acapella"}, + {"a cappella", "acapella"}, + {"a capella", "acapella"}, + {"acappella", "acapella"}, + {"demo", "demo"}, +} + +// dataVersionKeywordsPrefixForms is prefixForms in spec/data/version-keywords.json. +var dataVersionKeywordsPrefixForms = []dataKV{ + {"live", "live"}, + {"remastered", "remaster"}, + {"remaster", "remaster"}, + {"acoustic", "acoustic"}, + {"instrumental", "instrumental"}, + {"acapella", "acapella"}, + {"a cappella", "acapella"}, + {"demo", "demo"}, + {"sped up", "spedUp"}, + {"speed up", "spedUp"}, + {"slowed + reverb", "slowed"}, + {"slowed & reverb", "slowed"}, + {"slowed and reverb", "slowed"}, + {"slowed", "slowed"}, + {"nightcore", "nightcore"}, +} + +// dataVersionKeywordsTypes is types in spec/data/version-keywords.json. +var dataVersionKeywordsTypes = []string{ + "remix", + "bootleg", + "vip", + "edit", + "flip", + "refix", + "rework", + "mashup", + "blend", + "dub", + "mix", + "extended", + "radio", + "club", + "original", + "instrumental", + "acapella", + "live", + "acoustic", + "remaster", + "demo", + "reprise", + "cover", + "version", + "spedUp", + "slowed", + "nightcore", +} diff --git a/go/digits.go b/go/digits.go new file mode 100644 index 0000000..678f047 --- /dev/null +++ b/go/digits.go @@ -0,0 +1,40 @@ +package trackparse + +// ASCII digit scanning shared by R4.1 (prefix.go) and the tracklist time scanner (R13.2). + +// digitRun is the length of the run of ASCII digits starting at from. +func digitRun(s []rune, from int) int { + i := from + for isDigit(at(s, i)) { + i++ + } + return i - from +} + +// digitsValue is the value of a run of ASCII digits, saturating at a large bound (callers pass +// at most a few digits). Other code points count as 0. +func digitsValue(s []rune) int { + const limit = 1 << 40 + n := 0 + for _, r := range s { + d := 0 + if isDigit(r) { + d = int(r - '0') + } + n = n*10 + d + if n > limit { + n = limit + } + } + return n +} + +// twoDigitsUpTo59 is the value of exactly two digits at i (not followed by a third) when it is +// at most 59. +func twoDigitsUpTo59(s []rune, i int) (int, bool) { + if !isDigit(at(s, i)) || !isDigit(at(s, i+1)) || isDigit(at(s, i+2)) { + return 0, false + } + n := digitsValue(sub(s, i, i+2)) + return n, n <= 59 +} diff --git a/go/doc.go b/go/doc.go new file mode 100644 index 0000000..979ab5c --- /dev/null +++ b/go/doc.go @@ -0,0 +1,54 @@ +// Package trackparse parses music track strings ("Artist feat. Guest - Title (Remix)") and +// whole tracklists into structured data: artists with roles, the title, versions and remixes, +// junk such as "[Official Video]", positions and timestamps. Everything it recognizes goes into +// a field, and anything it does not recognize stays in the title, word for word. +// +// track := trackparse.Parse( +// "01. Wilkinson ft. Becky Hill & Tom Cane - Afterglow (Sub Focus VIP Remix) [Official Video]", +// ) +// track.Artists[1].Name, track.Artists[1].Role // "Becky Hill", RoleFeatured +// track.Title // "Afterglow" +// track.Versions[0].Type // VersionTypeRemix +// track.Versions[0].Artists[0].Name // "Sub Focus" +// track.Junk[0].Raw, track.Junk[0].Kind // "Official Video", JunkKindVideo +// track.Position.Number // 1 +// +// # Functions +// +// [Parse] parses one track string, [ParseArtists] a bare artist credit, [Format] renders a +// track back to a string, [Normalize] is the Unicode cleanup every function runs first, and +// [AllArtists] lists the credits together with the remixers. [ParseTracklist] reads a whole +// tracklist, one entry per line, and checks its times; [ApplyEdits] rewrites only the lines its +// edits name. The functions that take options have a With form ([ParseWith], [FormatWith], +// [ParseTracklistWith], ...); the zero value of every options struct is the default. A +// [Parser] compiles parse options once for many calls. +// +// # Results and JSON +// +// Fields that are null in the spec's JSON are pointers, nil when absent, and slices in a result +// are never nil. Version types, junk kinds, warnings and the other names are typed string +// constants whose value is the spec's name; a function per type, such as [AllVersionTypes], +// lists them. Every result type has a MarshalJSON method that returns the bytes JSON.stringify +// writes in the JavaScript package (json.Marshal then escapes <, > and &; see the README), and +// [Track.UnmarshalJSON] reads that form back. +// +// # Errors and concurrency +// +// Nothing panics, and no parsing or editing function returns an error: any string gives a +// complete result. Invalid UTF-8 is read as the WHATWG decoder reads it, each maximal +// ill-formed subsequence becoming one U+FFFD, so every output string is valid UTF-8. An edit +// that cannot be applied is reported as an [EditWarningCodeEditInvalid] warning. The package +// functions and a [Parser] are safe for concurrent use. +// +// # Spec and other languages +// +// This is the Go port of a spec-driven parser. The JavaScript (npm), Python (PyPI), Rust +// (crates.io) and Go packages implement one spec, pass the same shared fixtures, give the same +// output on every fixture input, and are released together under one version number +// ([SpecVersion]). Comments in the source cite the spec's rule IDs (R0 to R13). +// +// - Documentation, with every example in all four languages: https://4matic.github.io/trackparse/ +// - Playground: https://4matic.github.io/trackparse/playground/ +// - Spec: https://github.com/4matic/trackparse/blob/main/spec/SPEC.md +// - Repository and README: https://github.com/4matic/trackparse/tree/main/go +package trackparse diff --git a/go/example_test.go b/go/example_test.go new file mode 100644 index 0000000..919a157 --- /dev/null +++ b/go/example_test.go @@ -0,0 +1,319 @@ +package trackparse_test + +import ( + "bytes" + "encoding/json" + "fmt" + "strings" + + trackparse "github.com/4matic/trackparse/go" +) + +// Parse a messy track string: every part it recognizes goes into a field, and anything it does +// not recognize stays in the title. +func Example() { + track := trackparse.Parse( + "01. Wilkinson ft. Becky Hill & Tom Cane - Afterglow (Sub Focus VIP Remix) [Official Video]", + ) + + for _, a := range track.Artists { + fmt.Printf("%s (%s)\n", a.Name, a.Role) + } + fmt.Println(track.Title) + fmt.Println(track.FullTitle) + v := track.Versions[0] + fmt.Println(v.Type, v.Artists[0].Name, v.Modifiers) + fmt.Println(track.Junk[0].Raw, track.Junk[0].Kind) + fmt.Println(track.Position.Number, track.Mode) + + fmt.Println(trackparse.FormatWith(track, trackparse.FormatOptions{ + Joiners: trackparse.JoinersCanonical, + })) + // Output: + // Wilkinson (primary) + // Becky Hill (featured) + // Tom Cane (featured) + // Afterglow + // Afterglow (Sub Focus VIP Remix) + // remix Sub Focus [vip] + // Official Video video + // 1 youtube + // Wilkinson feat. Becky Hill & Tom Cane - Afterglow (Sub Focus VIP Remix) +} + +func ExampleParse() { + track := trackparse.Parse("Queen - Bohemian Rhapsody (Live at Wembley 1986)") + + v := track.Versions[0] + fmt.Println(track.Artists[0].Name, "/", track.Title) + fmt.Println(v.Type, v.Raw, v.Delimiter) + fmt.Println(*v.Descriptor, *v.Year) + fmt.Println(track.Year == nil, len(track.Warnings)) + // Output: + // Queen / Bohemian Rhapsody + // live Live at Wembley 1986 ( + // at Wembley 1986 + // true 0 +} + +func ExampleParseWith() { + names := func(t trackparse.Track) []string { + var out []string + for _, a := range t.Artists { + out = append(out, a.Name) + } + return out + } + + fmt.Println(names(trackparse.Parse("Chase & Status - Baddadan"))) + fmt.Println(names(trackparse.ParseWith("Chase & Status - Baddadan", trackparse.ParseOptions{ + KnownArtists: []string{"Chase & Status"}, + }))) + + track := trackparse.ParseWith(`"Numb" by Linkin Park`, trackparse.ParseOptions{ + Mode: trackparse.ModeYouTube, + }) + fmt.Println(names(track), track.Title, track.Warnings) + + track = trackparse.ParseWith("Shelter", trackparse.ParseOptions{ + Mode: trackparse.ModeYouTube, + Uploader: "Porter Robinson", + }) + fmt.Println(names(track), track.Title) + // Output: + // [Chase Status] + // [Chase & Status] + // [Linkin Park] Numb [bySplit] + // [Porter Robinson] Shelter +} + +// Keywords add words to the built-in lists. +func ExampleParseWith_keywords() { + fmt.Println(trackparse.Parse("Artist - Song [Some Label Rip]").Title) + + track := trackparse.ParseWith("Artist - Song [Some Label Rip]", trackparse.ParseOptions{ + Keywords: trackparse.Keywords{ + Junk: []trackparse.JunkPhrase{{Phrase: "some label rip", Kind: trackparse.JunkKindLabel}}, + }, + }) + fmt.Println(track.Title) + fmt.Println(track.Junk[0].Raw, track.Junk[0].Kind) + // Output: + // Song [Some Label Rip] + // Song + // Some Label Rip label +} + +func ExampleParseArtists() { + for _, a := range trackparse.ParseArtists("Sub Focus, Wilkinson & Dimension feat. Kojo") { + joiner := "" + if a.Joiner != nil { + joiner = *a.Joiner + } + fmt.Printf("%s:%s joiner=%s\n", a.Name, a.Role, joiner) + } + // Output: + // Sub Focus:primary joiner= + // Wilkinson:primary joiner=, + // Dimension:primary joiner=& + // Kojo:featured joiner=feat. +} + +func ExampleFormatWith() { + track := trackparse.Parse("01. Wilkinson ft. Becky Hill - Afterglow (Sub Focus Remix)") + + fmt.Println(trackparse.Format(track)) + fmt.Println(trackparse.FormatWith(track, trackparse.FormatOptions{ + Feat: trackparse.FeatTitle, + Joiners: trackparse.JoinersCanonical, + })) + fmt.Println(trackparse.FormatWith(track, trackparse.FormatOptions{ + Feat: trackparse.FeatOmit, + Versions: trackparse.VersionsNone, + })) + fmt.Println(trackparse.FormatWith(track, trackparse.FormatOptions{Position: true})) + // Output: + // Wilkinson ft. Becky Hill - Afterglow (Sub Focus Remix) + // Wilkinson - Afterglow (feat. Becky Hill) (Sub Focus Remix) + // Wilkinson - Afterglow + // 01. Wilkinson ft. Becky Hill - Afterglow (Sub Focus Remix) +} + +func ExampleNormalize() { + fmt.Println(trackparse.Normalize("Noisia\u200b – Stigma (VIP)")) + // Output: + // Noisia - Stigma (VIP) +} + +func ExampleAllArtists() { + track := trackparse.Parse("Wilkinson ft. Becky Hill - Afterglow (Sub Focus Remix)") + for _, a := range trackparse.AllArtists(track) { + fmt.Printf("%s:%s\n", a.Name, a.Role) + } + // Output: + // Wilkinson:primary + // Becky Hill:featured + // Sub Focus:remixer +} + +func ExampleParseTracklist() { + text := strings.Join([]string{ + "Hour 2", + "48:20 Noisia - Stigma", + "52:47 Mefjus & Kasra - Bandwagon (Phace Remix)", + "56:05 Black Sun Empire - ID", + "59:31 Alix Perez - Fade Away", + "01:03:10 Interview with Hybris", + "01:07:44 Imanu - Sacrifice", + "00:11:02 Current Value feat. Teddy Killerz - Payload", // typo for 01:11:02 + "01:15:36 Hybris - Spinning Top", + }, "\r\n") + + list := trackparse.ParseTracklist(text) + + var joined strings.Builder + var kinds []trackparse.EntryKind + for _, e := range list.Entries { + joined.WriteString(e.Raw + string(e.Eol)) + kinds = append(kinds, e.Kind) + } + fmt.Println(joined.String() == text) + fmt.Println(kinds) + + e := list.Entries[2] + fmt.Println(e.Time.Raw, e.Time.Seconds) + fmt.Printf("%q\n", e.Parts.Rest) + fmt.Println(len(e.Track.Artists), e.Track.Title, e.Track.Versions[0].Type) + fmt.Println(list.Entries[3].Track.Flags.UnknownTitle) + + for _, w := range list.Warnings { + fmt.Println(w.Code, w.Line, w.Severity) + if s := w.Suggestion; s != nil { + fmt.Println(" suggestion:", s.Line, s.Raw, s.Seconds) + } + } + s := list.Stats + fmt.Println(s.Lines, s.Tracks, s.Markers, s.Timed, *s.FirstTime, *s.LastTime) + // Output: + // true + // [header track track track track marker track track track] + // 52:47 3167 + // "Mefjus & Kasra - Bandwagon (Phace Remix)" + // 2 Bandwagon remix + // true + // no-start-at-zero 2 info + // time-out-of-order 8 warning + // suggestion: 8 01:11:02 4262 + // 9 7 1 8 2900 4536 +} + +func ExampleParseTracklistWith() { + list := trackparse.ParseTracklistWith("00:00 A - B\n1:02:03 C - D", trackparse.TracklistOptions{ + AudioSeconds: trackparse.Ptr(3600.0), + }) + fmt.Println(list.Warnings[0].Code, list.Warnings[0].Line) + // Output: + // time-after-audio-end 2 +} + +func ExampleApplyEdits() { + text := "48:20 Noisia - Stigma\r\n59:31 Alix Perez - Fade Away\r\n00:03:10 Imanu - Sacrifice\r\n" + + result := trackparse.ApplyEdits(text, []trackparse.Edit{ + trackparse.SetTime(3, 3790), + trackparse.ShiftFrom(45, 2), + }) + fmt.Printf("%q\n", result.Text) + fmt.Println(result.Changed) + w := result.Warnings[0] + fmt.Println(w.Code, w.Edit, *w.Line) + + result = trackparse.ApplyEdits(text, []trackparse.Edit{trackparse.ShiftLines(-3000, 1)}) + fmt.Println(result.Warnings[0].Code) + + result = trackparse.ApplyEdits(text, []trackparse.Edit{trackparse.Delete(9)}) + fmt.Println(result.Warnings[0].Code, result.Text == text) + // Output: + // "48:20 Noisia - Stigma\r\n01:00:16 Alix Perez - Fade Away\r\n01:03:55 Imanu - Sacrifice\r\n" + // [2 3] + // style-upgraded 1 2 + // time-clamped + // edit-invalid true +} + +func ExampleParser() { + parser := trackparse.NewParser(trackparse.ParseOptions{ + KnownArtists: []string{"Chase & Status", "Camo & Krooked"}, + Keywords: trackparse.Keywords{ + VersionHeads: []trackparse.VersionHead{{Key: "rerub", Type: trackparse.VersionTypeRework}}, + }, + }) + + track := parser.Parse("Chase & Status x Camo & Krooked - Track (Alix Perez Rerub)") + fmt.Println(len(track.Artists), track.Artists[0].Name, track.Artists[1].Name) + fmt.Println(track.Versions[0].Type) + + // The zero Parser uses the default options. + var plain trackparse.Parser + fmt.Println(len(plain.Parse("Chase & Status - Baddadan").Artists)) + // Output: + // 2 Chase & Status Camo & Krooked + // rework + // 2 +} + +func ExampleTrack_MarshalJSON() { + track := trackparse.Parse("Wilkinson ft. Becky Hill - Afterglow (Sub Focus VIP Remix) [HD]") + b, err := json.Marshal(track) + if err != nil { + panic(err) + } + fmt.Println(string(b)) + + var back trackparse.Track + if err := json.Unmarshal(b, &back); err != nil { + panic(err) + } + fmt.Println(back.FullTitle, back.Versions[0].Artists[0].Name) + // Output: + // {"input":"Wilkinson ft. Becky Hill - Afterglow (Sub Focus VIP Remix) [HD]","mode":"youtube","position":null,"timestamp":null,"artists":[{"name":"Wilkinson","role":"primary","joiner":null,"source":"artist"},{"name":"Becky Hill","role":"featured","joiner":"ft.","source":"artist"}],"title":"Afterglow","fullTitle":"Afterglow (Sub Focus VIP Remix)","versions":[{"type":"remix","raw":"Sub Focus VIP Remix","artists":[{"name":"Sub Focus","role":"remixer","joiner":null,"source":"version"}],"modifiers":["vip"],"descriptor":null,"year":null,"unknownArtist":false,"delimiter":"("}],"year":null,"flags":{"explicit":false,"clean":false,"unknownArtist":false,"unknownTitle":false},"junk":[{"raw":"HD","kind":"quality"}],"warnings":[]} + // Afterglow (Sub Focus VIP Remix) Sub Focus +} + +// encoding/json escapes <, > and & (and U+2028, U+2029) in what MarshalJSON returns. An +// Encoder with SetEscapeHTML(false) keeps the bytes JSON.stringify writes. +func ExampleTrack_MarshalJSON_escapeHTML() { + track := trackparse.Parse("Chase & Status - Baddadan") + + b, _ := json.Marshal(track.Artists[1]) + fmt.Println(string(b)) + + var buf bytes.Buffer + enc := json.NewEncoder(&buf) + enc.SetEscapeHTML(false) + _ = enc.Encode(track.Artists[1]) + fmt.Print(buf.String()) + + b, _ = track.Artists[1].MarshalJSON() + fmt.Println(string(b)) + // Output: + // {"name":"Status","role":"primary","joiner":"\u0026","source":"artist"} + // {"name":"Status","role":"primary","joiner":"&","source":"artist"} + // {"name":"Status","role":"primary","joiner":"&","source":"artist"} +} + +func ExamplePtr() { + // A pointer to 0 is an audio of length 0, as audioSeconds: 0 in JavaScript. + list := trackparse.ParseTracklistWith("00:00 A - B\n00:30 C - D", trackparse.TracklistOptions{ + AudioSeconds: trackparse.Ptr(0.0), + }) + for _, w := range list.Warnings { + fmt.Println(w.Code, w.Line) + } + + track := trackparse.Parse("Wilkinson ft. Becky Hill - Afterglow") + fmt.Println(trackparse.FormatWith(track, trackparse.FormatOptions{FeatMarker: trackparse.Ptr("with")})) + // Output: + // time-after-audio-end 2 + // Wilkinson with Becky Hill - Afterglow +} diff --git a/go/fixtures_test.go b/go/fixtures_test.go new file mode 100644 index 0000000..3b75bd9 --- /dev/null +++ b/go/fixtures_test.go @@ -0,0 +1,295 @@ +package trackparse + +// Runs every shared fixture in ../spec/fixtures through the JSON door (wireCall), as +// rust/tests/fixtures.rs does. +// +// - Matching follows spec/fixtures/README.md (match_test.go); status pass / xfail / ambiguous. +// - Every output is validated against spec/schema (schema_test.go). +// - testdata/skip.json lists port-specific known failures by case id; a listed case that +// passes fails the run, so the list can only shrink. +// - TRACKPARSE_REPORT=1 prints the pass rate per file and per rule instead of failing (the +// conformance report): TRACKPARSE_REPORT=1 go test -run TestFixtures -v +// - TRACKPARSE_ONLY= runs the cases whose file name or id contains the text. +// - TRACKPARSE_ALLOW_FAIL=1 logs the failures but keeps the test green (a local opt-in for +// work in progress; CI never sets it, so by default any failing case fails the test). +// +// The test is skipped when ../spec is absent (the module zip has no spec). + +import ( + "fmt" + "os" + "path/filepath" + "slices" + "strings" + "testing" +) + +const specDir = "../spec" + +// fixtureFiles lists the .json files under dir, sorted, recursively. +func fixtureFiles(t *testing.T, dir string) []string { + t.Helper() + var out []string + err := filepath.WalkDir(dir, func(path string, d os.DirEntry, err error) error { + if err != nil { + return err + } + if !d.IsDir() && strings.HasSuffix(path, ".json") { + out = append(out, path) + } + return nil + }) + if err != nil { + t.Fatal(err) + } + slices.Sort(out) + return out +} + +func readJSONFile(t *testing.T, path string) jsonValue { + t.Helper() + text, err := os.ReadFile(path) + if err != nil { + t.Fatal(err) + } + v, err := parseJSON(text) + if err != nil { + t.Fatalf("%s: %v", path, err) + } + return v +} + +// merged is {...defaults[key], ...c[key]} (shallow). +func merged(defaults, c jsonValue, key string) jsonValue { + out := jsonValue{kind: jsonObject} + for _, src := range []jsonValue{defaults, c} { + v, ok := src.get(key) + if !ok || v.kind != jsonObject { + continue + } + for _, m := range v.obj { + replaced := false + for i := range out.obj { + if out.obj[i].key == m.key { + out.obj[i].val = m.val + replaced = true + } + } + if !replaced { + out.obj = append(out.obj, m) + } + } + } + return out +} + +// checkSchema validates one output by fn; "" when valid. +func checkSchema(s *schemaSet, fn string, out jsonValue) string { + switch fn { + case "parse": + return s.validateAt("parsed-track.schema.json", "", out) + case "parseArtists": + if out.kind != jsonArray { + return "parseArtists: not an array" + } + for _, a := range out.arr { + if d := s.validateAt("parsed-track.schema.json", "#/$defs/artist", a); d != "" { + return d + } + } + case "format", "normalize": + if out.kind != jsonString { + return fn + ": not a string" + } + case "parseTracklist": + return s.validateAt("tracklist.schema.json", "", out) + case "applyEdits": + return s.validateAt("tracklist.schema.json", "#/$defs/editResult", out) + } + return "" +} + +// runFixture runs one case; "" when it behaves as its status demands. +func runFixture(s *schemaSet, file, c jsonValue) (problem string) { + defaults, _ := file.get("defaults") + fn, ok := c.getString("fn") + if !ok { + if fn, ok = defaults.getString("fn"); !ok { + fn = "parse" + } + } + input, _ := c.getString("input") + edits, ok := c.get("edits") + if !ok { + edits = jArr(nil) + } + var out []byte + func() { + defer func() { + if r := recover(); r != nil { + problem = fmt.Sprintf("panicked: %v", r) + } + }() + out = wireCall(fn, input, merged(defaults, c, "options"), merged(defaults, c, "formatOptions"), edits) + }() + if problem != "" { + return problem + } + actual, err := parseJSON(out) + if err != nil { + return "the module wrote invalid JSON: " + string(out) + } + if d := checkSchema(s, fn, actual); d != "" { + return "output violates the schema: " + d + } + + status, _ := c.getString("status") + matchMode, _ := c.getString("match") + exact := matchMode == "exact" + var mismatch string + if status == "ambiguous" { + alts, _ := c.get("expectedAny") + var diffs []string + for _, e := range alts.arr { + d := matches(e, actual, exact) + if d == "" { + diffs = nil + break + } + diffs = append(diffs, d) + } + if len(diffs) > 0 || len(alts.arr) == 0 { + mismatch = "no expectedAny entry matched: " + strings.Join(diffs, "; ") + } + } else { + expected, _ := c.get("expected") + mismatch = matches(expected, actual, exact) + } + if status == "xfail" { + if mismatch == "" { + return "xfail case unexpectedly passes" + } + return "" + } + return mismatch +} + +type ruleCount struct{ total, ok int } + +func TestFixtures(t *testing.T) { + fixturesDir := filepath.Join(specDir, "fixtures") + if _, err := os.Stat(fixturesDir); err != nil { + t.Skip("../spec/fixtures not found (the module zip has no spec)") + } + schemas, err := loadSchemas(filepath.Join(specDir, "schema")) + if err != nil { + t.Fatal(err) + } + report := os.Getenv("TRACKPARSE_REPORT") != "" + allowFail := os.Getenv("TRACKPARSE_ALLOW_FAIL") != "" + only := os.Getenv("TRACKPARSE_ONLY") + skip := readJSONFile(t, filepath.Join("testdata", "skip.json")) + if skip.kind != jsonObject { + t.Fatal("testdata/skip.json is not an object") + } + + var failures []string + type fileCount struct { + name string + ok, total int + } + var perFile []fileCount + perRule := map[string]*ruleCount{} + total, passed := 0, 0 + + for _, path := range fixtureFiles(t, fixturesDir) { + data := readJSONFile(t, path) + cases, ok := data.get("cases") + if !ok || cases.kind != jsonArray { + continue // metadata such as generated/summary.json + } + name, _ := filepath.Rel(fixturesDir, path) + name = filepath.ToSlash(name) + n, good := 0, 0 + for _, c := range cases.arr { + id, _ := c.getString("id") + if only != "" && !strings.Contains(name, only) && !strings.Contains(id, only) { + continue + } + problem := runFixture(schemas, data, c) + if reason, listed := skip.getString(id); listed { + if problem == "" { + problem = "skip-listed (" + reason + ") but now passes: remove it from testdata/skip.json" + } else { + problem = "" + } + } + n++ + if problem == "" { + good++ + } + rules, _ := c.get("rules") + for _, r := range rules.arr { + rc := perRule[r.str] + if rc == nil { + rc = &ruleCount{} + perRule[r.str] = rc + } + rc.total++ + if problem == "" { + rc.ok++ + } + } + if problem != "" && len(failures) < 40 { + in, _ := c.get("input") + failures = append(failures, fmt.Sprintf("%s\n input: %s\n %s", id, show(in), problem)) + } + } + total += n + passed += good + perFile = append(perFile, fileCount{name, good, n}) + } + + if report { + var b strings.Builder + fmt.Fprintf(&b, "\nconformance: %d / %d\n", passed, total) + for _, f := range perFile { + mark := "" + if f.ok != f.total { + mark = " <--" + } + fmt.Fprintf(&b, " %5d / %-5d %s%s\n", f.ok, f.total, f.name, mark) + } + b.WriteString("by rule (failing only):\n") + rules := make([]string, 0, len(perRule)) + for r := range perRule { + rules = append(rules, r) + } + slices.Sort(rules) + for _, r := range rules { + if rc := perRule[r]; rc.ok != rc.total { + fmt.Fprintf(&b, " %-10s %d / %d\n", r, rc.ok, rc.total) + } + } + for i, f := range failures { + if i == 15 { + break + } + fmt.Fprintf(&b, "\n%s\n", f) + } + t.Log(b.String()) + return + } + if total == 0 { + t.Fatal("no fixtures found") + } + if passed != total { + msg := fmt.Sprintf("%d of %d fixture cases fail; first ones:\n\n%s", total-passed, total, + strings.Join(failures, "\n\n")) + if allowFail { + t.Logf("TRACKPARSE_ALLOW_FAIL: %d / %d pass", passed, total) + return + } + t.Fatal(msg) + } +} diff --git a/go/format.go b/go/format.go new file mode 100644 index 0000000..97d73f0 --- /dev/null +++ b/go/format.go @@ -0,0 +1,190 @@ +package trackparse + +import "strings" + +// R11: render a parsed track back to a string. Port of js/src/format.ts and rust/src/format.rs. +// R11 always reads the default tables: keyword options are parse options and do not reach it. + +// isFeatMarker reports whether raw, as one word, is a feat marker. +func isFeatMarker(raw string, t *tables) bool { + w := []string{raw} + if _, ok := t.featMarkers.matchAt(w, 0); ok { + return true + } + _, ok := t.bracketOnlyFeat.matchAt(w, 0) + return ok +} + +// canonicalJoiner is R11.5: map a raw joiner to its canonical form through data/joiners.json; +// feat markers become featCanonical. A featured list's lead marker is always a feat marker +// (with becomes feat.), while between names the joiner table wins (Sigala with Ella Eyre keeps +// with). +func canonicalJoiner(raw string, t *tables, featLead bool) string { + if featLead && isFeatMarker(raw, t) { + return t.featCanonical + } + if tight, ok := t.tightJoiners[raw]; ok { + return tight + } + for _, j := range t.spacedJoiners { + matches := raw == j.raw + if !j.caseSensitive { + matches = wordMatches(raw, j.raw) + } + if matches { + return j.canonical + } + } + if isFeatMarker(raw, t) { + return t.featCanonical + } + return raw +} + +// joinSep is R11.1: " " + joiner + " "; tight joiners as the raw character + " "; a missing +// joiner as &. +func joinSep(joiner *string, o *resolvedFormat, t *tables) string { + j := "&" + if joiner != nil { + j = *joiner + if o.canonical { + j = canonicalJoiner(j, t, false) + } + } + if _, tight := t.tightJoiners[j]; tight { + return j + " " + } + return " " + j + " " +} + +// joinNames is the names of one credit list joined by their own joiners (the first joiner is +// not rendered). +func joinNames(list []*Artist, o *resolvedFormat, t *tables) string { + var b strings.Builder + for i, a := range list { + if i > 0 { + b.WriteString(joinSep(a.Joiner, o, t)) + } + b.WriteString(a.Name) + } + return b.String() +} + +// leadMarker is the marker in front of a featured list. +func leadMarker(first *Artist, o *resolvedFormat, t *tables, fallback string) string { + if o.featMarker != nil { + return *o.featMarker + } + raw := fallback + if first.Joiner != nil { + raw = *first.Joiner + } + if o.canonical { + return canonicalJoiner(raw, t, true) + } + return raw +} + +// withRole is the artists of track with role, in order. +func withRole(artists []Artist, role Role) []*Artist { + var out []*Artist + for i := range artists { + if artists[i].Role == role { + out = append(out, &artists[i]) + } + } + return out +} + +// formatTrack is R11: t rendered back to a string with the resolved format options. +func formatTrack(track *Track, o resolvedFormat) string { + t := defaultTables() + primaries := withRole(track.Artists, RolePrimary) + featured := withRole(track.Artists, RoleFeatured) + producers := withRole(track.Artists, RoleProducer) + + var artistFeat, titleFeat []*Artist + switch o.feat { + case featSource: + for _, a := range featured { + if a.Source == SourceArtist { + artistFeat = append(artistFeat, a) + } else { + titleFeat = append(titleFeat, a) + } + } + case featArtist: + artistFeat = featured + case featTitle: + titleFeat = featured + } + + // R11.1 / R11.2 + artistPart := joinNames(primaries, &o, t) + if len(artistFeat) > 0 { + lead := leadMarker(artistFeat[0], &o, t, t.featCanonical) + names := joinNames(artistFeat, &o, t) + if artistPart == "" { + artistPart = lead + " " + names + } else { + artistPart = artistPart + " " + lead + " " + names + } + } + + // R11.3 + var pieces []string + if track.Title != "" { + pieces = append(pieces, track.Title) + } + if len(titleFeat) > 0 { + lead := leadMarker(titleFeat[0], &o, t, t.featCanonical) + pieces = append(pieces, "("+lead+" "+joinNames(titleFeat, &o, t)+")") + } + if o.versions { + for _, v := range track.Versions { + pieces = append(pieces, renderVersion(v.Raw, v.Delimiter)) + } + } + if len(producers) > 0 && o.producers { + marker := "prod." + if producers[0].Joiner != nil { + marker = *producers[0].Joiner + } + pieces = append(pieces, "("+marker+" "+joinNames(producers, &o, t)+")") + } + titlePart := strings.Join(pieces, " ") + + // R11.4 + result := titlePart + if artistPart != "" { + result = artistPart + " - " + titlePart + } + if o.position && track.Position != nil { + result = track.Position.Raw + ". " + result + } + return result +} + +// allArtists is every credited name: the track's artists plus every version's remixers, +// deduplicated by the R0.4 key, first occurrence kept. +func allArtists(track *Track) []Artist { + seen := map[string]struct{}{} + out := []Artist{} + add := func(a Artist) { + key := dedupKey(a.Name) + if _, dup := seen[key]; dup { + return + } + seen[key] = struct{}{} + out = append(out, a) + } + for _, a := range track.Artists { + add(a) + } + for _, v := range track.Versions { + for _, a := range v.Artists { + add(a) + } + } + return out +} diff --git a/go/fuzz_test.go b/go/fuzz_test.go new file mode 100644 index 0000000..d1f182d --- /dev/null +++ b/go/fuzz_test.go @@ -0,0 +1,286 @@ +package trackparse + +// Fuzz targets for the SPEC invariants and R13.11. Each is seeded with every relevant fixture +// input (when ../spec is there) and checks the same functions as the seeded property tests in +// properties_test.go. Without -fuzz, `go test` runs the seeds only; to fuzz one target: +// +// go test -run '^$' -fuzz '^FuzzParse$' -fuzztime 60s +// +// Inputs are arbitrary bytes, so invalid UTF-8 is covered too: the API reads it with the WHATWG +// replacement rule, and the checks compare against the sanitized input. + +import ( + goflag "flag" + "hash/fnv" + "os" + "path/filepath" + "strings" + "sync" + "testing" +) + +// fixtureCase is one shared fixture input, for seeding. +type fixtureCase struct { + fn string + input string + edits []byte // the JSON of the case's edits +} + +// fixtureCases is every fixture case under ../spec/fixtures; nil when it is absent. +var fixtureCases = sync.OnceValue(func() []fixtureCase { + dir := filepath.Join(specDir, "fixtures") + var out []fixtureCase + _ = filepath.WalkDir(dir, func(path string, d os.DirEntry, err error) error { + if err != nil || d.IsDir() || !strings.HasSuffix(path, ".json") { + return nil + } + text, err := os.ReadFile(path) + if err != nil { + return nil + } + data, err := parseJSON(text) + if err != nil { + return nil + } + cases, ok := data.get("cases") + if !ok || cases.kind != jsonArray { + return nil + } + defaults, _ := data.get("defaults") + for _, c := range cases.arr { + fn, ok := c.getString("fn") + if !ok { + if fn, ok = defaults.getString("fn"); !ok { + fn = "parse" + } + } + input, _ := c.getString("input") + edits := []byte("[]") + if e, ok := c.get("edits"); ok { + edits = marshal(e) + } + out = append(out, fixtureCase{fn: fn, input: input, edits: edits}) + } + return nil + }) + return out +}) + +// fuzzing reports whether this run fuzzes (-fuzz given). Without it the seeds are only run +// once as ordinary tests, which the property tests already cover broadly: every 25th fixture +// input is enough there and keeps `go test -race` fast. +func fuzzing() bool { + f := goflag.Lookup("test.fuzz") + return f != nil && f.Value.String() != "" +} + +// sampled is the fixture cases a run seeds with: all when fuzzing, every 25th otherwise. +func sampled() []fixtureCase { + all := fixtureCases() + if fuzzing() { + return all + } + var out []fixtureCase + for i := 0; i < len(all); i += 25 { + out = append(out, all[i]) + } + return out +} + +// seedInputs is the fixture inputs of the given functions, without duplicates. +func seedInputs(fns ...string) []string { + seen := map[string]bool{} + var out []string + for _, c := range sampled() { + for _, fn := range fns { + if c.fn == fn && !seen[c.input] { + seen[c.input] = true + out = append(out, c.input) + } + } + } + return out +} + +// fuzzParseOptions are the option sets FuzzParse cycles through: every mode, an uploader, +// known artists, splitAnd values, and keywords with integer-like keys and odd strings. +var fuzzParseOptions = []ParseOptions{ + {}, + {Mode: ModeYouTube, Uploader: "Noisia"}, + {Mode: ModeFilename, KnownArtists: []string{"Camo & Krooked", "Chase & Status", " ", ""}}, + {Mode: ModeClean, SplitAnd: SplitAndNever}, + {Mode: ModeTracklist, SplitAnd: SplitAndAlways}, + {Mode: Mode("nonsense"), SplitAnd: SplitAnd("nonsense")}, + {Keywords: Keywords{ + VersionHeads: []VersionHead{{Key: "rerub", Type: VersionTypeRemix}, {Key: "2", Type: "x"}, {Key: "10", Type: VersionTypeDub}}, + Descriptors: []string{"Deluxe", "", " "}, + Genres: []string{"neurofunk", "x"}, + Junk: []JunkPhrase{{Phrase: "out now", Kind: JunkKindPromo}, {Phrase: "1", Kind: "weird"}, {Phrase: "\ufeff", Kind: ""}}, + FeatMarkers: []string{"with", "&", "-"}, + }}, +} + +// fuzzTracklistOptions are the option sets FuzzParseTracklist cycles through. +var fuzzTracklistOptions = []TracklistOptions{ + {}, + {Mode: ModeAuto}, + {Mode: ModeYouTube, AudioSeconds: Ptr(600.0)}, + {KnownArtists: []string{"Camo & Krooked"}, MarkerWords: []string{"Break", "", "ID"}}, + {SplitAnd: SplitAndNever, AudioSeconds: Ptr(-1.0)}, + {AudioSeconds: Ptr(0.0)}, + {Keywords: Keywords{Junk: []JunkPhrase{{Phrase: "out now", Kind: JunkKindPromo}}}}, +} + +// seedFrom is a generator seed from bytes (FNV-1a). +func seedFrom(b []byte) uint64 { + h := fnv.New64a() + _, _ = h.Write(b) + return h.Sum64() +} + +func FuzzParse(f *testing.F) { + for i, s := range seedInputs("parse", "format", "normalize", "parseArtists") { + f.Add(s, uint8(i)) + } + for _, s := range trickyFragments { + f.Add(s, uint8(0)) + } + f.Fuzz(func(t *testing.T, s string, set uint8) { + checkTrackTotality(t, s) + options := fuzzParseOptions[int(set)%len(fuzzParseOptions)] + track := ParseWith(s, options) + if track.Input != sanitize(s) { + t.Fatalf("%q: input %q", s, track.Input) + } + if options.Keywords.isEmpty() { + // A keyword option may name any version type or junk kind, which the schema's + // enums do not list (as in JavaScript). + checkJSONSchema(t, "parse", marshal(&track), "parse with options") + } + checkArtistHygiene(t, s, &track) + if a, b := string(marshal(&track)), func() string { x := NewParser(options).Parse(s); return string(marshal(&x)) }(); a != b { + t.Fatalf("%q: ParseWith and Parser differ", s) + } + }) +} + +func FuzzParseArtists(f *testing.F) { + for i, s := range seedInputs("parseArtists", "parse") { + f.Add(s, uint8(i)) + } + f.Fuzz(func(t *testing.T, s string, set uint8) { + options := fuzzParseOptions[int(set)%len(fuzzParseOptions)] + for _, artists := range [][]Artist{ParseArtists(s), ParseArtistsWith(s, options)} { + if options.Keywords.isEmpty() { + checkJSONSchema(t, "parseArtists", marshal(artistList(artists)), "parseArtists") + } + track := Track{Artists: artists} + checkArtistHygiene(t, s, &track) + for _, a := range artists { + if a.Source != SourceArtist { + t.Fatalf("%q: source %q", s, a.Source) + } + } + } + }) +} + +func FuzzFormat(f *testing.F) { + for i, s := range seedInputs("format", "parse") { + f.Add(s, uint64(i)) + } + f.Fuzz(func(t *testing.T, s string, seed uint64) { + r := newRNG(seed) + options := fuzzParseOptions[r.below(len(fuzzParseOptions))] + track := ParseWith(s, options) + _ = Format(track) + _ = FormatWith(track, formatOptionsFrom(r, s)) + _ = AllArtists(track) + // R11.6 and the other track-shaped invariants, on a track drawn from the seed. + checkShapedTrack(t, r) + }) +} + +func FuzzParseTracklist(f *testing.F) { + for i, s := range seedInputs("parseTracklist", "applyEdits") { + f.Add(s, uint64(i)) + } + f.Fuzz(func(t *testing.T, text string, seed uint64) { + r := newRNG(seed) + checkTracklist(t, text, TracklistOptions{}) + checkTracklist(t, text, fuzzTracklistOptions[r.below(len(fuzzTracklistOptions))]) + checkOneLine(t, text) + checkEmphasis(t, writeTime(r.pick(timeStyles), r.below(3600), r.below(1000)), r.pick(emphasisRests)) + }) +} + +func FuzzApplyEdits(f *testing.F) { + for i, c := range sampled() { + if c.fn == "applyEdits" { + f.Add(c.input, c.edits, uint64(i)) + } + } + for i, s := range seedInputs("parseTracklist") { + f.Add(s, []byte("[]"), uint64(i)) + } + f.Fuzz(func(t *testing.T, text string, edits []byte, seed uint64) { + r := newRNG(seed) + // Loose edits: the fuzzer's bytes when they are JSON, else a random list drawn from them. + loose, err := parseJSON(edits) + if err != nil { + loose = newRNG(seedFrom(edits) ^ seed).looseEdits() + } + checkLooseEdits(t, text, loose) + checkIdentity(t, text) + checkLocality(t, text, r) + checkInsertDelete(t, text, r) + checkShiftRoundTrip(t, text, r) + checkSort(t, text) + // The same checks on a timed list drawn from the seed, where most edits apply. + list := r.timedList() + checkLocality(t, list, r) + checkShiftRoundTrip(t, list, r) + }) +} + +// FuzzUnmarshalTrack feeds Track.UnmarshalJSON arbitrary bytes, seeded with the JSON of parsed +// fixture inputs. Whatever decodes must marshal and decode again to the same bytes, and Format, +// FormatWith and AllArtists must accept it: a decoded track can hold values the parser never +// writes (nil slices, empty names, any enum string), and none of them may panic. +func FuzzUnmarshalTrack(f *testing.F) { + for _, s := range seedInputs("parse", "format") { + track := Parse(s) + f.Add(marshal(&track)) + } + f.Add([]byte(`{}`)) + f.Add([]byte(`{"artists":[{"name":"A","role":"x","joiner":null,"source":"y"}],"versions":[{"type":"z","artists":null}]}`)) + f.Add([]byte(`{"position":{"raw":"01","number":1e300},"year":-5,"mode":"auto"}`)) + f.Add([]byte(`{"title":"\ud800","artists":[{}],"junk":[{}],"warnings":["?"]}`)) + f.Fuzz(func(t *testing.T, data []byte) { + var track Track + if err := track.UnmarshalJSON(data); err != nil { + return + } + b, err := track.MarshalJSON() + if err != nil { + t.Fatalf("MarshalJSON after UnmarshalJSON: %v", err) + } + var again Track + if err := again.UnmarshalJSON(b); err != nil { + t.Fatalf("UnmarshalJSON of MarshalJSON output %s: %v", b, err) + } + if b2, _ := again.MarshalJSON(); string(b2) != string(b) { + t.Fatalf("round trip changed the JSON:\n%s\n%s", b, b2) + } + for _, o := range []FormatOptions{ + {}, + {Feat: FeatTitle, Joiners: JoinersCanonical, Position: true, FeatMarker: Ptr("ft.")}, + {Feat: FeatArtist, Versions: VersionsNone, OmitProducers: true}, + {Feat: FeatOmit, FeatMarker: Ptr("")}, + } { + _ = FormatWith(track, o) + } + _ = Format(track) + _ = AllArtists(track) + }) +} diff --git a/go/go.mod b/go/go.mod new file mode 100644 index 0000000..2ea596f --- /dev/null +++ b/go/go.mod @@ -0,0 +1,3 @@ +module github.com/4matic/trackparse/go + +go 1.22 diff --git a/go/internal/cmd/dump/main.go b/go/internal/cmd/dump/main.go new file mode 100644 index 0000000..7ef4f66 --- /dev/null +++ b/go/internal/cmd/dump/main.go @@ -0,0 +1,60 @@ +// Command dump is the Go side of the cross-port diff (scripts/compare-ports.mjs): JSONL in, +// JSON out. +// +// Each stdin line is an object {"fn", "input", "options", "formatOptions", "edits"} as in the +// shared fixtures; each stdout line is the JSON result of that call, written as the JavaScript +// package writes it. A line that is not a JSON object gives null. Non-finite numbers travel as +// 1e999 / -1e999, which the reader takes as infinity. +// +// go run -tags trackparse_wire ./internal/cmd/dump < cases.jsonl > results.jsonl +// +// The tag links the JSON door into the trackparse package (wire_hook.go); without it the command +// stops with a message. +package main + +import ( + "bufio" + "fmt" + "io" + "os" + + _ "github.com/4matic/trackparse/go" // fills in wire.Call when built with -tags trackparse_wire + "github.com/4matic/trackparse/go/internal/wire" +) + +func main() { + if wire.Call == nil { + fmt.Fprintln(os.Stderr, "dump: build with -tags trackparse_wire: go run -tags trackparse_wire ./internal/cmd/dump") + os.Exit(2) + } + if err := run(os.Stdin, os.Stdout); err != nil { + fmt.Fprintln(os.Stderr, "dump:", err) + os.Exit(1) + } +} + +func run(in io.Reader, out io.Writer) error { + r := bufio.NewReader(in) + w := bufio.NewWriter(out) + for { + line, err := r.ReadBytes('\n') + if len(line) > 0 { + if line[len(line)-1] == '\n' { + line = line[:len(line)-1] + } + if len(line) > 0 && line[len(line)-1] == '\r' { + line = line[:len(line)-1] + } + if _, werr := w.Write(append(wire.Call(line), '\n')); werr != nil { + return werr + } + } + if err == io.EOF { + break + } + if err != nil { + return err + } + } + return w.Flush() +} diff --git a/go/internal/wire/wire.go b/go/internal/wire/wire.go new file mode 100644 index 0000000..eb09b5c --- /dev/null +++ b/go/internal/wire/wire.go @@ -0,0 +1,20 @@ +// Package wire is the JSON door into trackparse: every public function called with loose JSON +// arguments, returning JSON. The shared fixtures, the cross-port diff (scripts/compare-ports.mjs +// through internal/cmd/dump) and fuzzers use it. Options arrive as loose JSON and are resolved +// with the same fallbacks as the JavaScript reference (a bad value means the default, SPEC R0.8). +// +// The package is internal so loose JSON never becomes public API. It holds only a hook: the +// root package trackparse fills it in when it is initialized, but only when it is built with +// -tags trackparse_wire (wire_hook.go), so programs that use the module never link the JSON door. +// A program that calls Call must import trackparse (a blank import is enough) and be built with +// that tag. +package wire + +// Call runs one case. line is a JSON object +// {"fn", "input", "options", "formatOptions", "edits"} as in the shared fixtures (fn defaults +// to "parse", options and formatOptions to {}, edits to []); the result is the JSON text of +// the function's output, as the JavaScript package writes it. A line that is not a JSON object, +// or an unknown fn, gives null. Never panics. +// +// Nil unless the trackparse package is built with -tags trackparse_wire and initialized. +var Call func(line []byte) []byte diff --git a/go/json.go b/go/json.go new file mode 100644 index 0000000..0e9d351 --- /dev/null +++ b/go/json.go @@ -0,0 +1,1181 @@ +package trackparse + +import ( + "errors" + "math" + "strconv" + "unicode/utf8" +) + +// JSON for the module: a writer whose bytes equal JavaScript's JSON.stringify for every output +// type, MarshalJSON / UnmarshalJSON on the public types, and a small JSON value with a reader +// for the internal JSON door (internal/wire) and the fixture tests. The module has no +// dependency, and encoding/json would not give the same bytes: it escapes <, >, & and +// U+2028/U+2029. (Called through encoding/json, MarshalJSON output is still re-escaped that way +// unless the encoder has SetEscapeHTML(false); the values are the same, the bytes are not.) + +// --------------------------------------------------------------------------------------------- +// Writer + +// appendJSString appends s as JSON.stringify writes a string: only ", \ and the code points +// below U+0020 are escaped, with the short forms \b \f \n \r \t. Bytes that are not valid +// UTF-8 are replaced as the API replaces them (sanitize: one U+FFFD per maximal ill-formed +// subpart), so a typed Edit with bad bytes reads as the same text as a bad input string. +func appendJSString(b []byte, s string) []byte { + s = sanitize(s) + b = append(b, '"') + for _, r := range s { + switch r { + case '"': + b = append(b, '\\', '"') + case '\\': + b = append(b, '\\', '\\') + case '\n': + b = append(b, '\\', 'n') + case '\r': + b = append(b, '\\', 'r') + case '\t': + b = append(b, '\\', 't') + case '\b': + b = append(b, '\\', 'b') + case '\f': + b = append(b, '\\', 'f') + default: + if r < 0x20 { + const hex = "0123456789abcdef" + b = append(b, '\\', 'u', '0', '0', hex[r>>4], hex[r&0xf]) + } else { + b = utf8.AppendRune(b, r) + } + } + } + return append(b, '"') +} + +// appendJSNumber appends n as JavaScript's Number#toString writes it (ECMA-262 +// Number::toString): the shortest digits that round-trip, no ".0" on whole values, exponent +// form from 1e21 and below 1e-6 ("1e+21", "1e-7"), and -0 as 0. NaN and the infinities are +// written as null, as JSON.stringify does. +func appendJSNumber(b []byte, n float64) []byte { + if math.IsNaN(n) || math.IsInf(n, 0) { + return append(b, "null"...) + } + if n == 0 { + return append(b, '0') + } + if n < 0 { + b = append(b, '-') + n = -n + } + // 'e' with precision -1 gives the shortest round-trip digits as d[.ddd]e±XX. + var buf [32]byte + sci := strconv.AppendFloat(buf[:0], n, 'e', -1, 64) + var digits []byte + exp := 0 + for i := 0; i < len(sci); i++ { + c := sci[i] + if c == 'e' { + e, err := strconv.Atoi(string(sci[i+1:])) + if err == nil { + exp = e + } + break + } + if c >= '0' && c <= '9' { + digits = append(digits, c) + } + } + k := len(digits) + // The value is 0.digits times 10^point. + point := exp + 1 + switch { + case k <= point && point <= 21: + b = append(b, digits...) + for i := 0; i < point-k; i++ { + b = append(b, '0') + } + case 0 < point && point <= 21: + b = append(b, digits[:point]...) + b = append(b, '.') + b = append(b, digits[point:]...) + case -6 < point && point <= 0: + b = append(b, '0', '.') + for i := 0; i < -point; i++ { + b = append(b, '0') + } + b = append(b, digits...) + default: + b = append(b, digits[0]) + if k > 1 { + b = append(b, '.') + b = append(b, digits[1:]...) + } + b = append(b, 'e') + if point > 0 { + b = append(b, '+') + } else { + b = append(b, '-') + } + e := point - 1 + if e < 0 { + e = -e + } + b = strconv.AppendInt(b, int64(e), 10) + } + return b +} + +// jw is a small streaming writer for JSON objects and arrays. +type jw struct { + b []byte + // first is true right after an opening brace or bracket. + first bool +} + +func (w *jw) sep() { + if !w.first { + w.b = append(w.b, ',') + } + w.first = false +} + +func (w *jw) open(c byte) { w.sep(); w.b = append(w.b, c); w.first = true } +func (w *jw) close(c byte) { w.b = append(w.b, c); w.first = false } + +// key writes an object key; the value that follows must not call sep again. +func (w *jw) key(k string) { + w.sep() + w.b = appendJSString(w.b, k) + w.b = append(w.b, ':') + w.first = true +} + +func (w *jw) str(s string) { w.sep(); w.b = appendJSString(w.b, s) } +func (w *jw) num(n float64) { w.sep(); w.b = appendJSNumber(w.b, n) } +func (w *jw) integer(n int) { w.sep(); w.b = appendJSNumber(w.b, float64(n)) } +func (w *jw) null() { w.sep(); w.b = append(w.b, "null"...) } +func (w *jw) boolean(v bool) { w.sep(); w.b = strconv.AppendBool(w.b, v) } + +func (w *jw) optStr(s *string) { + if s == nil { + w.null() + } else { + w.str(*s) + } +} + +func (w *jw) optInt(n *int) { + if n == nil { + w.null() + } else { + w.integer(*n) + } +} + +func (w *jw) optNum(n *float64) { + if n == nil { + w.null() + } else { + w.num(*n) + } +} + +func (w *jw) strings(list []string) { + w.open('[') + for _, s := range list { + w.str(s) + } + w.close(']') +} + +func (w *jw) ints(list []int) { + w.open('[') + for _, n := range list { + w.integer(n) + } + w.close(']') +} + +// --------------------------------------------------------------------------------------------- +// The public types. Keys in the schema's order, every key present, nil slices as []. + +func (a *Artist) write(w *jw) { + w.open('{') + w.key("name") + w.str(a.Name) + w.key("role") + w.str(string(a.Role)) + w.key("joiner") + w.optStr(a.Joiner) + w.key("source") + w.str(string(a.Source)) + w.close('}') +} + +func writeArtists(w *jw, list []Artist) { + w.open('[') + for i := range list { + list[i].write(w) + } + w.close(']') +} + +func (v *Version) write(w *jw) { + w.open('{') + w.key("type") + w.str(string(v.Type)) + w.key("raw") + w.str(v.Raw) + w.key("artists") + writeArtists(w, v.Artists) + w.key("modifiers") + w.strings(v.Modifiers) + w.key("descriptor") + w.optStr(v.Descriptor) + w.key("year") + w.optInt(v.Year) + w.key("unknownArtist") + w.boolean(v.UnknownArtist) + w.key("delimiter") + w.str(string(v.Delimiter)) + w.close('}') +} + +func (j *Junk) write(w *jw) { + w.open('{') + w.key("raw") + w.str(j.Raw) + w.key("kind") + w.str(string(j.Kind)) + w.close('}') +} + +func (f *Flags) write(w *jw) { + w.open('{') + w.key("explicit") + w.boolean(f.Explicit) + w.key("clean") + w.boolean(f.Clean) + w.key("unknownArtist") + w.boolean(f.UnknownArtist) + w.key("unknownTitle") + w.boolean(f.UnknownTitle) + w.close('}') +} + +func (p *Position) write(w *jw) { + w.open('{') + w.key("raw") + w.str(p.Raw) + w.key("number") + w.integer(p.Number) + w.close('}') +} + +func (t *Timestamp) write(w *jw) { + w.open('{') + w.key("raw") + w.str(t.Raw) + w.key("seconds") + w.integer(t.Seconds) + w.close('}') +} + +func (t *Track) write(w *jw) { + w.open('{') + w.key("input") + w.str(t.Input) + w.key("mode") + w.str(string(t.Mode)) + w.key("position") + if t.Position == nil { + w.null() + } else { + t.Position.write(w) + } + w.key("timestamp") + if t.Timestamp == nil { + w.null() + } else { + t.Timestamp.write(w) + } + w.key("artists") + writeArtists(w, t.Artists) + w.key("title") + w.str(t.Title) + w.key("fullTitle") + w.str(t.FullTitle) + w.key("versions") + w.open('[') + for i := range t.Versions { + t.Versions[i].write(w) + } + w.close(']') + w.key("year") + w.optInt(t.Year) + w.key("flags") + t.Flags.write(w) + w.key("junk") + w.open('[') + for i := range t.Junk { + t.Junk[i].write(w) + } + w.close(']') + w.key("warnings") + w.open('[') + for _, x := range t.Warnings { + w.str(string(x)) + } + w.close(']') + w.close('}') +} + +func (p *Parts) write(w *jw) { + w.open('{') + w.key("lead") + w.str(p.Lead) + w.key("time") + w.str(p.Time) + w.key("gap") + w.str(p.Gap) + w.key("rest") + w.str(p.Rest) + w.close('}') +} + +func (t *TracklistTime) write(w *jw) { + w.open('{') + w.key("raw") + w.str(t.Raw) + w.key("seconds") + w.num(t.Seconds) + w.close('}') +} + +func (e *Entry) write(w *jw) { + w.open('{') + w.key("line") + w.integer(e.Line) + w.key("kind") + w.str(string(e.Kind)) + w.key("eol") + w.str(string(e.Eol)) + w.key("raw") + w.str(e.Raw) + w.key("parts") + e.Parts.write(w) + w.key("time") + if e.Time == nil { + w.null() + } else { + e.Time.write(w) + } + w.key("track") + if e.Track == nil { + w.null() + } else { + e.Track.write(w) + } + w.key("layered") + w.boolean(e.Layered) + w.close('}') +} + +func (s *Suggestion) write(w *jw) { + w.open('{') + w.key("line") + w.integer(s.Line) + w.key("raw") + w.str(s.Raw) + w.key("seconds") + w.num(s.Seconds) + w.close('}') +} + +func (x *TracklistWarning) write(w *jw) { + w.open('{') + w.key("code") + w.str(string(x.Code)) + w.key("line") + w.integer(x.Line) + w.key("severity") + w.str(string(x.Severity)) + w.key("suggestion") + if x.Suggestion == nil { + w.null() + } else { + x.Suggestion.write(w) + } + w.close('}') +} + +func (s *Stats) write(w *jw) { + w.open('{') + w.key("lines") + w.integer(s.Lines) + w.key("tracks") + w.integer(s.Tracks) + w.key("markers") + w.integer(s.Markers) + w.key("timed") + w.integer(s.Timed) + w.key("firstTime") + w.optNum(s.FirstTime) + w.key("lastTime") + w.optNum(s.LastTime) + w.close('}') +} + +func (t *Tracklist) write(w *jw) { + w.open('{') + w.key("specVersion") + w.str(t.SpecVersion) + w.key("entries") + w.open('[') + for i := range t.Entries { + t.Entries[i].write(w) + } + w.close(']') + w.key("warnings") + w.open('[') + for i := range t.Warnings { + t.Warnings[i].write(w) + } + w.close(']') + w.key("stats") + t.Stats.write(w) + w.close('}') +} + +func (e *Edit) write(w *jw) { + w.open('{') + w.key("op") + w.str(string(e.Op)) + switch e.Op { + case EditOpSetTime: + w.key("line") + w.integer(e.Line) + w.key("seconds") + w.num(e.Seconds) + case EditOpShift: + w.key("seconds") + w.num(e.Seconds) + if e.Lines != nil { + w.key("lines") + w.ints(e.Lines) + } + if e.From != nil { + w.key("from") + w.integer(*e.From) + } + case EditOpSetRest: + w.key("line") + w.integer(e.Line) + w.key("rest") + w.str(e.Rest) + case EditOpInsert: + w.key("after") + w.integer(e.After) + w.key("text") + w.str(e.Text) + case EditOpDelete: + w.key("line") + w.integer(e.Line) + } + w.close('}') +} + +func (x *EditWarning) write(w *jw) { + w.open('{') + w.key("code") + w.str(string(x.Code)) + w.key("edit") + w.integer(x.Edit) + w.key("line") + w.optInt(x.Line) + w.close('}') +} + +func (r *EditResult) write(w *jw) { + w.open('{') + w.key("text") + w.str(r.Text) + w.key("changed") + w.ints(r.Changed) + w.key("warnings") + w.open('[') + for i := range r.Warnings { + r.Warnings[i].write(w) + } + w.close(']') + w.close('}') +} + +func (r *rawEditResult) write(w *jw) { + w.open('{') + w.key("text") + w.str(r.text) + w.key("changed") + w.ints(r.changed) + w.key("warnings") + w.open('[') + for _, x := range r.warnings { + w.open('{') + w.key("code") + w.str(string(x.code)) + w.key("edit") + w.integer(x.edit) + w.key("line") + w.optNum(x.line) + w.close('}') + } + w.close(']') + w.close('}') +} + +// writer is implemented by every type with a JSON form. +type writer interface{ write(w *jw) } + +// marshal writes v as compact JSON text. +func marshal(v writer) []byte { + w := jw{first: true} + v.write(&w) + return w.b +} + +// MarshalJSON writes the spec's JSON form: camelCase keys in the schema's order, every key +// present. The bytes are those of JSON.stringify in the JavaScript package. +func (a Artist) MarshalJSON() ([]byte, error) { return marshal(&a), nil } + +// MarshalJSON writes the spec's JSON form (see [Artist.MarshalJSON]). +func (v Version) MarshalJSON() ([]byte, error) { return marshal(&v), nil } + +// MarshalJSON writes the spec's JSON form (see [Artist.MarshalJSON]). +func (j Junk) MarshalJSON() ([]byte, error) { return marshal(&j), nil } + +// MarshalJSON writes the spec's JSON form (see [Artist.MarshalJSON]). +func (f Flags) MarshalJSON() ([]byte, error) { return marshal(&f), nil } + +// MarshalJSON writes the spec's JSON form (see [Artist.MarshalJSON]). +func (p Position) MarshalJSON() ([]byte, error) { return marshal(&p), nil } + +// MarshalJSON writes the spec's JSON form (see [Artist.MarshalJSON]). +func (t Timestamp) MarshalJSON() ([]byte, error) { return marshal(&t), nil } + +// MarshalJSON writes the spec's JSON form (see [Artist.MarshalJSON]). [Track.UnmarshalJSON] +// reads it back. +func (t Track) MarshalJSON() ([]byte, error) { return marshal(&t), nil } + +// MarshalJSON writes the spec's JSON form (see [Artist.MarshalJSON]). +func (p Parts) MarshalJSON() ([]byte, error) { return marshal(&p), nil } + +// MarshalJSON writes the spec's JSON form; a whole number of seconds is an integer. +func (t TracklistTime) MarshalJSON() ([]byte, error) { return marshal(&t), nil } + +// MarshalJSON writes the spec's JSON form (see [Artist.MarshalJSON]). +func (e Entry) MarshalJSON() ([]byte, error) { return marshal(&e), nil } + +// MarshalJSON writes the spec's JSON form (see [Artist.MarshalJSON]). +func (s Suggestion) MarshalJSON() ([]byte, error) { return marshal(&s), nil } + +// MarshalJSON writes the spec's JSON form (see [Artist.MarshalJSON]). +func (x TracklistWarning) MarshalJSON() ([]byte, error) { return marshal(&x), nil } + +// MarshalJSON writes the spec's JSON form (see [Artist.MarshalJSON]). +func (s Stats) MarshalJSON() ([]byte, error) { return marshal(&s), nil } + +// MarshalJSON writes the spec's JSON form (see [Artist.MarshalJSON]). +func (t Tracklist) MarshalJSON() ([]byte, error) { return marshal(&t), nil } + +// MarshalJSON writes the edit as the spec does ({"op":"set-time","line":3,"seconds":90}), with +// only the fields of its operation. +func (e Edit) MarshalJSON() ([]byte, error) { return marshal(&e), nil } + +// MarshalJSON writes the spec's JSON form (see [Artist.MarshalJSON]). +func (x EditWarning) MarshalJSON() ([]byte, error) { return marshal(&x), nil } + +// MarshalJSON writes the spec's JSON form (see [Artist.MarshalJSON]). +func (r EditResult) MarshalJSON() ([]byte, error) { return marshal(&r), nil } + +// --------------------------------------------------------------------------------------------- +// JSON values and the reader + +// jsonKind is the type of a jsonValue. +type jsonKind uint8 + +const ( + jsonNull jsonKind = iota + jsonBool + jsonNumber + jsonString + jsonArray + jsonObject +) + +// jsonValue is a parsed JSON value. Objects keep their keys in order of first appearance. +type jsonValue struct { + kind jsonKind + b bool + num float64 + str string + arr []jsonValue + obj []jsonMember +} + +// jsonMember is one key of a JSON object. +type jsonMember struct { + key string + val jsonValue +} + +func jNull() jsonValue { return jsonValue{} } +func jBool(b bool) jsonValue { return jsonValue{kind: jsonBool, b: b} } +func jNum(n float64) jsonValue { return jsonValue{kind: jsonNumber, num: n} } +func jStr(s string) jsonValue { return jsonValue{kind: jsonString, str: s} } +func jArr(a []jsonValue) jsonValue { return jsonValue{kind: jsonArray, arr: a} } + +// get is the value of key in an object; false when v is not an object or has no such key. +func (v jsonValue) get(key string) (jsonValue, bool) { + if v.kind != jsonObject { + return jsonValue{}, false + } + for _, m := range v.obj { + if m.key == key { + return m.val, true + } + } + return jsonValue{}, false +} + +// getString is the string at key, or "" and false. +func (v jsonValue) getString(key string) (string, bool) { + x, ok := v.get(key) + if !ok || x.kind != jsonString { + return "", false + } + return x.str, true +} + +func (v jsonValue) write(w *jw) { + switch v.kind { + case jsonNull: + w.null() + case jsonBool: + w.boolean(v.b) + case jsonNumber: + w.num(v.num) + case jsonString: + w.str(v.str) + case jsonArray: + w.open('[') + for _, x := range v.arr { + x.write(w) + } + w.close(']') + case jsonObject: + w.open('{') + for _, m := range v.obj { + w.key(m.key) + m.val.write(w) + } + w.close('}') + } +} + +// jsonOf is the JSON value of anything with a JSON form (through its text). +func jsonOf(v writer) jsonValue { + out, _ := parseJSON(marshal(v)) + return out +} + +// errJSON is the one error of the reader: the text is not JSON it can read. +var errJSON = errors.New("trackparse: invalid JSON") + +// maxJSONDepth bounds nesting, so a hostile input cannot exhaust the stack. +const maxJSONDepth = 200 + +// parseJSON reads one JSON value. It is lenient where the JS reference has to be matched: a +// number is anything strconv reads from the characters 0-9 + - . e E (so 1e999 is infinity), +// an unknown escape stands for its character, and a repeated key keeps its first place and +// takes the last value (JS). Unpaired surrogate escapes become U+FFFD, since a Go string holds +// no lone surrogates. Bytes that are not valid UTF-8 are first replaced (see sanitize). +func parseJSON(text []byte) (jsonValue, error) { + r := jsonReader{s: sanitize(string(text))} + r.ws() + v, ok := r.value() + if !ok { + return jsonValue{}, errJSON + } + r.ws() + if r.at != len(r.s) { + return jsonValue{}, errJSON + } + return v, nil +} + +type jsonReader struct { + s string + at int + depth int +} + +// peek is the byte at the cursor, or 0 at the end. +func (r *jsonReader) peek() byte { + if r.at < len(r.s) { + return r.s[r.at] + } + return 0 +} + +func (r *jsonReader) ws() { + for r.at < len(r.s) { + switch r.s[r.at] { + case ' ', '\t', '\n', '\r': + r.at++ + default: + return + } + } +} + +func (r *jsonReader) eat(word string) bool { + if len(r.s)-r.at >= len(word) && r.s[r.at:r.at+len(word)] == word { + r.at += len(word) + return true + } + return false +} + +func (r *jsonReader) value() (jsonValue, bool) { + if r.depth > maxJSONDepth || r.at >= len(r.s) { + return jsonValue{}, false + } + switch r.peek() { + case 'n': + return jNull(), r.eat("null") + case 't': + return jBool(true), r.eat("true") + case 'f': + return jBool(false), r.eat("false") + case '"': + s, ok := r.string() + return jStr(s), ok + case '[': + r.at++ + r.depth++ + items := []jsonValue{} + r.ws() + if r.peek() == ']' { + r.at++ + } else { + for { + r.ws() + v, ok := r.value() + if !ok { + return jsonValue{}, false + } + items = append(items, v) + r.ws() + switch r.peek() { + case ',': + r.at++ + continue + case ']': + r.at++ + default: + return jsonValue{}, false + } + break + } + } + r.depth-- + return jArr(items), true + case '{': + r.at++ + r.depth++ + members := []jsonMember{} + r.ws() + if r.peek() == '}' { + r.at++ + } else { + for { + r.ws() + key, ok := r.string() + if !ok { + return jsonValue{}, false + } + r.ws() + if r.peek() != ':' { + return jsonValue{}, false + } + r.at++ + r.ws() + v, ok := r.value() + if !ok { + return jsonValue{}, false + } + found := false + for i := range members { + if members[i].key == key { + members[i].val = v + found = true + break + } + } + if !found { + members = append(members, jsonMember{key, v}) + } + r.ws() + switch r.peek() { + case ',': + r.at++ + continue + case '}': + r.at++ + default: + return jsonValue{}, false + } + break + } + } + r.depth-- + return jsonValue{kind: jsonObject, obj: members}, true + } + return r.number() +} + +func (r *jsonReader) number() (jsonValue, bool) { + start := r.at + for r.at < len(r.s) { + c := r.s[r.at] + if (c >= '0' && c <= '9') || c == '-' || c == '+' || c == '.' || c == 'e' || c == 'E' { + r.at++ + continue + } + break + } + if r.at == start { + return jsonValue{}, false + } + f, err := strconv.ParseFloat(r.s[start:r.at], 64) + if err != nil { + var ne *strconv.NumError + if !errors.As(err, &ne) || ne.Err != strconv.ErrRange { + return jsonValue{}, false + } + // Out of range: ParseFloat already gives the infinity (or zero), as JS Number() does. + } + return jNum(f), true +} + +// hex4 reads four hex digits. +func (r *jsonReader) hex4() (rune, bool) { + if len(r.s)-r.at < 4 { + return 0, false + } + var n rune + for i := 0; i < 4; i++ { + c := r.s[r.at+i] + var d byte + switch { + case c >= '0' && c <= '9': + d = c - '0' + case c >= 'a' && c <= 'f': + d = c - 'a' + 10 + case c >= 'A' && c <= 'F': + d = c - 'A' + 10 + default: + return 0, false + } + n = n<<4 | rune(d) + } + r.at += 4 + return n, true +} + +func (r *jsonReader) string() (string, bool) { + if r.peek() != '"' { + return "", false + } + r.at++ + var out []byte + for { + if r.at >= len(r.s) { + return "", false + } + c := r.s[r.at] + r.at++ + switch c { + case '"': + return string(out), true + case '\\': + if r.at >= len(r.s) { + return "", false + } + e := r.s[r.at] + r.at++ + switch e { + case 'n': + out = append(out, '\n') + case 'r': + out = append(out, '\r') + case 't': + out = append(out, '\t') + case 'b': + out = append(out, '\b') + case 'f': + out = append(out, '\f') + case 'u': + hi, ok := r.hex4() + if !ok { + return "", false + } + cp := hi + if hi >= 0xd800 && hi < 0xdc00 && r.eat("\\u") { + lo, ok := r.hex4() + if !ok { + return "", false + } + if lo >= 0xdc00 && lo < 0xe000 { + cp = 0x10000 + (hi-0xd800)<<10 + (lo - 0xdc00) + } else { + // Two units that do not pair: both become U+FFFD (lo unless it is a + // scalar value). + out = utf8.AppendRune(out, utf8.RuneError) + cp = lo + } + } + // AppendRune writes U+FFFD for a lone surrogate. + out = utf8.AppendRune(out, cp) + default: + // \" \\ \/ and any other escaped character stand for themselves. The escaped + // character may be the first byte of a multi-byte code point: copy it whole. + _, size := utf8.DecodeRuneInString(r.s[r.at-1:]) + out = append(out, r.s[r.at-1:r.at-1+size]...) + r.at += size - 1 + } + default: + out = append(out, c) + } + } +} + +// --------------------------------------------------------------------------------------------- +// Track.UnmarshalJSON + +// decoder reads typed fields out of a jsonValue and keeps the first error. +type decoder struct{ err error } + +func (d *decoder) fail(path, want string) { + if d.err == nil { + d.err = errors.New("trackparse: " + path + ": expected " + want) + } +} + +func (d *decoder) str(v jsonValue, path string) string { + if v.kind != jsonString { + d.fail(path, "a string") + return "" + } + return v.str +} + +func (d *decoder) optStr(v jsonValue, path string) *string { + if v.kind == jsonNull { + return nil + } + s := d.str(v, path) + return &s +} + +func (d *decoder) boolean(v jsonValue, path string) bool { + if v.kind != jsonBool { + d.fail(path, "a boolean") + return false + } + return v.b +} + +func (d *decoder) integer(v jsonValue, path string) int { + if v.kind != jsonNumber || v.num != math.Trunc(v.num) || math.IsInf(v.num, 0) { + d.fail(path, "an integer") + return 0 + } + return saturatingInt(v.num) +} + +func (d *decoder) optInt(v jsonValue, path string) *int { + if v.kind == jsonNull { + return nil + } + n := d.integer(v, path) + return &n +} + +// each calls f on every element of an array (a missing key is an empty array). +func (d *decoder) each(v jsonValue, path string, f func(x jsonValue, path string)) { + if v.kind == jsonNull { + return + } + if v.kind != jsonArray { + d.fail(path, "an array") + return + } + for i, x := range v.arr { + f(x, path+"["+strconv.Itoa(i)+"]") + } +} + +// fields calls f on every key of an object. +func (d *decoder) fields(v jsonValue, path string, f func(key string, x jsonValue, path string)) { + if v.kind != jsonObject { + d.fail(path, "an object") + return + } + for _, m := range v.obj { + f(m.key, m.val, path+"."+m.key) + } +} + +func (d *decoder) artist(v jsonValue, path string) Artist { + var a Artist + d.fields(v, path, func(key string, x jsonValue, p string) { + switch key { + case "name": + a.Name = d.str(x, p) + case "role": + a.Role = Role(d.str(x, p)) + case "joiner": + a.Joiner = d.optStr(x, p) + case "source": + a.Source = Source(d.str(x, p)) + } + }) + return a +} + +func (d *decoder) artists(v jsonValue, path string) []Artist { + out := []Artist{} + d.each(v, path, func(x jsonValue, p string) { out = append(out, d.artist(x, p)) }) + return out +} + +func (d *decoder) version(v jsonValue, path string) Version { + out := Version{Artists: []Artist{}, Modifiers: []string{}} + d.fields(v, path, func(key string, x jsonValue, p string) { + switch key { + case "type": + out.Type = VersionType(d.str(x, p)) + case "raw": + out.Raw = d.str(x, p) + case "artists": + out.Artists = d.artists(x, p) + case "modifiers": + d.each(x, p, func(m jsonValue, mp string) { out.Modifiers = append(out.Modifiers, d.str(m, mp)) }) + case "descriptor": + out.Descriptor = d.optStr(x, p) + case "year": + out.Year = d.optInt(x, p) + case "unknownArtist": + out.UnknownArtist = d.boolean(x, p) + case "delimiter": + out.Delimiter = Delimiter(d.str(x, p)) + } + }) + return out +} + +// track reads a Track; missing keys keep their zero value (slices empty). +func (d *decoder) track(v jsonValue, path string) Track { + t := Track{Artists: []Artist{}, Versions: []Version{}, Junk: []Junk{}, Warnings: []Warning{}} + d.fields(v, path, func(key string, x jsonValue, p string) { + switch key { + case "input": + t.Input = d.str(x, p) + case "mode": + t.Mode = Mode(d.str(x, p)) + case "position": + if x.kind != jsonNull { + pos := Position{} + d.fields(x, p, func(k string, y jsonValue, q string) { + switch k { + case "raw": + pos.Raw = d.str(y, q) + case "number": + pos.Number = d.integer(y, q) + } + }) + t.Position = &pos + } + case "timestamp": + if x.kind != jsonNull { + ts := Timestamp{} + d.fields(x, p, func(k string, y jsonValue, q string) { + switch k { + case "raw": + ts.Raw = d.str(y, q) + case "seconds": + ts.Seconds = d.integer(y, q) + } + }) + t.Timestamp = &ts + } + case "artists": + t.Artists = d.artists(x, p) + case "title": + t.Title = d.str(x, p) + case "fullTitle": + t.FullTitle = d.str(x, p) + case "versions": + d.each(x, p, func(y jsonValue, q string) { t.Versions = append(t.Versions, d.version(y, q)) }) + case "year": + t.Year = d.optInt(x, p) + case "flags": + d.fields(x, p, func(k string, y jsonValue, q string) { + switch k { + case "explicit": + t.Flags.Explicit = d.boolean(y, q) + case "clean": + t.Flags.Clean = d.boolean(y, q) + case "unknownArtist": + t.Flags.UnknownArtist = d.boolean(y, q) + case "unknownTitle": + t.Flags.UnknownTitle = d.boolean(y, q) + } + }) + case "junk": + d.each(x, p, func(y jsonValue, q string) { + j := Junk{} + d.fields(y, q, func(k string, z jsonValue, r string) { + switch k { + case "raw": + j.Raw = d.str(z, r) + case "kind": + j.Kind = JunkKind(d.str(z, r)) + } + }) + t.Junk = append(t.Junk, j) + }) + case "warnings": + d.each(x, p, func(y jsonValue, q string) { t.Warnings = append(t.Warnings, Warning(d.str(y, q))) }) + } + }) + return t +} + +// UnmarshalJSON reads the spec's JSON form of a track, as [Track.MarshalJSON] writes it. +// Unknown keys are ignored and missing keys keep their zero value; a key of the wrong type is +// an error. Enum values are taken as written. +func (t *Track) UnmarshalJSON(data []byte) error { + v, err := parseJSON(data) + if err != nil { + return err + } + var d decoder + out := d.track(v, "$") + if d.err != nil { + return d.err + } + *t = out + return nil +} diff --git a/go/json_test.go b/go/json_test.go new file mode 100644 index 0000000..e540c7d --- /dev/null +++ b/go/json_test.go @@ -0,0 +1,204 @@ +package trackparse + +import ( + "encoding/json" + "math" + "strings" + "testing" +) + +func TestJSNumber(t *testing.T) { + // Expected values from Node: JSON.stringify(n). + for _, c := range []struct { + n float64 + want string + }{ + {0, "0"}, {math.Copysign(0, -1), "0"}, {1, "1"}, {-1, "-1"}, {3167, "3167"}, + {3723.5, "3723.5"}, {0.1, "0.1"}, {0.000001, "0.000001"}, {0.0000001, "1e-7"}, + {1e21, "1e+21"}, {1e20, "100000000000000000000"}, + {123456789012345680000, "123456789012345680000"}, {1.5e-7, "1.5e-7"}, + {-2.5e300, "-2.5e+300"}, {5e-324, "5e-324"}, + {1.7976931348623157e308, "1.7976931348623157e+308"}, + {0.30000000000000004, "0.30000000000000004"}, {100, "100"}, {0.000003, "0.000003"}, + {12345.6789, "12345.6789"}, {9007199254740992, "9007199254740992"}, + {18446744073709551616, "18446744073709552000"}, + {math.NaN(), "null"}, {math.Inf(1), "null"}, {math.Inf(-1), "null"}, + } { + if got := string(appendJSNumber(nil, c.n)); got != c.want { + t.Errorf("appendJSNumber(%v) = %s, want %s", c.n, got, c.want) + } + } +} + +func TestJSString(t *testing.T) { + in := "a\"\\\b\f\n\r\t\x00\x1f\x7f<>&

é😀" + // JSON.stringify of the same string in Node. + want := "\"a\\\"\\\\\\b\\f\\n\\r\\t\\u0000\\u001f\x7f<>&

é😀\"" + if got := string(appendJSString(nil, in)); got != want { + t.Errorf("got %q\nwant %q", got, want) + } + if got := string(appendJSString(nil, "a\xffb")); got != "\"a�b\"" { + t.Errorf("invalid UTF-8: %q", got) + } +} + +func TestJSONReader(t *testing.T) { + for _, c := range []struct{ in, want string }{ + {`{"a":1,"b":[true,false,null],"c":"x"}`, `{"a":1,"b":[true,false,null],"c":"x"}`}, + {` [ 1 , 2.50 , -0 , 1e999 , -1e999 ] `, `[1,2.5,0,null,null]`}, + {`{"a":1,"b":2,"a":3}`, `{"a":3,"b":2}`}, // first place, last value + {`"😀"`, `"😀"`}, + {`"\ud800"`, "\"�\""}, + {`"\udc00x"`, "\"�x\""}, + {`"\ud800A"`, "\"�A\""}, + {`"\ud800\ud800"`, "\"��\""}, + {`"\/\q\é"`, `"/qé"`}, + {"\"a\xffb\"", "\"a�b\""}, + } { + v, err := parseJSON([]byte(c.in)) + if err != nil { + t.Errorf("parseJSON(%s): %v", c.in, err) + continue + } + if got := show(v); got != c.want { + t.Errorf("parseJSON(%s) = %s, want %s", c.in, got, c.want) + } + } + for _, bad := range []string{``, `{`, `[1,]`, `{"a" 1}`, `nul`, `"abc`, `1 2`, `-`, `"\u12"`, + strings.Repeat("[", 300) + strings.Repeat("]", 300)} { + if _, err := parseJSON([]byte(bad)); err == nil { + t.Errorf("parseJSON(%q) should fail", bad) + } + } + if v, _ := parseJSON([]byte(`1e999`)); !math.IsInf(v.num, 1) { + t.Error("1e999 is not infinity") + } +} + +func sampleTrack() Track { + feat, desc := "feat.", "at Lowlands" + year, vyear := 2015, 2016 + return Track{ + Input: "01. Noisia feat. Foreign Beggars - Stigma (Phace Remix) [HD]", + Mode: ModeYouTube, + Position: &Position{Raw: "01", Number: 1}, + Timestamp: &Timestamp{Raw: "01:23", Seconds: 83}, + Artists: []Artist{ + {Name: "Noisia", Role: RolePrimary, Source: SourceArtist}, + {Name: "Foreign Beggars", Role: RoleFeatured, Joiner: &feat, Source: SourceArtist}, + }, + Title: "Stigma", + FullTitle: "Stigma (Phace Remix)", + Versions: []Version{{ + Type: VersionTypeRemix, Raw: "Phace Remix", + Artists: []Artist{{Name: "Phace", Role: RoleRemixer, Source: SourceVersion}}, + Modifiers: []string{"extended"}, Descriptor: &desc, Year: &vyear, + UnknownArtist: true, Delimiter: DelimiterParen, + }}, + Year: &year, + Flags: Flags{Explicit: true, UnknownTitle: true}, + Junk: []Junk{{Raw: "HD", Kind: JunkKindQuality}}, + Warnings: []Warning{WarningNoSeparator, "somethingNew"}, + } +} + +func TestTrackJSONRoundTrip(t *testing.T) { + tr := sampleTrack() + b, err := tr.MarshalJSON() + if err != nil { + t.Fatal(err) + } + want := `{"input":"01. Noisia feat. Foreign Beggars - Stigma (Phace Remix) [HD]","mode":"youtube",` + + `"position":{"raw":"01","number":1},"timestamp":{"raw":"01:23","seconds":83},` + + `"artists":[{"name":"Noisia","role":"primary","joiner":null,"source":"artist"},` + + `{"name":"Foreign Beggars","role":"featured","joiner":"feat.","source":"artist"}],` + + `"title":"Stigma","fullTitle":"Stigma (Phace Remix)","versions":[{"type":"remix",` + + `"raw":"Phace Remix","artists":[{"name":"Phace","role":"remixer","joiner":null,` + + `"source":"version"}],"modifiers":["extended"],"descriptor":"at Lowlands","year":2016,` + + `"unknownArtist":true,"delimiter":"("}],"year":2015,"flags":{"explicit":true,` + + `"clean":false,"unknownArtist":false,"unknownTitle":true},"junk":[{"raw":"HD",` + + `"kind":"quality"}],"warnings":["noSeparator","somethingNew"]}` + if string(b) != want { + t.Errorf("MarshalJSON:\n%s\nwant\n%s", b, want) + } + var back Track + if err := json.Unmarshal(b, &back); err != nil { + t.Fatal(err) + } + b2, _ := back.MarshalJSON() + if string(b2) != want { + t.Errorf("round trip:\n%s", b2) + } + // encoding/json calls MarshalJSON; the value is the same. + viaStd, err := json.Marshal(tr) + if err != nil || string(viaStd) != want { + t.Errorf("json.Marshal: %s %v", viaStd, err) + } + // An empty track still has every key, with [] for lists. + empty, _ := Track{}.MarshalJSON() + if string(empty) != `{"input":"","mode":"","position":null,"timestamp":null,"artists":[],`+ + `"title":"","fullTitle":"","versions":[],"year":null,"flags":{"explicit":false,`+ + `"clean":false,"unknownArtist":false,"unknownTitle":false},"junk":[],"warnings":[]}` { + t.Errorf("empty track: %s", empty) + } + if err := json.Unmarshal([]byte(`{"title":5}`), &back); err == nil { + t.Error("a number title should not unmarshal") + } + if err := json.Unmarshal([]byte(`{"artists":[{"joiner":1}]}`), &back); err == nil { + t.Error("a number joiner should not unmarshal") + } +} + +func TestTracklistJSON(t *testing.T) { + first, last := 0.0, 130.5 + l := Tracklist{ + SpecVersion: SpecVersion, + Entries: []Entry{{ + Line: 1, Kind: EntryKindTrack, Eol: EolCRLF, Raw: "00:00 A - B", + Parts: Parts{Time: "00:00", Gap: " ", Rest: "A - B"}, + Time: &TracklistTime{Raw: "00:00", Seconds: 0}, + }}, + Warnings: []TracklistWarning{{ + Code: WarningCodeTimeOutOfOrder, Line: 2, Severity: SeverityWarning, + Suggestion: &Suggestion{Line: 1, Raw: "01:02:21", Seconds: 3741}, + }}, + Stats: Stats{Lines: 1, Tracks: 1, Timed: 1, FirstTime: &first, LastTime: &last}, + } + b, _ := l.MarshalJSON() + want := `{"specVersion":"` + SpecVersion + `","entries":[{"line":1,"kind":"track","eol":"\r\n",` + + `"raw":"00:00 A - B","parts":{"lead":"","time":"00:00","gap":" ","rest":"A - B"},` + + `"time":{"raw":"00:00","seconds":0},"track":null,"layered":false}],"warnings":[{` + + `"code":"time-out-of-order","line":2,"severity":"warning","suggestion":{"line":1,` + + `"raw":"01:02:21","seconds":3741}}],"stats":{"lines":1,"tracks":1,"markers":0,` + + `"timed":1,"firstTime":0,"lastTime":130.5}}` + if string(b) != want { + t.Errorf("got\n%s\nwant\n%s", b, want) + } + line := 9 + r := EditResult{Text: "x", Warnings: []EditWarning{{Code: EditWarningCodeEditInvalid, Edit: 1, Line: &line}}} + if b, _ := r.MarshalJSON(); string(b) != `{"text":"x","changed":[],"warnings":[{"code":"edit-invalid","edit":1,"line":9}]}` { + t.Errorf("EditResult: %s", b) + } +} + +func TestEditJSON(t *testing.T) { + for _, c := range []struct { + e Edit + want string + }{ + {SetTime(2, 90), `{"op":"set-time","line":2,"seconds":90}`}, + {Shift(-10.5), `{"op":"shift","seconds":-10.5}`}, + {ShiftFrom(30, 2), `{"op":"shift","seconds":30,"from":2}`}, + {ShiftLines(5, 1, 3), `{"op":"shift","seconds":5,"lines":[1,3]}`}, + {ShiftLines(5), `{"op":"shift","seconds":5,"lines":[]}`}, + {SortByTime(), `{"op":"sort-by-time"}`}, + {SetRest(1, "E - F"), `{"op":"set-rest","line":1,"rest":"E - F"}`}, + {Insert(0, "02:00 E - F"), `{"op":"insert","after":0,"text":"02:00 E - F"}`}, + {Delete(3), `{"op":"delete","line":3}`}, + {Edit{Op: "rename", Line: 1}, `{"op":"rename"}`}, + } { + if b, _ := c.e.MarshalJSON(); string(b) != c.want { + t.Errorf("got %s, want %s", b, c.want) + } + } +} diff --git a/go/match_test.go b/go/match_test.go new file mode 100644 index 0000000..192f0b9 --- /dev/null +++ b/go/match_test.go @@ -0,0 +1,197 @@ +package trackparse + +// The fixture matcher of spec/fixtures/README.md (partial and exact), over the module's own +// JSON values. Same rules as js/test/match.ts, python/tests/match.py and rust/tests/fixtures.rs. + +import ( + "slices" + "strconv" + "testing" +) + +// show is a value as compact JSON, for messages. +func show(v jsonValue) string { return string(marshal(v)) } + +// sameScalar compares scalars as JS does: numbers by value (7 equals 7.0), strings exactly. +func sameScalar(e, a jsonValue) bool { + if e.kind != a.kind { + return false + } + switch e.kind { + case jsonNull: + return true + case jsonBool: + return e.b == a.b + case jsonNumber: + return e.num == a.num + case jsonString: + return e.str == a.str + } + return false +} + +// matchPartial is match: "partial" (README rules 1 to 4); "" on a match. +func matchPartial(expected, actual jsonValue, path string) string { + switch expected.kind { + case jsonArray: + if actual.kind != jsonArray { + return path + ": expected an array, got " + show(actual) + } + if len(actual.arr) != len(expected.arr) { + return path + ": expected " + strconv.Itoa(len(expected.arr)) + " items, got " + + strconv.Itoa(len(actual.arr)) + ": " + show(actual) + } + for i, ev := range expected.arr { + av := actual.arr[i] + p := path + "[" + strconv.Itoa(i) + "]" + // Rule 4: artist shorthand. + if ev.kind == jsonString && av.kind == jsonObject { + if name, ok := av.get("name"); ok { + if !sameScalar(ev, name) { + return p + ".name: expected " + show(ev) + ", got " + show(name) + } + continue + } + } + if d := matchPartial(ev, av, p); d != "" { + return d + } + } + return "" + case jsonObject: + if actual.kind != jsonObject { + return path + ": expected an object, got " + show(actual) + } + for _, m := range expected.obj { + av, ok := actual.get(m.key) + if !ok { + return path + "." + m.key + ": missing" + } + if d := matchPartial(m.val, av, path+"."+m.key); d != "" { + return d + } + } + return "" + } + if !sameScalar(expected, actual) { + return path + ": expected " + show(expected) + ", got " + show(actual) + } + return "" +} + +func sortedKeys(v jsonValue) []string { + keys := make([]string, len(v.obj)) + for i, m := range v.obj { + keys[i] = m.key + } + slices.Sort(keys) + return keys +} + +// matchExact is deep equality of complete values (README rule 5); "" on a match. +func matchExact(expected, actual jsonValue, path string) string { + switch { + case expected.kind == jsonArray && actual.kind == jsonArray && len(expected.arr) == len(actual.arr): + for i := range expected.arr { + if d := matchExact(expected.arr[i], actual.arr[i], path+"["+strconv.Itoa(i)+"]"); d != "" { + return d + } + } + return "" + case expected.kind == jsonObject && actual.kind == jsonObject: + ek, ak := sortedKeys(expected), sortedKeys(actual) + if !slices.Equal(ek, ak) { + return path + ": expected keys " + show(stringsValue(ek)) + ", got " + show(stringsValue(ak)) + } + for _, k := range ek { + ev, _ := expected.get(k) + av, _ := actual.get(k) + if d := matchExact(ev, av, path+"."+k); d != "" { + return d + } + } + return "" + case expected.kind == jsonArray || expected.kind == jsonObject: + return path + ": expected " + show(expected) + ", got " + show(actual) + } + if !sameScalar(expected, actual) { + return path + ": expected " + show(expected) + ", got " + show(actual) + } + return "" +} + +func stringsValue(list []string) jsonValue { + out := make([]jsonValue, len(list)) + for i, s := range list { + out[i] = jStr(s) + } + return jArr(out) +} + +// withoutSpecVersion drops a top-level specVersion (README rule 6: never compared). +func withoutSpecVersion(v jsonValue) jsonValue { + if v.kind != jsonObject { + return v + } + out := jsonValue{kind: jsonObject} + for _, m := range v.obj { + if m.key != "specVersion" { + out.obj = append(out.obj, m) + } + } + return out +} + +// matches is the fixture matcher; "" on a match. +func matches(expected, actual jsonValue, exact bool) string { + e, a := withoutSpecVersion(expected), withoutSpecVersion(actual) + if exact { + return matchExact(e, a, "$") + } + return matchPartial(e, a, "$") +} + +func mustJSON(t *testing.T, text string) jsonValue { + t.Helper() + v, err := parseJSON([]byte(text)) + if err != nil { + t.Fatalf("bad JSON %s: %v", text, err) + } + return v +} + +func TestMatcher(t *testing.T) { + cases := []struct { + expected, actual string + exact, ok bool + }{ + // Rule 1: extra keys are ignored in partial mode; an explicit null must be null. + {`{"title":"A"}`, `{"title":"A","year":null}`, false, true}, + {`{"year":null}`, `{"year":2015}`, false, false}, + {`{"year":null}`, `{}`, false, false}, + // Rule 2: arrays match in length and order. + {`{"a":[1,2]}`, `{"a":[1,2,3]}`, false, false}, + {`{"a":[2,1]}`, `{"a":[1,2]}`, false, false}, + // Rule 3: scalars strictly; numbers by value. + {`7`, `7.0`, false, true}, + {`"a"`, `"A"`, false, false}, + {`true`, `1`, false, false}, + // Rule 4: artist shorthand. + {`["Noisia",{"name":"Foreign Beggars","role":"featured"}]`, + `[{"name":"Noisia","role":"primary"},{"name":"Foreign Beggars","role":"featured"}]`, false, true}, + {`["Noisia"]`, `[{"name":"Phace"}]`, false, false}, + {`["Noisia"]`, `["Noisia"]`, false, true}, + // Rule 5: exact. + {`{"a":1}`, `{"a":1,"b":2}`, true, false}, + {`{"b":2,"a":1}`, `{"a":1,"b":2}`, true, true}, + {`["Noisia"]`, `[{"name":"Noisia"}]`, true, false}, + // Rule 6: a top-level specVersion is never compared. + {`{"specVersion":"9","x":1}`, `{"specVersion":"0.1","x":1}`, true, true}, + } + for _, c := range cases { + d := matches(mustJSON(t, c.expected), mustJSON(t, c.actual), c.exact) + if (d == "") != c.ok { + t.Errorf("matches(%s, %s, exact=%v) = %q, want ok=%v", c.expected, c.actual, c.exact, d, c.ok) + } + } +} diff --git a/go/mode.go b/go/mode.go new file mode 100644 index 0000000..16b4899 --- /dev/null +++ b/go/mode.go @@ -0,0 +1,294 @@ +package trackparse + +// R2: mode resolution, platform suffixes, filename handling and youtube pipes (js/src/mode.ts, +// rust/src/mode.rs). + +// positionedJunk is a junk fragment with its absolute offset (R9 orders junk by it). +type positionedJunk struct { + raw string + // kind is a junk kind; keywords.junk values pass through as given. + kind JunkKind + pos int +} + +// piece is a contiguous piece of the normalized string and its absolute offset. +type piece struct { + text []rune + base int +} + +// preludeResult is the outcome of R2. +type preludeResult struct { + mode Mode + // working is the working string (R2.4 step 2 or 4), or the artist piece in the + // "artist | title" case. + working piece + // pipeTitle is the R2.4 step 3 title piece when two dash-less pipe segments remain. + pipeTitle *piece + junk []positionedJunk +} + +// asciiLowerRunes lowercases A-Z only. +func asciiLowerRunes(t []rune) []rune { + out := make([]rune, len(t)) + for i, r := range t { + if r >= 'A' && r <= 'Z' { + r += 'a' - 'A' + } + out[i] = r + } + return out +} + +// hasRuneSuffix reports whether t ends with suffix. +func hasRuneSuffix(t, suffix []rune) bool { + if len(suffix) > len(t) { + return false + } + off := len(t) - len(suffix) + for i, r := range suffix { + if t[off+i] != r { + return false + } + } + return true +} + +// runeIndex is the first index of r in t, or -1. +func runeIndex(t []rune, r rune) int { + for i, x := range t { + if x == r { + return i + } + } + return -1 +} + +// lastRuneIndex is the last index of r in t, or -1. +func lastRuneIndex(t []rune, r rune) int { + for i := len(t) - 1; i >= 0; i-- { + if t[i] == r { + return i + } + } + return -1 +} + +// stripPlatformSuffixes is R2.2: strip trailing platform suffixes (longest first, repeatedly). +func stripPlatformSuffixes(s []rune, c *ctx, junk *[]positionedJunk) []rune { + text := append([]rune(nil), s...) + for stripped := true; stripped; { + stripped = false + lower := asciiLowerRunes(text) + for _, suffix := range c.t.platformSuffixes { + suffixLower := []rune(asciiLower(suffix)) + if !hasRuneSuffix(lower, suffixLower) { + continue + } + start := len(text) - len(suffixLower) + *junk = append(*junk, positionedJunk{ + raw: string(tail(text, start+3)), + kind: JunkKindPlatform, + pos: utf16Len(sub(text, 0, start)) + 3, + }) + text = sub(text, 0, start) + stripped = true + break + } + } + return text +} + +// hasExtension reports whether s ends in a known file extension (R2.3). +func hasExtension(s []rune, c *ctx) bool { + dot := lastRuneIndex(s, '.') + if dot < 0 { + return false + } + return c.t.extensions.has(asciiLower(string(tail(s, dot+1)))) +} + +// splitPipes splits a skeleton at top-level " | " and " || " separators into trimmed segments +// (R2.4). +func splitPipes(sk skel) []segment { + t := sk.text + type cut struct{ a, b int } + var cuts []cut + for i := 1; i < len(t); i++ { + if before(t, i) == ' ' && at(t, i) == '|' { + bars := 1 + if at(t, i+1) == '|' { + bars = 2 + } + if at(t, i+bars) == ' ' { + cuts = append(cuts, cut{i - 1, i + bars + 1}) + i += bars + } + } + } + cuts = append(cuts, cut{len(t), len(t)}) + segments := make([]segment, 0, len(cuts)) + start := 0 + for _, k := range cuts { + s, e := start, k.a + for s < e && at(t, s) == ' ' { + s++ + } + for e > s && before(t, e) == ' ' { + e-- + } + segments = append(segments, segment{skel: sliceSkel(&sk, s, e), start: s, end: e}) + start = k.b + } + return segments +} + +// trailingJunkPhrase is the R8.4 test: the text ends with an unbracketed junk phrase (genres +// excluded). It gives the code-point index where the phrase starts and its kind. +func trailingJunkPhrase(text []rune, c *ctx) (int, string, bool) { + spans := wordSpans(text) + words := spanTexts(spans) + m, ok := c.t.junkPhrases.matchEnding(words, len(spans)) + if !ok { + return 0, "", false + } + first := len(spans) - m.length + if first < 0 || first >= len(spans) { + return 0, "", false + } + return spans[first].start, m.value, true +} + +// junkTextKind is the R5.1 junk kind of a whole text, if it is junk. +func junkTextKind(text string, c *ctx) (string, bool) { + words := splitWords(text) + if len(words) == 0 { + return "", false + } + return junkKindOf(words, c) +} + +// looksLikeYoutube is the R2.1 youtube signals besides platform suffixes. +func looksLikeYoutube(sk skel, c *ctx) bool { + if len(splitPipes(sk)) > 1 { + return true + } + for _, ig := range groupsOf(&sk) { + if kind, ok := junkTextKind(ig.group.inner, c); ok && kind != "genre" { + return true + } + } + _, _, ok := trailingJunkPhrase(sk.text, c) + return ok +} + +// prelude is R2 on the normalized string. +func prelude(normalized string, requested requestedMode, c *ctx) preludeResult { + var junk []positionedJunk + text := stripPlatformSuffixes([]rune(normalized), c, &junk) + hadPlatform := len(junk) > 0 + + var mode Mode + switch { + case requested.kind == requestMode: + mode = requested.mode // R13.6: tracklist is explicit only; R2.3 and R2.4 do not run. + case hasExtension(text, c): + mode = ModeFilename + default: + mode = ModeClean + } + + if mode == ModeFilename { + // R2.3: strip the extension, trim, then "_" becomes a space when there is no space. + if hasExtension(text, c) { + if dot := lastRuneIndex(text, '.'); dot >= 0 { + text = sub(text, 0, dot) + } + } + text = jsTrimRunes(text) + if runeIndex(text, ' ') < 0 && runeIndex(text, '_') >= 0 { + spaced := make([]rune, len(text)) + for i, r := range text { + if r == '_' { + r = ' ' + } + spaced[i] = r + } + text = jsTrimRunes(spaced) + } + } + + sk, unbalanced := scan(text, 0) + if unbalanced { + c.warn(WarningUnbalancedBrackets) + } + if requested.kind == requestAuto && mode == ModeClean && + (hadPlatform || looksLikeYoutube(sk, c)) { + mode = ModeYouTube + } + + if mode != ModeYouTube { + return preludeResult{mode: mode, working: piece{text: text, base: 0}, junk: junk} + } + working, pipeTitle := splitYoutubePipes(sk, c, &junk) + return preludeResult{mode: mode, working: working, pipeTitle: pipeTitle, junk: junk} +} + +// pieceOf is the rendered text of a segment with its absolute offset. +func pieceOf(seg segment) piece { + return piece{text: []rune(renderSkel(&seg.skel)), base: startPos(&seg.skel, 0)} +} + +// splitYoutubePipes is R2.4. +func splitYoutubePipes(sk skel, c *ctx, junk *[]positionedJunk) (piece, *piece) { + segments := splitPipes(sk) + if len(segments) <= 1 { + return piece{text: []rune(renderSkel(&sk)), base: 0}, nil + } + + var remaining []segment + for _, seg := range segments { + text := collapseSpaces(renderSkel(&seg.skel)) + // R2.4 step 1: a segment with a spaced dash is an artist/title candidate, never junk. + kind, isJunk := "", false + if !hasSpacedDash(seg.skel.text) { + kind, isJunk = junkTextKind(text, c) + } + switch { + case isJunk && kind != "": + *junk = append(*junk, positionedJunk{raw: text, kind: JunkKind(kind), pos: startPos(&seg.skel, 0)}) + case text != "": + remaining = append(remaining, seg) + } + } + pushOther := func(keep int) { + for i, seg := range remaining { + if i == keep { + continue + } + *junk = append(*junk, positionedJunk{ + raw: collapseSpaces(renderSkel(&seg.skel)), + kind: JunkKindOther, + pos: startPos(&seg.skel, 0), + }) + } + } + + for i, seg := range remaining { + if hasSpacedDash(seg.skel.text) { + pushOther(i) + return pieceOf(seg), nil + } + } + if len(remaining) == 2 { + c.warn(WarningAmbiguousSeparator) + title := pieceOf(remaining[1]) + return pieceOf(remaining[0]), &title + } + if len(remaining) > 0 { + pushOther(0) + return pieceOf(remaining[0]), nil + } + // Every segment was junk: nothing left to parse. + return piece{}, nil +} diff --git a/go/norace_test.go b/go/norace_test.go new file mode 100644 index 0000000..9af1159 --- /dev/null +++ b/go/norace_test.go @@ -0,0 +1,7 @@ +//go:build !race + +package trackparse + +// raceEnabled is true under -race, which makes the code several times slower: the property +// tests run fewer cases and the time ceilings are wider. +const raceEnabled = false diff --git a/go/normalize.go b/go/normalize.go new file mode 100644 index 0000000..92f47e1 --- /dev/null +++ b/go/normalize.go @@ -0,0 +1,90 @@ +package trackparse + +// R1: normalization (js/src/normalize.ts, rust/src/normalize.rs). + +// isRemoved is R1.2: the invisible characters removed outright. ZWNJ and ZWJ (U+200C, U+200D) +// are kept (ZWJ emoji). U+E000 is reserved as the R3.4 group placeholder, so it can never occur +// in input. +func isRemoved(r rune) bool { + switch r { + case 0x200b, 0x2060, 0xfeff, 0x00ad, ph: + return true + } + return false +} + +// mapRune is R1.3 brackets, R1.4 quotes and R1.5 dashes to ASCII. ok is false for a removed +// character. +func mapRune(r rune) (rune, bool) { + if isRemoved(r) { + return 0, false + } + if r >= 0x2010 && r <= 0x2015 { + return '-', true // R1.5 + } + switch r { + case 0xff08: + return '(', true + case 0xff09: + return ')', true + case 0xff3b, 0x3010, 0x3014: + return '[', true + case 0xff3d, 0x3011, 0x3015: + return ']', true + case 0xff5b: + return '{', true + case 0xff5d: + return '}', true + case 0x201c, 0x201d, 0x201e, 0x00ab, 0x00bb, 0x300c, 0x300d, 0x300e, 0x300f, 0xff02: + return '"', true + case 0x2018, 0x2019, 0x201a, 0x0060, 0x00b4: + return '\'', true + case 0x2212, 0xfe58, 0xfe63, 0xff0d: + return '-', true + } + return r, true +} + +// collapseSpacedDashRuns is the second half of R1.5: a run of two or more "-" with whitespace +// on both sides becomes one "-". +func collapseSpacedDashRuns(t []rune) []rune { + out := make([]rune, 0, len(t)) + i := 0 + for i < len(t) { + r := t[i] + if r != '-' { + out = append(out, r) + i++ + continue + } + j := i + for at(t, j) == '-' { + j++ + } + spaced := j-i >= 2 && isWhitespace(before(t, i)) && isWhitespace(at(t, j)) + if spaced { + out = append(out, '-') + } else { + for k := i; k < j; k++ { + out = append(out, '-') + } + } + i = j + } + return out +} + +// normalize is R1 on a track string. It is idempotent. +func normalize(input string) string { + src := nfc(input) + mapped := make([]rune, 0, len(src)) + for _, r := range src { + if m, ok := mapRune(r); ok { + mapped = append(mapped, m) + } + } + // R1.6: every whitespace code point becomes one space, runs collapsed, trimmed. R1.8: + // removing invisibles can leave a decomposed sequence behind; compose again so that + // normalize stays idempotent. + return nfc(collapseRunes(collapseSpacedDashRuns(mapped))) +} diff --git a/go/options.go b/go/options.go new file mode 100644 index 0000000..1f560bd --- /dev/null +++ b/go/options.go @@ -0,0 +1,718 @@ +package trackparse + +import "math" + +// R12 options: the public option structs, the edit constructors, and the resolved forms the +// pipeline reads. +// +// Two doors lead to a resolved form: the typed structs below, and loose JSON (internal/wire), +// which is resolved with exactly the fallbacks of the JS reference (a bad value means the +// default, R0.8). The typed enums are strings, so the typed door applies the same fallbacks to +// a string the JSON door would get: an unknown name behaves as it does in JavaScript. Only the +// empty string differs: it is the zero value, which means the default (JavaScript reads an +// empty string as an unknown name; any other unknown name says that here). Fields whose zero +// value is also a meaningful JavaScript value are pointers ([FormatOptions].FeatMarker, +// [TracklistOptions].AudioSeconds), set with [Ptr]. So every JavaScript option value has a +// typed equivalent. Resolution never fails. + +// Ptr returns a pointer to a copy of v. It sets the pointer fields of the options: +// +// trackparse.FormatOptions{FeatMarker: trackparse.Ptr("ft.")} +// trackparse.TracklistOptions{AudioSeconds: trackparse.Ptr(3600.0)} +func Ptr[T any](v T) *T { + return &v +} + +// SplitAnd is when the word "and" splits a credit list (R7.3). "&" and the other joiners always +// split. The zero value means [SplitAndAuto]. +type SplitAnd string + +// The SplitAnd values. In [ParseOptions] any other string behaves as [SplitAndAlways], as in +// the JavaScript package; in [TracklistOptions] it behaves as [SplitAndAuto]. +const ( + SplitAndAuto SplitAnd = "auto" + SplitAndAlways SplitAnd = "always" + SplitAndNever SplitAnd = "never" +) + +// FeatPlacement is where [FormatWith] writes featured artists (R11.2). The zero value means +// [FeatSource]. +type FeatPlacement string + +// The FeatPlacement values. Any other string places featured artists nowhere, as in the +// JavaScript package. +const ( + FeatSource FeatPlacement = "source" + FeatArtist FeatPlacement = "artist" + FeatTitle FeatPlacement = "title" + FeatOmit FeatPlacement = "omit" +) + +// JoinerStyle is whether [FormatWith] writes joiners as written or in their canonical form +// (R11.5). The zero value means [JoinersOriginal]. +type JoinerStyle string + +// The JoinerStyle values. Any other string behaves as [JoinersOriginal]. +const ( + JoinersOriginal JoinerStyle = "original" + JoinersCanonical JoinerStyle = "canonical" +) + +// VersionsOption is whether [FormatWith] writes the versions (R11.3). The zero value means +// [VersionsAll]. +type VersionsOption string + +// The VersionsOption values. Any other string behaves as [VersionsNone], as in the JavaScript +// package. +const ( + VersionsAll VersionsOption = "all" + VersionsNone VersionsOption = "none" +) + +// VersionHead is an extra version head word and the version type it means, such as +// VersionHead{Key: "rerub", Type: VersionTypeRework}. +type VersionHead struct { + // Key is the word or phrase, matched with ASCII lowercasing. + Key string + // Type is the version type it gives. Any string is kept as given in the output. + Type VersionType +} + +// JunkPhrase is an extra junk phrase and its kind, such as +// JunkPhrase{Phrase: "out now", Kind: JunkKindPromo}. +type JunkPhrase struct { + // Phrase is the phrase, matched with ASCII lowercasing. + Phrase string + // Kind is the junk kind it gives. Any string is kept as given in the output. + Kind JunkKind +} + +// Keywords is extra vocabulary, added to the built-in word lists (R12). The two maps of the +// JavaScript options are ordered slices here: a repeated key keeps its first place and takes +// the last value, and integer-like keys come first in ascending order, exactly as JavaScript +// reads an object. +type Keywords struct { + // VersionHeads are extra version heads. + VersionHeads []VersionHead + // Descriptors are extra descriptor words (Extended, Deluxe). + Descriptors []string + // Genres are extra genre names. + Genres []string + // Junk are extra junk phrases. + Junk []JunkPhrase + // FeatMarkers are extra markers that introduce featured artists. + FeatMarkers []string +} + +// isEmpty reports whether k adds no word, so the default tables can be shared. +func (k *Keywords) isEmpty() bool { + return len(k.VersionHeads) == 0 && len(k.Descriptors) == 0 && len(k.Genres) == 0 && + len(k.Junk) == 0 && len(k.FeatMarkers) == 0 +} + +// ParseOptions are the options of [ParseWith], [ParseArtistsWith] and [NewParser] (R12). The +// zero value is what [Parse] uses. +type ParseOptions struct { + // Mode is the mode; the zero value means [ModeAuto], which picks one from the string. + Mode Mode + // Uploader is the channel name, used in youtube mode as the artist when the title has no + // separator (R6.8). Empty means none. + Uploader string + // KnownArtists are names that must never be split (R7.3a): Chase & Status, Above & Beyond. + KnownArtists []string + // SplitAnd is when "and" splits a credit list; the zero value means [SplitAndAuto]. + SplitAnd SplitAnd + // Keywords is extra vocabulary. + Keywords Keywords +} + +// FormatOptions are the options of [FormatWith] (R11). The zero value is what [Format] uses. +type FormatOptions struct { + // Feat is where featured artists go; the zero value means [FeatSource] (where they were + // found). + Feat FeatPlacement + // FeatMarker is the marker written in front of featured lists instead of the one in the + // input. Nil means the input's marker; a pointer to "" writes an empty marker, as the + // JavaScript option featMarker: "" does. Set it with [Ptr]. + FeatMarker *string + // Joiners is the joiner style; the zero value means [JoinersOriginal]. + Joiners JoinerStyle + // Versions is whether versions are written; the zero value means [VersionsAll]. + Versions VersionsOption + // OmitProducers leaves out the prod. credits (the JavaScript option producers: false). + OmitProducers bool + // Position writes the position in front. + Position bool +} + +// TracklistOptions are the options of [ParseTracklistWith] and [ApplyEditsWith] (R13.10). The +// zero value is what [ParseTracklist] uses. +type TracklistOptions struct { + // Mode is the per-line parse mode; the zero value means [ModeTracklist]. [ModeAuto] picks + // a mode per line. + Mode Mode + // KnownArtists are names that must never be split (R7.3a). + KnownArtists []string + // SplitAnd is when "and" splits a credit list; the zero value means [SplitAndAuto]. + SplitAnd SplitAnd + // Keywords is extra vocabulary for the per-line parse. + Keywords Keywords + // AudioSeconds is the length of the audio in seconds; it enables time-after-audio-end. + // Nil means unknown, and so do negative and non-finite values. A pointer to 0 is an audio + // of length 0, as the JavaScript option audioSeconds: 0. Set it with [Ptr]. + AudioSeconds *float64 + // MarkerWords are extra marker words (R13.3): a line that is only such a word is a marker. + MarkerWords []string +} + +// SetTime is the edit that rewrites the time of line, keeping its written style (R13.9.2). +func SetTime(line int, seconds float64) Edit { + return Edit{Op: EditOpSetTime, Line: line, Seconds: seconds} +} + +// Shift is the edit that adds seconds to every timed line of the text. +func Shift(seconds float64) Edit { + return Edit{Op: EditOpShift, Seconds: seconds} +} + +// ShiftFrom is the edit that adds seconds to every timed line from line from on. +func ShiftFrom(seconds float64, from int) Edit { + return Edit{Op: EditOpShift, Seconds: seconds, From: &from} +} + +// ShiftLines is the edit that adds seconds to the given lines only. +func ShiftLines(seconds float64, lines ...int) Edit { + return Edit{Op: EditOpShift, Seconds: seconds, Lines: append([]int{}, lines...)} +} + +// SortByTime is the edit that sorts the timed lines stably, each with the untimed lines after +// it (R13.9.4). +func SortByTime() Edit { + return Edit{Op: EditOpSortByTime} +} + +// SetRest is the edit that replaces everything after the time and gap of line. +func SetRest(line int, rest string) Edit { + return Edit{Op: EditOpSetRest, Line: line, Rest: rest} +} + +// Insert is the edit that inserts text as a new line after line after (0: at the start). +func Insert(after int, text string) Edit { + return Edit{Op: EditOpInsert, After: after, Text: text} +} + +// Delete is the edit that removes line. +func Delete(line int) Edit { + return Edit{Op: EditOpDelete, Line: line} +} + +// --------------------------------------------------------------------------------------------- +// Resolved forms + +// requestKind is how options.mode reached the pipeline. +type requestKind uint8 + +const ( + // requestAuto: missing, null or "auto". + requestAuto requestKind = iota + // requestMode: one of the four mode names. + requestMode + // requestOther: any other value. JS then skips the R2.1 youtube detection but still + // detects filenames. + requestOther +) + +// requestedMode is options.mode as the pipeline sees it; mode is set for requestMode only. +type requestedMode struct { + kind requestKind + mode Mode +} + +// splitAndMode is options.splitAnd as the pipeline sees it. +type splitAndMode uint8 + +const ( + splitAuto splitAndMode = iota + splitAlways + splitNever +) + +// kv is one key/value pair of an options object, in JS Object.entries order. +type kv struct { + key string + value string +} + +// keywordLists is options.keywords with the maps in JS Object.entries order. Types and kinds +// stay strings: JS passes any string value through to the output. +type keywordLists struct { + versionHeads []kv + descriptors []string + genres []string + junk []kv + featMarkers []string +} + +// resolvedOptions are parse options after the R0.8 fallbacks. +type resolvedOptions struct { + mode requestedMode + // uploader is the R6.8 channel name; empty means none (JS treats "" as none too). + uploader string + knownArtists []string + splitAnd splitAndMode + // keywords is nil for the default tables. + keywords *keywordLists +} + +// featMode is options.feat as R11 reads it: an unknown value places featured artists nowhere. +type featMode uint8 + +const ( + featSource featMode = iota + featArtist + featTitle + featOmit +) + +// resolvedFormat are format options after the fallbacks. +type resolvedFormat struct { + feat featMode + // featMarker is nil when the input's marker is kept. + featMarker *string + canonical bool + versions bool + producers bool + position bool +} + +// resolvedTracklist are tracklist options after the R13.10 fallbacks. +type resolvedTracklist struct { + // parse are the options of the per-line parse. + parse resolvedOptions + // audioSeconds is nil when unknown. + audioSeconds *float64 + markerWords []string +} + +// modeByName is a Mode for one of the four names of a parsed mode. +func modeByName(name string) (Mode, bool) { + switch Mode(name) { + case ModeClean, ModeYouTube, ModeFilename, ModeTracklist: + return Mode(name), true + } + return "", false +} + +// requestFor is the R2 request for a mode name given as a string. +func requestFor(name string) requestedMode { + if name == "auto" { + return requestedMode{kind: requestAuto} + } + if m, ok := modeByName(name); ok { + return requestedMode{kind: requestMode, mode: m} + } + return requestedMode{kind: requestOther} +} + +// parseSplitAnd is options.splitAnd of a parse: anything but auto and never (or missing) +// behaves as always in JS. +func parseSplitAnd(name string) splitAndMode { + switch name { + case "auto": + return splitAuto + case "never": + return splitNever + } + return splitAlways +} + +// tracklistSplitAnd is options.splitAnd of a tracklist: only always and never count. +func tracklistSplitAnd(name string) splitAndMode { + switch name { + case "always": + return splitAlways + case "never": + return splitNever + } + return splitAuto +} + +// tracklistRequest is options.mode of a tracklist: a mode name or auto; anything else means +// tracklist. +func tracklistRequest(name string) requestedMode { + if name == "auto" { + return requestedMode{kind: requestAuto} + } + if m, ok := modeByName(name); ok { + return requestedMode{kind: requestMode, mode: m} + } + return requestedMode{kind: requestMode, mode: ModeTracklist} +} + +// arrayIndex reports whether key is a canonical array index ("0", "17"; not "01"), which JS +// lists first among an object's keys, in ascending order. +func arrayIndex(key string) (uint64, bool) { + if key == "" || len(key) > 10 { + return 0, false + } + if len(key) > 1 && key[0] == '0' { + return 0, false + } + var n uint64 + for i := 0; i < len(key); i++ { + c := key[i] + if c < '0' || c > '9' { + return 0, false + } + n = n*10 + uint64(c-'0') + } + return n, n <= 0xfffffffe +} + +// jsEntries is the Object.entries order of an object built from pairs: a repeated key keeps +// its first place and takes the last value; integer-like keys come first in ascending order, +// then the others in insertion order. +func jsEntries(pairs []kv) []kv { + unique := make([]kv, 0, len(pairs)) + index := make(map[string]int, len(pairs)) + for _, p := range pairs { + if i, ok := index[p.key]; ok { + unique[i].value = p.value + continue + } + index[p.key] = len(unique) + unique = append(unique, p) + } + type indexed struct { + n uint64 + p kv + } + var ints []indexed + rest := make([]kv, 0, len(unique)) + for _, p := range unique { + if n, ok := arrayIndex(p.key); ok { + ints = append(ints, indexed{n, p}) + } else { + rest = append(rest, p) + } + } + // Keys are unique, so the order of ints is total; insertion sort keeps it simple and stable. + for i := 1; i < len(ints); i++ { + for j := i; j > 0 && ints[j].n < ints[j-1].n; j-- { + ints[j], ints[j-1] = ints[j-1], ints[j] + } + } + out := make([]kv, 0, len(unique)) + for _, x := range ints { + out = append(out, x.p) + } + return append(out, rest...) +} + +// sanitizeAll is sanitize over a list of strings (a fresh slice, never the caller's). +func sanitizeAll(list []string) []string { + out := make([]string, len(list)) + for i, s := range list { + out[i] = sanitize(s) + } + return out +} + +// resolveKeywords is the typed keywords; nil when they add nothing. +func resolveKeywords(k *Keywords) *keywordLists { + if k.isEmpty() { + return nil + } + heads := make([]kv, 0, len(k.VersionHeads)) + for _, h := range k.VersionHeads { + heads = append(heads, kv{sanitize(h.Key), sanitize(string(h.Type))}) + } + junk := make([]kv, 0, len(k.Junk)) + for _, j := range k.Junk { + junk = append(junk, kv{sanitize(j.Phrase), sanitize(string(j.Kind))}) + } + return &keywordLists{ + versionHeads: jsEntries(heads), + descriptors: sanitizeAll(k.Descriptors), + genres: sanitizeAll(k.Genres), + junk: jsEntries(junk), + featMarkers: sanitizeAll(k.FeatMarkers), + } +} + +// resolveParse is the typed door to resolvedOptions. +func resolveParse(o *ParseOptions) resolvedOptions { + r := resolvedOptions{ + uploader: sanitize(o.Uploader), + knownArtists: sanitizeAll(o.KnownArtists), + keywords: resolveKeywords(&o.Keywords), + } + if o.Mode != "" { + r.mode = requestFor(string(o.Mode)) + } + if o.SplitAnd != "" { + r.splitAnd = parseSplitAnd(string(o.SplitAnd)) + } + return r +} + +// resolveFormat is the typed door to resolvedFormat. +func resolveFormat(o *FormatOptions) resolvedFormat { + r := resolvedFormat{ + canonical: o.Joiners == JoinersCanonical, + versions: o.Versions == "" || o.Versions == VersionsAll, + producers: !o.OmitProducers, + position: o.Position, + } + switch o.Feat { + case "", FeatSource: + r.feat = featSource + case FeatArtist: + r.feat = featArtist + case FeatTitle: + r.feat = featTitle + default: + r.feat = featOmit + } + if o.FeatMarker != nil { + m := sanitize(*o.FeatMarker) + r.featMarker = &m + } + return r +} + +// audio is the R13.10 audio length: nil unless given, finite and not negative. +func audio(seconds *float64) *float64 { + if seconds == nil { + return nil + } + v := *seconds + if math.IsNaN(v) || math.IsInf(v, 0) || v < 0 { + return nil + } + return &v +} + +// resolveTracklist is the typed door to resolvedTracklist. +func resolveTracklist(o *TracklistOptions) resolvedTracklist { + r := resolvedTracklist{ + parse: resolvedOptions{ + mode: requestedMode{kind: requestMode, mode: ModeTracklist}, + knownArtists: sanitizeAll(o.KnownArtists), + keywords: resolveKeywords(&o.Keywords), + }, + audioSeconds: audio(o.AudioSeconds), + markerWords: sanitizeAll(o.MarkerWords), + } + if o.Mode != "" { + r.parse.mode = tracklistRequest(string(o.Mode)) + } + r.parse.splitAnd = tracklistSplitAnd(string(o.SplitAnd)) + return r +} + +// --------------------------------------------------------------------------------------------- +// The JSON door (internal/wire): loose values with the JS fallbacks. + +// stringList is an option list as JS reads it at run time (R0.8): only an array's strings +// count. +func stringList(v jsonValue, ok bool) []string { + if !ok || v.kind != jsonArray { + return nil + } + var out []string + for _, item := range v.arr { + if item.kind == jsonString { + out = append(out, item.str) + } + } + return out +} + +// stringEntries is an option map as JS reads it at run time (R0.8): only a plain object's +// string values count, in Object.entries order. +func stringEntries(v jsonValue, ok bool) []kv { + if !ok || v.kind != jsonObject { + return nil + } + pairs := make([]kv, 0, len(v.obj)) + for _, m := range v.obj { + if m.val.kind == jsonString { + pairs = append(pairs, kv{m.key, m.val.str}) + } + } + // The parser already merged repeated keys; jsEntries only reorders integer-like keys. + return jsEntries(pairs) +} + +// keywordsJSON is options.keywords from loose JSON (a plain object only). +func keywordsJSON(v jsonValue) *keywordLists { + return &keywordLists{ + versionHeads: stringEntries(v.get("versionHeads")), + descriptors: stringList(v.get("descriptors")), + genres: stringList(v.get("genres")), + junk: stringEntries(v.get("junk")), + featMarkers: stringList(v.get("featMarkers")), + } +} + +// resolveParseJSON is the JSON door to resolvedOptions, with the JS fallbacks. +func resolveParseJSON(o jsonValue) resolvedOptions { + var r resolvedOptions + if o.kind != jsonObject { + return r // safeOptions: not an object + } + // `options.mode ?? "auto"` + if m, ok := o.get("mode"); ok && m.kind != jsonNull { + if m.kind == jsonString { + r.mode = requestFor(m.str) + } else { + r.mode = requestedMode{kind: requestOther} + } + } + // `options.splitAnd ?? "auto"` + if s, ok := o.get("splitAnd"); ok && s.kind != jsonNull { + if s.kind == jsonString { + r.splitAnd = parseSplitAnd(s.str) + } else { + r.splitAnd = splitAlways + } + } + // `options.keywords ? ... : baseTables`, then isRecord: only a plain object adds words. + if k, ok := o.get("keywords"); ok && k.kind == jsonObject { + r.keywords = keywordsJSON(k) + } + if u, ok := o.get("uploader"); ok && u.kind == jsonString { + r.uploader = u.str + } + r.knownArtists = stringList(o.get("knownArtists")) + return r +} + +// truthy is JS truthiness of a JSON value. +func truthy(v jsonValue) bool { + switch v.kind { + case jsonNull: + return false + case jsonBool: + return v.b + case jsonNumber: + return v.num != 0 && !math.IsNaN(v.num) + case jsonString: + return v.str != "" + } + return true +} + +// jsString is JS String(value), what a template literal does with a non-string featMarker. +func jsString(v jsonValue) string { + switch v.kind { + case jsonNull: + return "null" + case jsonBool: + if v.b { + return "true" + } + return "false" + case jsonNumber: + switch { + case math.IsNaN(v.num): + return "NaN" + case math.IsInf(v.num, 1): + return "Infinity" + case math.IsInf(v.num, -1): + return "-Infinity" + } + return string(appendJSNumber(nil, v.num)) + case jsonString: + return v.str + case jsonArray: + // Array.prototype.join: null elements are empty. + out := "" + for i, item := range v.arr { + if i > 0 { + out += "," + } + if item.kind != jsonNull { + out += jsString(item) + } + } + return out + } + return "[object Object]" +} + +// resolveFormatJSON is the JSON door to resolvedFormat (`??` for missing and null). +func resolveFormatJSON(o jsonValue) resolvedFormat { + get := func(key string) (jsonValue, bool) { + v, ok := o.get(key) + if !ok || v.kind == jsonNull { + return jsonValue{}, false + } + return v, true + } + r := resolvedFormat{versions: true, producers: true} + if f, ok := get("feat"); ok { + switch { + case f.kind == jsonString && f.str == "source": + r.feat = featSource + case f.kind == jsonString && f.str == "artist": + r.feat = featArtist + case f.kind == jsonString && f.str == "title": + r.feat = featTitle + default: + r.feat = featOmit + } + } + // `o.featMarker !== undefined`: an explicit null is rendered as "null". + if m, ok := o.get("featMarker"); ok { + s := jsString(m) + r.featMarker = &s + } + if j, ok := get("joiners"); ok { + r.canonical = j.kind == jsonString && j.str == "canonical" + } + if v, ok := get("versions"); ok { + r.versions = v.kind == jsonString && v.str == "all" + } + if p, ok := get("producers"); ok { + r.producers = truthy(p) + } + if p, ok := get("position"); ok { + r.position = truthy(p) + } + return r +} + +// jsNumber is a JS number view of a JSON value: ok only for a number (a bool is not one). The +// value may be NaN or infinite; callers apply their own checks. +func jsNumber(v jsonValue, present bool) (float64, bool) { + if !present || v.kind != jsonNumber { + return 0, false + } + return v.num, true +} + +// resolveTracklistJSON is the JSON door to resolvedTracklist. mode, splitAnd, knownArtists and +// keywords are passed on only when well-formed; uploader is not a tracklist option. +func resolveTracklistJSON(o jsonValue) resolvedTracklist { + parse := resolveParseJSON(o) + parse.uploader = "" + parse.mode = requestedMode{kind: requestMode, mode: ModeTracklist} + if m, ok := o.get("mode"); ok && m.kind == jsonString { + parse.mode = tracklistRequest(m.str) + } + parse.splitAnd = splitAuto + if s, ok := o.get("splitAnd"); ok && s.kind == jsonString { + parse.splitAnd = tracklistSplitAnd(s.str) + } + var seconds *float64 + if n, ok := jsNumber(o.get("audioSeconds")); ok { + seconds = &n + } + return resolvedTracklist{ + parse: parse, + audioSeconds: audio(seconds), + markerWords: stringList(o.get("markerWords")), + } +} diff --git a/go/options_test.go b/go/options_test.go new file mode 100644 index 0000000..f0986fc --- /dev/null +++ b/go/options_test.go @@ -0,0 +1,367 @@ +package trackparse + +import ( + "math" + "os" + "path/filepath" + "slices" + "testing" +) + +func TestJSEntries(t *testing.T) { + got := jsEntries([]kv{{"b", "1"}, {"10", "x"}, {"a", "2"}, {"2", "y"}, {"b", "3"}, {"01", "z"}, {"4294967295", "w"}}) + want := []kv{{"2", "y"}, {"10", "x"}, {"b", "3"}, {"a", "2"}, {"01", "z"}, {"4294967295", "w"}} + if !slices.Equal(got, want) { + t.Errorf("jsEntries = %v, want %v", got, want) + } +} + +// The typed options can say everything the JSON options can: typedParse, typedFormat and +// typedTracklist map any JSON options object (a fixture's, or a loose one with wrong types) to +// typed options that resolve to the same thing. An empty string, which the typed options read +// as "the default", is mapped to another unknown name where JavaScript reads it as one. + +// unknownName is a name no option knows; JavaScript reads "" and non-strings as such a name. +const unknownName = "?" + +// typedKeywords is options.keywords as typed Keywords. +func typedKeywords(o jsonValue) Keywords { + k, ok := o.get("keywords") + if !ok || k.kind != jsonObject { + return Keywords{} + } + var out Keywords + for _, e := range stringEntries(k.get("versionHeads")) { + out.VersionHeads = append(out.VersionHeads, VersionHead{Key: e.key, Type: VersionType(e.value)}) + } + for _, e := range stringEntries(k.get("junk")) { + out.Junk = append(out.Junk, JunkPhrase{Phrase: e.key, Kind: JunkKind(e.value)}) + } + out.Descriptors = stringList(k.get("descriptors")) + out.Genres = stringList(k.get("genres")) + out.FeatMarkers = stringList(k.get("featMarkers")) + return out +} + +// given is o[key] unless it is missing or null (JS `??`). +func given(o jsonValue, key string) (jsonValue, bool) { + v, ok := o.get(key) + if !ok || v.kind == jsonNull { + return jsonValue{}, false + } + return v, true +} + +// typedParse is a JSON parse options object as ParseOptions. +func typedParse(o jsonValue) ParseOptions { + var out ParseOptions + if o.kind != jsonObject { + return out + } + if m, ok := given(o, "mode"); ok { + out.Mode = Mode(unknownName) + if m.kind == jsonString && m.str != "" { + out.Mode = Mode(m.str) + } + } + if s, ok := given(o, "splitAnd"); ok { + out.SplitAnd = SplitAndAlways + if s.kind == jsonString && s.str != "" { + out.SplitAnd = SplitAnd(s.str) + } + } + if u, ok := o.get("uploader"); ok && u.kind == jsonString { + out.Uploader = u.str + } + out.KnownArtists = stringList(o.get("knownArtists")) + out.Keywords = typedKeywords(o) + return out +} + +// typedFormat is a JSON format options object as FormatOptions. +func typedFormat(o jsonValue) FormatOptions { + var out FormatOptions + if o.kind != jsonObject { + return out + } + if f, ok := given(o, "feat"); ok { + out.Feat = FeatOmit + if f.kind == jsonString && f.str != "" { + out.Feat = FeatPlacement(f.str) + } + } + if m, ok := o.get("featMarker"); ok { + out.FeatMarker = Ptr(jsString(m)) + } + if j, ok := given(o, "joiners"); ok { + out.Joiners = JoinersOriginal + if j.kind == jsonString && j.str == "canonical" { + out.Joiners = JoinersCanonical + } + } + if v, ok := given(o, "versions"); ok { + out.Versions = VersionsNone + if v.kind == jsonString && v.str == "all" { + out.Versions = VersionsAll + } + } + if p, ok := given(o, "producers"); ok { + out.OmitProducers = !truthy(p) + } + if p, ok := given(o, "position"); ok { + out.Position = truthy(p) + } + return out +} + +// typedTracklist is a JSON tracklist options object as TracklistOptions. +func typedTracklist(o jsonValue) TracklistOptions { + var out TracklistOptions + if o.kind != jsonObject { + return out + } + if m, ok := o.get("mode"); ok && m.kind == jsonString { + out.Mode = Mode(m.str) + } + if s, ok := o.get("splitAnd"); ok && s.kind == jsonString { + out.SplitAnd = SplitAnd(s.str) + } + if n, ok := jsNumber(o.get("audioSeconds")); ok { + out.AudioSeconds = Ptr(n) + } + out.KnownArtists = stringList(o.get("knownArtists")) + out.MarkerWords = stringList(o.get("markerWords")) + out.Keywords = typedKeywords(o) + return out +} + +// emptyKeywords reports whether k adds no word (a JSON keywords object can be empty). +func emptyKeywords(k *keywordLists) bool { + return k == nil || len(k.versionHeads)+len(k.descriptors)+len(k.genres)+len(k.junk)+len(k.featMarkers) == 0 +} + +func equalResolved(a, b resolvedOptions) bool { + if a.mode != b.mode || a.uploader != b.uploader || a.splitAnd != b.splitAnd || + !slices.Equal(a.knownArtists, b.knownArtists) || emptyKeywords(a.keywords) != emptyKeywords(b.keywords) { + return false + } + if emptyKeywords(a.keywords) { + return true + } + x, y := a.keywords, b.keywords + return slices.Equal(x.versionHeads, y.versionHeads) && slices.Equal(x.junk, y.junk) && + slices.Equal(x.genres, y.genres) && slices.Equal(x.descriptors, y.descriptors) && + slices.Equal(x.featMarkers, y.featMarkers) +} + +func equalFormat(a, b resolvedFormat) bool { + return a.feat == b.feat && a.canonical == b.canonical && a.versions == b.versions && + a.producers == b.producers && a.position == b.position && + (a.featMarker == nil) == (b.featMarker == nil) && + (a.featMarker == nil || *a.featMarker == *b.featMarker) +} + +func equalAudio(a, b *float64) bool { + return (a == nil) == (b == nil) && (a == nil || *a == *b) +} + +func equalTracklist(a, b resolvedTracklist) bool { + return equalResolved(a.parse, b.parse) && equalAudio(a.audioSeconds, b.audioSeconds) && + slices.Equal(a.markerWords, b.markerWords) +} + +// looseOptions are JSON options with every kind of odd value JavaScript accepts. +var looseOptions = []string{ + `{}`, `null`, `[1]`, `"x"`, + `{"mode":"auto"}`, `{"mode":"youtube","uploader":"Noisia"}`, `{"mode":"bogus"}`, `{"mode":""}`, + `{"mode":3}`, `{"mode":null}`, `{"mode":"tracklist"}`, + `{"splitAnd":"never"}`, `{"splitAnd":"sometimes"}`, `{"splitAnd":""}`, `{"splitAnd":false}`, + `{"splitAnd":null}`, `{"splitAnd":"always"}`, + `{"uploader":""}`, `{"uploader":5}`, + `{"knownArtists":["Chase & Status",1,null]}`, `{"knownArtists":"Chase & Status"}`, + `{"keywords":"x"}`, `{"keywords":{}}`, `{"keywords":{"genres":"Neuro"}}`, + `{"keywords":{"versionHeads":{"rerub":"remix","7":"x","b":1},"junk":{"out now":"promo"},"genres":["Neuro"],"descriptors":["Deluxe"],"featMarkers":["w/"]}}`, + `{"audioSeconds":0}`, `{"audioSeconds":-1}`, `{"audioSeconds":3600}`, `{"audioSeconds":1e999}`, + `{"audioSeconds":true}`, `{"audioSeconds":"60"}`, `{"audioSeconds":null}`, + `{"markerWords":["Outro Speech",3]}`, `{"markerWords":"Break"}`, +} + +var looseFormatOptions = []string{ + `{}`, `null`, `[1]`, + `{"feat":"artist","featMarker":"ft."}`, `{"feat":"nope"}`, `{"feat":""}`, `{"feat":2}`, + `{"feat":null}`, `{"feat":"omit"}`, `{"feat":"title"}`, `{"feat":"source"}`, + `{"featMarker":""}`, `{"featMarker":null}`, `{"featMarker":3}`, `{"featMarker":[1,null,"a"]}`, + `{"featMarker":{}}`, `{"featMarker":false}`, + `{"joiners":"canonical","versions":"none"}`, `{"joiners":""}`, `{"joiners":1}`, + `{"versions":"bogus"}`, `{"versions":""}`, `{"versions":null}`, `{"versions":"all"}`, + `{"producers":false,"position":true}`, `{"producers":0,"position":"x"}`, + `{"producers":null,"position":null}`, `{"producers":"","position":[]}`, +} + +func TestTypedOptionsExpressLooseJSON(t *testing.T) { + for _, text := range looseOptions { + o := mustJSON(t, text) + typed := typedParse(o) + if a, b := resolveParse(&typed), resolveParseJSON(o); !equalResolved(a, b) { + t.Errorf("parse %s: typed %+v, JSON %+v", text, a, b) + } + tl := typedTracklist(o) + if a, b := resolveTracklist(&tl), resolveTracklistJSON(o); !equalTracklist(a, b) { + t.Errorf("tracklist %s: typed %+v, JSON %+v", text, a, b) + } + } + for _, text := range looseFormatOptions { + o := mustJSON(t, text) + typed := typedFormat(o) + if a, b := resolveFormat(&typed), resolveFormatJSON(o); !equalFormat(a, b) { + t.Errorf("format %s: typed %+v, JSON %+v", text, a, b) + } + } +} + +// TestTypedOptionsExpressEveryFixture runs every fixture of parse, parseArtists, format and +// parseTracklist through the typed API with its options mapped as above: the output bytes must +// equal the JSON door's. +func TestTypedOptionsExpressEveryFixture(t *testing.T) { + if _, err := os.Stat(specDir); err != nil { + t.Skipf("%s not found: the fixtures are not in the module zip", specDir) + } + cases := 0 + for _, path := range fixtureFiles(t, filepath.Join(specDir, "fixtures")) { + file := readJSONFile(t, path) + defaults, _ := file.get("defaults") + list, _ := file.get("cases") + for _, c := range list.arr { + fn, ok := c.getString("fn") + if !ok { + if fn, ok = defaults.getString("fn"); !ok { + fn = "parse" + } + } + input, _ := c.getString("input") + options := merged(defaults, c, "options") + formatOptions := merged(defaults, c, "formatOptions") + var typed []byte + switch fn { + case "parse": + track := ParseWith(input, typedParse(options)) + typed = marshal(&track) + case "parseArtists": + typed = marshal(artistList(ParseArtistsWith(input, typedParse(options)))) + case "format": + track := ParseWith(input, typedParse(options)) + typed = marshal(wireString(FormatWith(track, typedFormat(formatOptions)))) + case "parseTracklist": + list := ParseTracklistWith(input, typedTracklist(options)) + typed = marshal(&list) + default: + continue + } + cases++ + loose := wireCall(fn, input, options, formatOptions, jArr(nil)) + if string(typed) != string(loose) { + id, _ := c.getString("id") + t.Errorf("%s: typed options give\n%s\nJSON options give\n%s", id, typed, loose) + } + } + } + if cases < 10000 { + t.Fatalf("only %d fixture cases", cases) + } +} + +func TestPtr(t *testing.T) { + p := Ptr(0.0) + q := Ptr(0.0) + if p == q || *p != 0 { + t.Error("Ptr must return a fresh pointer to the value") + } + if r := resolveTracklist(&TracklistOptions{AudioSeconds: Ptr(0.0)}); r.audioSeconds == nil || *r.audioSeconds != 0 { + t.Error("AudioSeconds: Ptr(0.0) is an audio of length 0") + } + if r := resolveTracklist(&TracklistOptions{}); r.audioSeconds != nil || r.parse.mode != (requestedMode{kind: requestMode, mode: ModeTracklist}) { + t.Errorf("TracklistOptions defaults: %+v", r) + } + if r := resolveTracklist(&TracklistOptions{Mode: ModeAuto}); r.parse.mode.kind != requestAuto { + t.Error("TracklistOptions{Mode: ModeAuto} is auto") + } + if r := resolveTracklist(&TracklistOptions{AudioSeconds: Ptr(math.Inf(1))}); r.audioSeconds != nil { + t.Error("infinite audio") + } + if r := resolveFormat(&FormatOptions{FeatMarker: Ptr("")}); r.featMarker == nil || *r.featMarker != "" { + t.Error("FeatMarker: Ptr(\"\") is an empty marker") + } + if got := FormatWith(Parse("A feat. B - T"), FormatOptions{FeatMarker: Ptr("")}); got != "A B - T" { + t.Errorf("empty feat marker: %q", got) + } +} + +func TestTables(t *testing.T) { + tb := defaultTables() + if tb != defaultTables() || tablesFor(nil) != tb { + t.Error("default tables are not shared") + } + words := []string{"Official", "Music", "Video"} + if m, ok := tb.junkPhrases.matchAt(words, 0); !ok || m.value != "video" || m.length != 3 { + t.Errorf("junk: %+v %v", m, ok) + } + if m, ok := tb.junkOrGenre.matchAt([]string{"Drum", "&", "Bass"}, 0); !ok || m.value != "genre" || m.length != 3 { + t.Errorf("genre: %+v %v", m, ok) + } + if m, ok := tb.runWords.matchAt([]string{"dub"}, 0); !ok || m.value.typeCapable == nil || m.value.head == nil || m.value.descriptor == nil { + t.Errorf("runWords dub: %+v %v", m, ok) + } + if tb.platformSuffixes[0] != " | Free Listening on SoundCloud" { + t.Errorf("platform suffixes: %q", tb.platformSuffixes) + } + if !isUnknownToken("ID", tb) || isUnknownToken("id", tb) || !isUnknownToken("UNKNOWN", tb) { + t.Error("isUnknownToken") + } + kw := resolveKeywords(&Keywords{VersionHeads: []VersionHead{{"Rerub", VersionTypeRemix}}, FeatMarkers: []string{" W/ "}}) + k := tablesFor(kw) + if m, ok := k.heads.matchAt([]string{"RERUB"}, 0); !ok || m.value != "remix" { + t.Error("keyword head") + } + if _, ok := k.featMarkers.matchAt([]string{"w/"}, 0); !ok { + t.Error("keyword feat marker") + } + if _, ok := tb.heads.matchAt([]string{"rerub"}, 0); ok { + t.Error("keywords leaked into the default tables") + } +} + +func TestMatchKnownAt(t *testing.T) { + e := newEngine(resolveParse(&ParseOptions{KnownArtists: []string{"Chase & Status", "Björk"}})) + c := e.newCtx() + text := []rune("chase & STATUS, Bjo\u0308rk-x") + if n := matchKnownAt(text, 0, c, noRune); n != 14 { + t.Errorf("Chase & Status: %d", n) + } + if n := matchKnownAt(text, 16, c, noRune); n != 0 { + t.Errorf("Björk without the - boundary: %d", n) + } + if n := matchKnownAt(text, 16, c, '-'); n != 6 { + t.Errorf("Björk with the - boundary: %d", n) + } + if !isKnownArtist("CHASE & status", c) || isKnownArtist("Chase", c) { + t.Error("isKnownArtist") + } + c.warn(WarningNoSeparator) + c.warn(WarningNoSeparator) + if len(c.warnings) != 1 { + t.Error("warn twice") + } +} + +func TestAPISanitizesAndNeverPanics(t *testing.T) { + // With the pipeline stubbed this only checks the boundary: invalid UTF-8 is replaced. + if got := Parse("a\xe2\x82b").Input; got != "a�b" { + t.Errorf("Input = %q", got) + } + var p Parser + _ = p.Parse("x") + var np *Parser + _ = np.ParseArtists("x") + _ = ApplyEdits("00:00 A\n", []Edit{SetRest(1, "\xff"), Delete(-1)}) + _ = ParseTracklistWith("\xff", TracklistOptions{MarkerWords: []string{"\xff"}}) +} diff --git a/go/parser.go b/go/parser.go new file mode 100644 index 0000000..58a316f --- /dev/null +++ b/go/parser.go @@ -0,0 +1,226 @@ +package trackparse + +import ( + "cmp" + "slices" + "strings" +) + +// The pipeline: R1, R2, R4, R3/R6, R7, R8, R9, plus R10 runArtists (js/src/parser.ts, +// rust/src/parser.rs). The engine itself (options, tables, known keys) is in context.go. + +// uploaderBase is the offset used for uploader text, so it sorts before everything from the +// input. +const uploaderBase = -1_000_000_000 + +// skelOf scans a piece and trims it, warning on unbalanced brackets (R3.3). +func skelOf(p piece, c *ctx) skel { + sk, unbalanced := scan(p.text, p.base) + if unbalanced { + c.warn(WarningUnbalancedBrackets) + } + return trimSkel(&sk) +} + +// uploaderSkel is R6.8: the uploader minus a trailing " - Topic" and "VEVO", or nil. +func uploaderSkel(uploader string) *skel { + if uploader == "" { + return nil + } + u := normalize(uploader) + if rest, ok := strings.CutSuffix(u, " - Topic"); ok { + u = rest + } + if rest, ok := strings.CutSuffix(u, "VEVO"); ok { + u = jsTrimEnd(rest) + } + if u == "" { + return nil + } + sk, _ := scan([]rune(u), uploaderBase) + return &sk +} + +// emptyTrack is the R9.5 result for an input that is empty after R1, and the start of every +// other result. +func emptyTrack(input string, mode Mode) Track { + return Track{ + Input: input, + Mode: mode, + Artists: []Artist{}, + Versions: []Version{}, + Junk: []Junk{}, + Warnings: []Warning{}, + } +} + +// staged is the R1, R2 and R4 stage of run, kept so the tracklist probe's work is not redone. +type staged struct { + e *engine + c *ctx + pre preludeResult + track Track + // working is the skeleton after R4; nil when the input is empty after R1 (R9.5: track is + // final). + working *skel +} + +// stage runs R1, R2 and R4. +func (e *engine) stage(input string) staged { + c := e.newCtx() + norm := normalize(input) + pre := prelude(norm, e.opts.mode, c) + track := emptyTrack(input, pre.mode) + if norm == "" { + return staged{e: e, c: c, pre: pre, track: track} // R9.5 + } + + // R4 + prefix := stripPrefixes(pre.working.text, pre.working.base, pre.mode, c) + track.Timestamp = prefix.timestamp + track.Position = prefix.position + working := skelOf(piece{text: prefix.rest, base: prefix.base}, c) + return staged{e: e, c: c, pre: pre, track: track, working: &working} +} + +// run is R1 to R9 on one (already sanitized) input; listContext is the R13.4.2 flag that only +// matters in tracklist mode (R6.10). +func (e *engine) run(input string, listContext bool) Track { + return finish(e.stage(input), listContext) +} + +// runArtists is R10 on one (already sanitized) input. +func (e *engine) runArtists(input string) []Artist { + c := e.newCtx() + norm := normalize(input) + if norm == "" { + return []Artist{} + } + sk, _ := scan([]rune(norm), 0) + side := parseArtistSide(&sk, c) + artists := dedupArtists(side.credits) + for i := range artists { + artists[i].Source = SourceArtist + } + if artists == nil { + artists = []Artist{} + } + return artists +} + +// lineProbe is facts about a line's prefix and separator search, for the tracklist module +// (R13.4.2, R13.5). +type lineProbe struct { + // position: R4.2 took a position. + position bool + // spacedDash: the skeleton R6 searches (after R2 and R4) has a spaced dash (R6.1). + spacedDash bool + // empty: the input is empty after R1. + empty bool + staged staged +} + +// probe is R1, R2 and R4 only, as run does them: no artist or title parsing. finish completes +// the parse from the same stage, so a probed line is not normalized twice. +func (e *engine) probe(input string) lineProbe { + st := e.stage(input) + return lineProbe{ + position: st.track.Position != nil, + spacedDash: st.pre.pipeTitle == nil && st.working != nil && + len(splitAtSpacedDashes(st.working, true)) >= 2, + empty: st.working == nil, + staged: st, + } +} + +// finish is the parse of the probed input (R6 to R9 only). Call it once per probe: the probe's +// per-call state (warnings) is consumed. +func (p *lineProbe) finish(listContext bool) Track { + return finish(p.staged, listContext) +} + +// byPos sorts items by offset, stably (like the JS sort). +func byPos[T any](items []T, pos func(*T) int) []T { + slices.SortStableFunc(items, func(a, b T) int { return cmp.Compare(pos(&a), pos(&b)) }) + return items +} + +// finish is R6 to R9 on a staged input. +func finish(st staged, listContext bool) Track { + c, pre, track := st.c, st.pre, st.track + if st.working == nil { + return track + } + working := *st.working + + var out extracted + var artistSkel *skel + var titleSkel skel + var relaxed bool + if pre.pipeTitle != nil { + // R2.4 step 3: "artist | title", R6 skipped. + titleSkel = skelOf(*pre.pipeTitle, c) + if !working.isEmpty() { + artistSkel = &working + } + relaxed = artistSkel != nil + } else { + sep := findSeparator(separatorInput{ + skel: working, + mode: pre.mode, + uploader: uploaderSkel(st.e.opts.uploader), + listContext: listContext, + }, c) + addPeeled(&out, sep.peeled) + artistSkel = sep.artist + titleSkel = sep.title + relaxed = sep.split + } + + var artistSide artistSideResult + if artistSkel != nil { + artistSide = parseArtistSide(artistSkel, c) + } + titleSide := parseTitleSide(titleSkel, relaxed, pre.mode == ModeYouTube, &out, c) + + // R9 + versions := byPos(out.versions, func(v *versionDraft) int { return v.pos }) + for _, v := range versions { + if v.ambiguousMix { + c.warn(WarningAmbiguousMixCredit) + break + } + } + credits := slices.Concat(artistSide.credits, byPos(out.credits, func(x *credit) int { return x.pos })) + track.Artists = dedupArtists(credits) + if track.Artists == nil { + track.Artists = []Artist{} + } + track.Title = titleSide.title + track.Versions = make([]Version, 0, len(versions)) + for _, v := range versions { + track.Versions = append(track.Versions, toVersion(v)) + } + track.FullTitle = fullTitleOf(track.Title, track.Versions) + // R9.6: the first year in text order. + years := slices.Concat(artistSide.years, out.years) + years = byPos(years, func(y *positionedYear) int { return y.pos }) + if len(years) > 0 { + y := years[0].year + track.Year = &y + } + track.Flags = Flags{ + Explicit: out.explicit || artistSide.explicit, + Clean: out.clean || artistSide.clean, + UnknownArtist: artistSide.unknownArtist || out.unknownArtist, + UnknownTitle: titleSide.unknownTitle, + } + junk := slices.Concat(pre.junk, artistSide.junk, out.junk) + junk = byPos(junk, func(j *positionedJunk) int { return j.pos }) + track.Junk = make([]Junk, 0, len(junk)) + for _, j := range junk { + track.Junk = append(track.Junk, Junk{Raw: j.raw, Kind: j.kind}) + } + track.Warnings = append([]Warning{}, c.warnings...) + return track +} diff --git a/go/pipeline_test.go b/go/pipeline_test.go new file mode 100644 index 0000000..6efb652 --- /dev/null +++ b/go/pipeline_test.go @@ -0,0 +1,423 @@ +package trackparse + +import ( + "strings" + "testing" + "unicode/utf8" +) + +// Unit tests for the single-track pipeline helpers: R1 normalize, R2 mode, R3 scanner, R4 +// prefixes, R6 separator, R8 title, and a fuzz test that the engine never panics (R0.8). + +func TestNormalize(t *testing.T) { + cases := []struct{ in, want string }{ + {"", ""}, + {" a \t b ", "a b"}, + {"Kid Cudi \u2013 Pursuit", "Kid Cudi - Pursuit"}, // R1.5 en dash + {"a \u2014 b", "a - b"}, // R1.5 em dash + {"a -- b", "a - b"}, // R1.5 spaced run + {"a--b", "a--b"}, // unspaced run kept + {"a --b", "a --b"}, // one side only + {"\u3010Official\u3011\uff08x\uff09", "[Official](x)"}, // R1.3 + {"\u201cq\u201d \u2018s\u2019", "\"q\" 's'"}, // R1.4 + {"a\u200bb\ufeffc\u00add\u2060e", "abcde"}, // R1.2 + {"a\u200db", "a\u200db"}, // ZWJ kept + {"a\ue000b", "ab"}, // the placeholder never survives + {"e\u0301", "\u00e9"}, // NFC + {"e\u200b\u0301", "\u00e9"}, // R1.8 compose again + {"a\u00a0\u3000b\u2028c", "a b c"}, // R0.2 whitespace + {"x\u2212y", "x-y"}, // minus sign + {"\u2014\u2014", "--"}, // no spaces around: kept + {"a \u2013\u2014 b", "a - b"}, // mixed spaced run + {"\u00ab\u00bb\u300c\u300d\u300e\u300f\uff02", "\"\"\"\"\"\"\""}, // quotes + } + for _, c := range cases { + if got := normalize(c.in); got != c.want { + t.Errorf("normalize(%q) = %q, want %q", c.in, got, c.want) + } + if got := normalize(normalize(c.in)); got != normalize(c.in) { + t.Errorf("normalize is not idempotent on %q", c.in) + } + } +} + +func TestScan(t *testing.T) { + sk, unbalanced := scan([]rune("A (b [c]) d [e"), 10) + if !unbalanced { + t.Fatal("expected unbalanced") + } + if string(sk.text) != "A "+string(ph)+" d "+string(ph) { + t.Fatalf("skeleton %q", string(sk.text)) + } + gs := groupsOf(&sk) + if len(gs) != 2 { + t.Fatalf("groups %d", len(gs)) + } + if g := gs[0].group; g.inner != "b [c]" || g.raw != "(b [c])" || g.pos != 12 || g.open != DelimiterParen { + t.Errorf("first group %+v", *g) + } + if g := gs[1].group; g.inner != "e" || g.raw != "[e" || g.pos != 22 || g.open != DelimiterSquare { + t.Errorf("second group %+v", *g) + } + if got := renderSkel(&sk); got != "A (b [c]) d [e" { + t.Errorf("render %q", got) + } + // R3.2: a non-matching closer is literal text inside the group. + sk, unbalanced = scan([]rune("x (a]b) y"), 0) + if unbalanced || len(groupsOf(&sk)) != 1 || groupsOf(&sk)[0].group.inner != "a]b" { + t.Errorf("non-matching closer: %q %v", string(sk.text), unbalanced) + } + // Offsets are UTF-16 units. + sk, _ = scan([]rune("\U0001f600 (x)"), 0) + if p := sk.pos[len(sk.pos)-1]; p != 3 { + t.Errorf("astral offset %d, want 3", p) + } + // A stray closer outside groups is text. + sk, unbalanced = scan([]rune("a) b"), 0) + if unbalanced || string(sk.text) != "a) b" { + t.Errorf("stray closer %q", string(sk.text)) + } +} + +func TestSkelOps(t *testing.T) { + sk, _ := scan([]rune(" a (x) b "), 0) + tr := trimSkel(&sk) + if renderSkel(&tr) != "a (x) b" || startPos(&tr, -1) != 2 { + t.Errorf("trim %q %d", renderSkel(&tr), startPos(&tr, -1)) + } + if s := sliceSkel(&sk, 50, 60); !s.isEmpty() { + t.Error("out-of-range slice should be empty") + } + if s := sliceSkel(&sk, 5, 2); !s.isEmpty() { + t.Error("reversed slice should be empty") + } + if empty := sliceSkel(&sk, 0, 0); startPos(&empty, 7) != 7 { + t.Error("startPos fallback") + } + g := groupsOf(&tr)[0].group + without := removeGroups(&tr, map[int]struct{}{g.pos: {}}) + if renderSkel(&without) != "a b" { + t.Errorf("removeGroups %q", renderSkel(&without)) + } + head, rest := sliceSkel(&tr, 0, 1), sliceSkel(&tr, 2, 5) + cat := concatSkel(&head, &rest) + if renderSkel(&cat) != "a(x) b" { + t.Errorf("concat %q", renderSkel(&cat)) + } +} + +func segTexts(segs []segment) []string { + out := make([]string, len(segs)) + for i, s := range segs { + out[i] = renderSkel(&s.skel) + } + return out +} + +func TestSplitAtSpacedDashes(t *testing.T) { + cases := []struct { + in string + leading bool + want string + }{ + {"A - B - C", true, "A|B|C"}, + {"A-B", true, "A-B"}, + {"- B", true, "|B"}, + {"- B", false, "- B"}, + {"A -B", true, "A -B"}, + {"A - ", true, "A|"}, + {"", true, ""}, + {"- - x", true, "||x"}, + } + for _, c := range cases { + sk, _ := scan([]rune(c.in), 0) + got := strings.Join(segTexts(splitAtSpacedDashes(&sk, c.leading)), "|") + if got != c.want { + t.Errorf("split(%q, %v) = %q, want %q", c.in, c.leading, got, c.want) + } + } +} + +func TestSplitPipes(t *testing.T) { + cases := []struct{ in, want string }{ + {"A | B || C", "A|B|C"}, + {"A|B", "A|B"}, + {"A | (x | y) | B", "A|(x | y)|B"}, + {"A ||| B", "A ||| B"}, + {"A | ", "A|"}, + } + for _, c := range cases { + sk, _ := scan([]rune(c.in), 0) + got := strings.Join(segTexts(splitPipes(sk)), "|") + if c.in == "A|B" { + got = renderSkel(&sk) // one segment + } + if got != c.want { + t.Errorf("splitPipes(%q) = %q, want %q", c.in, got, c.want) + } + } +} + +func TestMatchTimestamp(t *testing.T) { + cases := []struct { + in string + ok bool + raw string + seconds int + rest string + }{ + {"1:02:03 Artist", true, "1:02:03", 3723, "Artist"}, + {"[05:30] - Artist", true, "05:30", 330, "Artist"}, + {"(4:59) X", true, "4:59", 299, "X"}, + {"60:00 X", false, "", 0, ""}, + {"5:60 X", false, "", 0, ""}, + {"12:34X", false, "", 0, ""}, + {"[12:34 X", false, "", 0, ""}, + {"123:45 X", false, "", 0, ""}, + {"1:02:60 X", false, "", 0, ""}, // "1:02" is followed by ":", not a space + {"12:34", true, "12:34", 754, ""}, + } + for _, c := range cases { + s := []rune(c.in) + ts, end, ok := matchTimestamp(s) + if ok != c.ok { + t.Errorf("matchTimestamp(%q) ok = %v", c.in, ok) + continue + } + if ok && (ts.Raw != c.raw || ts.Seconds != c.seconds || string(tail(s, end)) != c.rest) { + t.Errorf("matchTimestamp(%q) = %+v rest %q", c.in, ts, string(tail(s, end))) + } + } +} + +func TestMatchPosition(t *testing.T) { + cases := []struct { + in string + mode Mode + end int // -1: no position + }{ + {"01. Artist", ModeClean, 4}, + {"1) Artist", ModeClean, 3}, + {"01 Artist", ModeClean, 3}, + {"1 Artist", ModeClean, -1}, + {"2 Unlimited - No Limit", ModeClean, -1}, + {"3 - Artist - Title", ModeClean, 4}, + {"3 - Title", ModeClean, -1}, + {"311 - Amber", ModeFilename, 6}, + {"01-Track", ModeFilename, 3}, + {"01-Track", ModeClean, -1}, + {"03_name", ModeFilename, 3}, + {"3 My Song", ModeFilename, 2}, + {"3 My - Song", ModeFilename, -1}, + {"1234. X", ModeClean, -1}, + {"01. - X", ModeClean, 6}, + {"1.", ModeClean, 2}, + } + for _, c := range cases { + end, ok := matchPosition([]rune(c.in), c.mode) + if !ok { + end = -1 + } + if end != c.end { + t.Errorf("matchPosition(%q, %s) = %d, want %d", c.in, c.mode, end, c.end) + } + } +} + +func TestStripPrefixes(t *testing.T) { + e := newEngine(resolvedOptions{knownArtists: []string{"3 Doors Down"}}) + c := e.newCtx() + r := stripPrefixes([]rune("[01:02] 03. A - B"), 5, ModeClean, c) + if r.timestamp == nil || r.timestamp.Seconds != 62 || r.position == nil || + r.position.Raw != "03" || r.position.Number != 3 || string(r.rest) != "A - B" || + r.base != 5+12 { + t.Errorf("stripPrefixes %+v", r) + } + // A known artist is never a position (R7.3a). + r = stripPrefixes([]rune("3 Doors Down-Kryptonite"), 0, ModeFilename, c) + if r.position != nil { + t.Errorf("known artist taken as position: %+v", r.position) + } + // A position never takes the whole string. + r = stripPrefixes([]rune("01."), 0, ModeClean, c) + if r.position != nil || string(r.rest) != "01." { + t.Errorf("whole-string position: %+v", r) + } +} + +func TestSeparatorHelpers(t *testing.T) { + if i, ok := asymmetricDash([]rune("A -B")); !ok || i != 2 { + t.Errorf("asymmetricDash = %d %v", i, ok) + } + if _, ok := asymmetricDash([]rune("A - B")); ok { + t.Error("spaced dash is not asymmetric") + } + if i, ok := tightUpperDash([]rune("Jay-Z-Numb")); !ok || i != 5 { + t.Errorf("tightUpperDash = %d %v", i, ok) + } + if _, ok := tightUpperDash([]rune("well-known")); ok { + t.Error("lowercase right side") + } + if i, ok := underscoreDash([]rune("A_-_B")); !ok || i != 1 { + t.Errorf("underscoreDash = %d %v", i, ok) + } + + c := sharedEngine().newCtx() + sk, _ := scan([]rune("Jay-Z-Numb"), 0) + if i, ok := unspacedDash(sk, c); !ok || i != 5 { + t.Errorf("unspacedDash = %d %v", i, ok) + } + sk, _ = scan([]rune("Tentacles by Noisia (Official Video)"), 0) + if i, ok := bySplit(sk, c); !ok || i != 9 { + t.Errorf("bySplit = %d %v", i, ok) + } + sk, _ = scan([]rune("Stand by Me"), 0) + if _, ok := bySplit(sk, c); ok { + t.Error("bySplit on a single stopword") + } + sk, _ = scan([]rune("Song by (Official Video)"), 0) + if _, ok := bySplit(sk, c); ok { + t.Error("bySplit with only a group on the right") + } + sk, _ = scan([]rune(`Taylor Swift: "Shake It Off" (Official Video)`), 0) + parts, ok := quotedTitle(sk) + if !ok || parts.artist == nil || renderSkel(parts.artist) != "Taylor Swift" || + renderSkel(&parts.title) != "Shake It Off (Official Video)" { + t.Errorf("quotedTitle %v", ok) + } + sk, _ = scan([]rune(`"Shake It Off"`), 0) + if _, ok := quotedTitle(sk); ok { + t.Error("quote at index 0") + } +} + +func TestFindSeparator(t *testing.T) { + run := func(in string, mode Mode, list bool) (string, string, []Warning) { + c := sharedEngine().newCtx() + sk, _ := scan([]rune(in), 0) + r := findSeparator(separatorInput{skel: sk, mode: mode, listContext: list}, c) + artist := "" + if r.artist != nil { + artist = renderSkel(r.artist) + } + return artist, renderSkel(&r.title), c.warnings + } + cases := []struct { + in string + mode Mode + list bool + artist string + title string + warnCount int + }{ + {"A - B - C", ModeClean, false, "A", "B - C", 0}, + {"- B", ModeClean, false, "", "B", 0}, + {"Title", ModeClean, false, "", "Title", 1}, + {"A -B", ModeClean, false, "A", "B", 1}, + {"Jay-Z-Numb", ModeYouTube, false, "Jay-Z", "Numb", 1}, + {"Jay-Z-Numb", ModeClean, false, "", "Jay-Z-Numb", 1}, + {"Jay-Z-Numb", ModeTracklist, true, "Jay-Z", "Numb", 1}, + {"Jay-Z-Numb", ModeTracklist, false, "", "Jay-Z-Numb", 1}, + {"A_-_B", ModeTracklist, false, "A", "B", 1}, + {"", ModeClean, false, "", "", 0}, + } + for _, c := range cases { + a, ti, w := run(c.in, c.mode, c.list) + if a != c.artist || ti != c.title || len(w) != c.warnCount { + t.Errorf("findSeparator(%q, %s, %v) = %q / %q %v", c.in, c.mode, c.list, a, ti, w) + } + } +} + +func TestCleanupTitle(t *testing.T) { + cases := []struct{ in, want string }{ + {" Title ", "Title"}, + {"- Title |", "Title"}, + {`"Title"`, "Title"}, + {"'Title'", "Title"}, + {`"Title'`, `"Title'`}, + {`" - Title "`, "Title"}, + {`"`, `"`}, + {"", ""}, + {"| - |", ""}, + } + for _, c := range cases { + if got := cleanupTitle(c.in); got != c.want { + t.Errorf("cleanupTitle(%q) = %q, want %q", c.in, got, c.want) + } + } +} + +func TestProbe(t *testing.T) { + e := newEngine(resolvedOptions{mode: requestedMode{kind: requestMode, mode: ModeTracklist}}) + p := e.probe("01 00:00 - Intro") + if !p.position || p.empty { + t.Errorf("probe position %+v", p) + } + p = e.probe("05:00 Noisia - Stigma") + if p.position || !p.spacedDash || p.empty { + t.Errorf("probe spaced dash %+v", p) + } + tr := p.finish(false) + if tr.Timestamp == nil || tr.Timestamp.Seconds != 300 || tr.Title != "Stigma" { + t.Errorf("probe finish %+v", tr) + } + p = e.probe(" ") + if !p.empty { + t.Errorf("probe empty %+v", p) + } +} + +func TestRunShapes(t *testing.T) { + tr := Parse("") + if tr.Artists == nil || tr.Versions == nil || tr.Junk == nil || tr.Warnings == nil { + t.Error("empty input must give non-nil slices") + } + if tr.Mode != ModeClean { + t.Errorf("mode %s", tr.Mode) + } + tr = Parse("01. Noisia - Stigma") + if tr.Position == nil || tr.Position.Number != 1 || tr.Title != "Stigma" { + t.Errorf("parse %+v", tr) + } + tr = ParseWith("Stigma", ParseOptions{Mode: "youtube", Uploader: "NoisiaVEVO"}) + if len(tr.Artists) != 1 || tr.Artists[0].Name != "Noisia" { + t.Errorf("uploader fallback %+v", tr.Artists) + } + if ParseArtists("") == nil { + t.Error("ParseArtists must give a non-nil slice") + } +} + +// FuzzRun asserts that the engine never panics and always gives valid UTF-8 (R0.8). +func FuzzRun(f *testing.F) { + seeds := []string{ + "", " ", "-", " - ", "( [ {", ") ] }", "01. A - B", "[00:00] - x", "A | B || C", + "x.mp3", "_-_", "Jay-Z-Numb", "A \"B\" (c)", "T by A", "\U0001f600 - \u00fc\u0301", "\ue000", + "A feat. B prod. by C (x) - y", "\xff\xfe", "1:2:3", "99:99:99 - - - -", + } + for _, s := range seeds { + f.Add(s, uint8(0)) + } + engines := []*engine{ + sharedEngine(), + newEngine(resolvedOptions{mode: requestedMode{kind: requestMode, mode: ModeYouTube}, uploader: "U - Topic"}), + newEngine(resolvedOptions{mode: requestedMode{kind: requestMode, mode: ModeFilename}}), + newEngine(resolvedOptions{mode: requestedMode{kind: requestMode, mode: ModeTracklist}, knownArtists: []string{"3 Doors Down", "\U0001f600"}}), + newEngine(resolvedOptions{mode: requestedMode{kind: requestOther}}), + } + f.Fuzz(func(t *testing.T, input string, which uint8) { + e := engines[int(which)%len(engines)] + in := sanitize(input) + tr := e.run(in, which%2 == 0) + if !utf8.ValidString(tr.Title) || !utf8.ValidString(tr.FullTitle) { + t.Fatalf("invalid UTF-8 output for %q", input) + } + _ = e.runArtists(in) + p := e.probe(in) + _ = p.finish(which%3 == 0) + if n := normalize(in); normalize(n) != n { + t.Fatalf("normalize not idempotent on %q", input) + } + }) +} diff --git a/go/prefix.go b/go/prefix.go new file mode 100644 index 0000000..0469e53 --- /dev/null +++ b/go/prefix.go @@ -0,0 +1,157 @@ +package trackparse + +// R4: leading timestamp and track-position prefixes (js/src/prefix.ts, rust/src/prefix.rs). + +// prefixResult is the input after R4. +type prefixResult struct { + rest []rune + // base is the absolute offset of rest. + base int + timestamp *Timestamp + position *Position +} + +// timeMatch is a time at the start of a prefix. +type timeMatch struct { + raw string + seconds int + end int +} + +// matchTime is H:MM:SS, HH:MM:SS, M:SS or MM:SS starting at from (R4.1). +func matchTime(s []rune, from int) (timeMatch, bool) { + lead := digitRun(s, from) + if lead < 1 || lead > 2 || at(s, from+lead) != ':' { + return timeMatch{}, false + } + first := digitsValue(sub(s, from, from+lead)) + mid, ok := twoDigitsUpTo59(s, from+lead+1) + if !ok { + return timeMatch{}, false + } + afterMid := from + lead + 3 + if at(s, afterMid) == ':' { + if sec, ok := twoDigitsUpTo59(s, afterMid+1); ok { + end := afterMid + 3 + return timeMatch{ + raw: string(sub(s, from, end)), + seconds: first*3600 + mid*60 + sec, + end: end, + }, true + } + } + if lead == 2 && first > 59 { + return timeMatch{}, false // MM is 00-59 + } + return timeMatch{raw: string(sub(s, from, afterMid)), seconds: first*60 + mid, end: afterMid}, true +} + +// skipSpaceAndDash skips, after a prefix, one space and then an optional "- " (spaced dash). +func skipSpaceAndDash(s []rune, from int) int { + i := from + if at(s, i) == ' ' { + i++ + } + if at(s, i) == '-' && at(s, i+1) == ' ' { + i += 2 + } + return i +} + +// matchTimestamp is R4.1: the timestamp and the index where the rest starts. +func matchTimestamp(s []rune) (Timestamp, int, bool) { + closer := noRune + switch at(s, 0) { + case '[': + closer = ']' + case '(': + closer = ')' + } + from := 0 + if closer != noRune { + from = 1 + } + t, ok := matchTime(s, from) + if !ok { + return Timestamp{}, 0, false + } + end := t.end + if closer != noRune { + if at(s, end) != closer { + return Timestamp{}, 0, false + } + end++ + } + if end < len(s) && at(s, end) != ' ' { + return Timestamp{}, 0, false + } + return Timestamp{Raw: t.raw, Seconds: t.seconds}, skipSpaceAndDash(s, end), true +} + +// containsSpacedDash reports whether the skeleton of s has a spaced dash. +func containsSpacedDash(s []rune) bool { + sk, _ := scan(s, 0) + return hasSpacedDash(sk.text) +} + +// matchPosition is R4.2: the end index of the position prefix. Forms are tried (a), (b), (c), +// then (d) and (e). +func matchPosition(s []rune, mode Mode) (int, bool) { + n := digitRun(s, 0) + if n < 1 || n > 3 { + return 0, false + } + c := at(s, n) + zeroPadded := at(s, 0) == '0' && n >= 2 + // (a) "01. ", "1) " + if (c == '.' || c == ')') && (at(s, n+1) == ' ' || n+1 == len(s)) { + return skipSpaceAndDash(s, n+1), true + } + // (b) "01 ": a position in every mode. + if zeroPadded && c == ' ' { + return skipSpaceAndDash(s, n), true + } + // (c) "3 - Artist - Title"; in filename mode "N - " is always a position ("311 - Amber.mp3"). + if c == ' ' && at(s, n+1) == '-' && at(s, n+2) == ' ' { + if mode == ModeFilename || containsSpacedDash(tail(s, n+3)) { + return n + 3, true + } + return 0, false + } + if mode == ModeFilename { + // (e) "01-Track", "03_name", "01.Track" + if (c == '-' || c == '_' || c == '.') && at(s, n+1) != noRune && at(s, n+1) != ' ' { + return n + 1, true + } + // (e) "3 My Song.mp3": only when the remainder has no spaced dash. + if c == ' ' && !containsSpacedDash(tail(s, n+1)) { + return skipSpaceAndDash(s, n), true + } + } + // (d) "2 Unlimited", "50 Cent": never a position outside filename mode. + return 0, false +} + +// stripPrefixes is R4 on text, whose first code point sits at absolute offset base. +func stripPrefixes(text []rune, base int, mode Mode, c *ctx) prefixResult { + rest := text + offset := base + var timestamp *Timestamp + var position *Position + + if ts, end, ok := matchTimestamp(rest); ok { + timestamp = &ts + offset += utf16Len(sub(rest, 0, end)) + rest = tail(rest, end) + } + // R7.3a: a known artist that starts with digits is not a position. + if matchKnownAt(rest, 0, c, '-') == 0 { + if end, ok := matchPosition(rest, mode); ok && end < len(rest) { + digits := sub(rest, 0, digitRun(rest, 0)) + position = &Position{Raw: string(digits), Number: digitsValue(digits)} + offset += utf16Len(sub(rest, 0, end)) + rest = tail(rest, end) + } + } + return prefixResult{rest: rest, base: offset, timestamp: timestamp, position: position} +} diff --git a/go/primitives_test.go b/go/primitives_test.go new file mode 100644 index 0000000..170b808 --- /dev/null +++ b/go/primitives_test.go @@ -0,0 +1,295 @@ +package trackparse + +// R0 primitives against values taken from the JS reference. The expected values are +// ../rust/tests/data/primitives.json, written by rust/scripts/dump_primitives.mjs from +// js/src/words.ts; it is read in place (not copied), and the table tests skip when it is +// absent. TRACKPARSE_PRIMITIVES= swaps in another dump (the --all sweep). The letter and +// uppercase flags of the same file are tested by unicode_test.go. + +import ( + "os" + "slices" + "testing" +) + +func primitivesData(t *testing.T) jsonValue { + t.Helper() + path := os.Getenv("TRACKPARSE_PRIMITIVES") + if path == "" { + path = "../rust/tests/data/primitives.json" + } + text, err := os.ReadFile(path) + if err != nil { + t.Skipf("%s not found", path) + } + v, err := parseJSON(text) + if err != nil { + t.Fatal(err) + } + return v +} + +// codePoints is the dumped code points paired with one flag string ("0110...") of property. +func codePoints(t *testing.T, data jsonValue, property string) ([]rune, []bool) { + t.Helper() + table, _ := data.get("codePoints") + runs, _ := table.get("runs") + var cps []rune + for _, run := range runs.arr { + if len(run.arr) != 2 { + t.Fatal("bad run") + } + first, count := rune(run.arr[0].num), int(run.arr[1].num) + for k := 0; k < count; k++ { + cps = append(cps, first+rune(k)) + } + } + flags, _ := table.getString(property) + if len(cps) < 5000 || len(flags) != len(cps) { + t.Fatalf("%s: %d code points, %d flags", property, len(cps), len(flags)) + } + want := make([]bool, len(flags)) + for i := 0; i < len(flags); i++ { + want[i] = flags[i] == '1' + } + return cps, want +} + +func checkProperty(t *testing.T, property string, test func(rune) bool) { + t.Helper() + cps, want := codePoints(t, primitivesData(t), property) + for i, r := range cps { + if test(r) != want[i] { + t.Errorf("%s of U+%04X: got %v", property, r, !want[i]) + } + } +} + +func TestPrimitivesWhitespaceSet(t *testing.T) { + checkProperty(t, "whitespace", isWhitespace) + // R0.2, spelled out: U+0085 is in; U+FEFF, U+200B and U+180E are out. + var got []rune + for r := rune(0); r <= 0x10ffff; r++ { + if isWhitespace(r) { + got = append(got, r) + } + } + want := []rune{0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x20, 0x85, 0xa0, 0x1680} + for r := rune(0x2000); r <= 0x200a; r++ { + want = append(want, r) + } + want = append(want, 0x2028, 0x2029, 0x202f, 0x205f, 0x3000) + if !slices.Equal(got, want) { + t.Errorf("whitespace set %U, want %U", got, want) + } + if isWhitespace(noRune) { + t.Error("noRune is whitespace") + } +} + +func TestPrimitivesJSTrimSet(t *testing.T) { + checkProperty(t, "jsSpace", isJSSpace) + for _, c := range []struct{ in, want string }{ + {"\ufeff x\u00a0\u2028", "x"}, + {"\u0085x\u0085", "\u0085x\u0085"}, // R0.2 whitespace, not JS whitespace + } { + if got := jsTrim(c.in); got != c.want { + t.Errorf("jsTrim(%q) = %q", c.in, got) + } + } + if got := jsTrimEnd(" x \ufeff"); got != " x" { + t.Errorf("jsTrimEnd = %q", got) + } + if got := string(jsTrimRunes([]rune("\u3000x y\t"))); got != "x y" { + t.Errorf("jsTrimRunes = %q", got) + } +} + +func TestPrimitivesStrings(t *testing.T) { + data := primitivesData(t) + records, _ := data.get("strings") + if len(records.arr) < 250 && os.Getenv("TRACKPARSE_PRIMITIVES") == "" { + t.Fatalf("only %d records", len(records.arr)) + } + for _, r := range records.arr { + field := func(key string) string { + s, ok := r.getString(key) + if !ok { + return "" + } + return s + } + s := field("s") + check := func(name, got, want string) { + t.Helper() + if got != want { + t.Errorf("%s(%q) = %q, JS %q", name, s, got, want) + } + } + n, _ := r.get("utf16Len") + if got := utf16Len([]rune(s)); got != int(n.num) || utf16LenString(s) != got { + t.Errorf("utf16Len(%q) = %d, JS %v", s, got, n.num) + } + check("asciiLower", asciiLower(s), field("asciiLower")) + check("jsToLower", jsToLower(s), field("lower")) + check("wordKey", wordKey(s), field("wordKey")) + check("dedupKey", dedupKey(s), field("dedupKey")) + check("collapseSpaces", collapseSpaces(s), field("collapse")) + check("collapseRunes", collapseRunes([]rune(s)), field("collapse")) + check("jsTrim", jsTrim(s), field("jsTrim")) + check("jsTrimEnd", jsTrimEnd(s), field("jsTrimEnd")) + var words []string + w, _ := r.get("words") + for _, x := range w.arr { + words = append(words, x.str) + } + if got := splitWords(s); !slices.Equal(got, words) && !(len(got) == 0 && len(words) == 0) { + t.Errorf("splitWords(%q) = %q, JS %q", s, got, words) + } + year, _ := r.get("year") + gotYear, ok := yearOf(s) + if (year.kind == jsonNull) == ok || (ok && gotYear != int(year.num)) { + t.Errorf("yearOf(%q) = %d %v, JS %s", s, gotYear, ok, show(year)) + } + } +} + +func TestPrimitivesWordKeys(t *testing.T) { + for _, c := range []struct{ in, want string }{ + {"FEAT.", "feat"}, {"Remix!!", "remix!"}, {"É.", "É"}, // ASCII lowercase only + } { + if got := wordKey(c.in); got != c.want { + t.Errorf("wordKey(%q) = %q", c.in, got) + } + } + if !wordMatches("Feat.", "feat.") || !wordMatches("Feat.", "feat") || wordMatches("feat", "feat.") { + t.Error("wordMatches") + } + if stripKeyPunct("a;") != "a" || stripKeyPunct("ä") != "ä" { + t.Error("stripKeyPunct") + } + set := newWordSet([]string{"feat.", "remix"}) + if !inVocab("FEAT.", set) || !inVocab("Remix,", set) || inVocab("feat", set) { + t.Error("inVocab") + } +} + +func TestPrimitivesDedupKeys(t *testing.T) { + for _, c := range []struct{ in, want string }{ + {"İstanbul", "istanbul"}, // i + U+0307, the mark then removed + {"STRAẞE", "straße"}, + {"ΟΔΥΣΣΕΑΣ", "οδυσσεας"}, // final sigma + {" Beyonce\u0301 KNOWLES ", "beyonce knowles"}, + {"Й", "и"}, // U+0306 is in the removed range + {"か\u3099", "か\u3099"}, // other marks stay + {"\xffA", "�a"[0:3] + "a"}, // invalid UTF-8 cannot reach here, but must not panic + } { + if got := dedupKey(c.in); got != c.want { + t.Errorf("dedupKey(%q) = %q, want %q", c.in, got, c.want) + } + } +} + +func TestDedupKeyInvalidUTF8(t *testing.T) { + _ = dedupKey("\xffA\xe2\x82") // cannot reach here through the API, but must not panic +} + +func TestPrimitivesRuneHelpers(t *testing.T) { + rs := []rune("a𝐀b") + if at(rs, 1) != '𝐀' || at(rs, 3) != noRune || at(rs, -1) != noRune || before(rs, 0) != noRune { + t.Error("at / before") + } + if string(sub(rs, 1, 99)) != "𝐀b" || string(sub(rs, 5, 2)) != "" || string(tail(rs, 2)) != "b" { + t.Error("sub / tail") + } + if utf16Len(rs) != 4 { + t.Error("utf16Len") + } + if !isLetterAt(rs, 0) || isLetterAt(rs, 9) || isUpperAt(rs, 2) || !isUpperAt([]rune("A"), 0) { + t.Error("letter helpers") + } + spans := wordSpans([]rune(" ab\u3000c ")) + if len(spans) != 2 || spans[0] != (wordSpan{"ab", 1, 3}) || spans[1] != (wordSpan{"c", 4, 5}) { + t.Errorf("wordSpans = %v", spans) + } + if !slices.Equal(spanTexts(spans), []string{"ab", "c"}) { + t.Error("spanTexts") + } +} + +func TestPrimitivesDigits(t *testing.T) { + s := []rune("x0123:59:60:7") + if digitRun(s, 1) != 4 || digitRun(s, 0) != 0 || digitRun(s, 99) != 0 { + t.Error("digitRun") + } + if digitsValue([]rune("0123")) != 123 || digitsValue([]rune("99999999999999999999")) != 1<<40 { + t.Error("digitsValue") + } + if n, ok := twoDigitsUpTo59(s, 6); !ok || n != 59 { + t.Error("59") + } + if _, ok := twoDigitsUpTo59(s, 9); ok { + t.Error("60") + } + if _, ok := twoDigitsUpTo59(s, 1); ok { + t.Error("followed by a third digit") + } + if _, ok := twoDigitsUpTo59(s, 12); ok { + t.Error("one digit") + } +} + +func TestSanitize(t *testing.T) { + const r = "�" + for _, c := range []struct{ in, want string }{ + {"Noisia - Stigma", "Noisia - Stigma"}, + {"a\xffb", "a" + r + "b"}, + {"\xc0\xaf", r + r}, // C0 is never a lead + {"\xe0\x80\x80", r + r + r}, // E0 needs A0..BF next + {"\xe0\xa0", r}, // truncated: one maximal subpart + {"\xe2\x82\xac", "€"}, + {"\xe2\x82", r}, + {"\xe2\x82x", r + "x"}, + {"\xed\xa0\x80", r + r + r}, // surrogates are ill-formed + {"\xf0\x90\x80", r}, + {"\xf0\x90\x80\x80", "\U00010000"}, + {"\xf4\x90\x80\x80", r + r + r + r}, // above U+10FFFF + {"\xf5\x80", r + r}, + {"\x80\x80", r + r}, + {"\xf1\x80\x80\xe1\x80\xc2", r + r + r}, + } { + if got := sanitize(c.in); got != c.want { + t.Errorf("sanitize(%q) = %q, want %q", c.in, got, c.want) + } + } +} + +func TestPhraseTable(t *testing.T) { + tb := newPhraseTable[int]() + tb.add("Official Video", 1) + tb.add("video", 2) + tb.add(" official video ", 3) + tb.add("", 4) + words := []string{"Official", "VIDEO,", "x"} + check := func(m phraseMatch[int], ok bool, value, length int) { + t.Helper() + if !ok || m.value != value || m.length != length { + t.Errorf("got %v %v, want %d %d", m, ok, value, length) + } + } + m, ok := tb.matchAt(words, 0) + check(m, ok, 1, 2) + m, ok = tb.matchAt(words, 1) + check(m, ok, 2, 1) + m, ok = tb.matchEnding(words, 2) + check(m, ok, 1, 2) + if _, ok := tb.matchEnding(words, 0); ok { + t.Error("matchEnding at 0") + } + if _, ok := tb.matchAt(words, 3); ok { + t.Error("matchAt past the end") + } + // The first entry for a key wins (keys are trimmed and lowercased, not collapsed). + m, ok = tb.matchAt([]string{"official", "video"}, 0) + check(m, ok, 1, 2) +} diff --git a/go/properties_test.go b/go/properties_test.go new file mode 100644 index 0000000..056b6da --- /dev/null +++ b/go/properties_test.go @@ -0,0 +1,1074 @@ +package trackparse + +// SPEC.md "Invariants" for single tracks and R13.11 for tracklists, checked on generated +// inputs. The generator is a small deterministic PRNG (mulberry32, as in the Rust suite) over +// the fragments of the JS and Rust property tests plus random code points, so a failure is +// reproducible from its seed and case number. +// +// The checks are functions shared with the fuzz targets in fuzz_test.go: these tests run them +// a few thousand times with a fixed seed on every `go test`, the fuzz targets run them on what +// the fuzzer finds. + +import ( + "fmt" + "path/filepath" + "slices" + "strings" + "sync" + "testing" +) + +// --------------------------------------------------------------------------------------------- +// Generator + +// rng is mulberry32. +type rng struct{ s uint32 } + +func newRNG(seed uint64) *rng { return &rng{s: uint32(seed) ^ uint32(seed>>32)} } + +func (r *rng) next() uint32 { + r.s += 0x6d2b79f5 + t := r.s + t = (t ^ (t >> 15)) * (t | 1) + t ^= t + (t^(t>>7))*(t|61) + return t ^ (t >> 14) +} + +func (r *rng) below(n int) int { + if n <= 0 { + return 0 + } + return int(r.next() % uint32(n)) +} + +func (r *rng) pick(items []string) string { return items[r.below(len(items))] } + +func (r *rng) chance(percent int) bool { return r.below(100) < percent } + +// trickyFragments exercise every scanner branch (the tricky set of the JS tests; its lone +// surrogate cannot be in a Go string and is U+FFFD here, plus a few invalid UTF-8 bytes). +var trickyFragments = []string{ + " ", " ", "-", " - ", " – ", "—", "(", ")", "[", "]", "{", "}", "\"", "'", "“", "|", " | ", + ",", ";", "&", " & ", " x ", " feat. ", " ft ", "prod. by ", " by ", ".", ":", "_", "0", "1", + "01. ", "3:45 ", "Remix", " Mix", "VIP", "Official Video", "ID", "\u200b", "\u00a0", "\u3000", + "é", "e\u0301", "𝄞", "\ufffd", "×", "/", ".mp3", "\xff", "\xed\xa0\x80", "\xe2\x82", +} + +// anyRune is one random code point, biased to the ranges the rules look at. +func (r *rng) anyRune() rune { + var cp int + switch r.below(10) { + case 0, 1, 2, 3: + cp = r.below(0x80) + case 4: + cp = r.below(0x100) + case 5: + cp = 0x300 + r.below(0x70) // combining marks + case 6: + cp = 0x2000 + r.below(0x70) // spaces, dashes, quotes, invisibles + case 7: + cp = r.below(0x10000) + case 8: + cp = 0xff00 + r.below(0xf0) // fullwidth forms + default: + cp = r.below(0x110000) + } + if cp >= 0xd800 && cp <= 0xdfff { + return 0xfffd + } + return rune(cp) +} + +func (r *rng) randomChars(max int) string { + var b strings.Builder + for n := r.below(max + 1); n > 0; n-- { + b.WriteRune(r.anyRune()) + } + return b.String() +} + +func (r *rng) noisyString() string { + var b strings.Builder + for n := r.below(25); n > 0; n-- { + if r.chance(50) { + b.WriteString(r.pick(trickyFragments)) + } else { + b.WriteString(r.randomChars(4)) + } + } + return b.String() +} + +func (r *rng) anyString() string { + if r.chance(50) { + return r.randomChars(60) + } + return r.noisyString() +} + +var ( + propArtists = []string{"Noisia", "Phace", "Fox Stevenson", "Sub Focus", "Mefjus", "Camo & Krooked", "Alix Perez"} + propTitles = []string{"Tentacles", "Bruises", "Out the Blue", "Dead Limit", "Stigma", "Blind Faith"} + propRemixers = []string{"Skrillex", "Magnetude", "Wilkinson", "Break"} + propJoiners = []string{" & ", ", ", " x ", " vs. "} +) + +// trackString is a track-shaped input for the metamorphic and round-trip properties. +func (r *rng) trackString() string { + var artists []string + for n := 1 + r.below(3); n > 0; n-- { + a := r.pick(propArtists) + if !slices.Contains(artists, a) { + artists = append(artists, a) + } + } + s := strings.Join(artists, r.pick(propJoiners)) + if r.chance(50) { + if feat := r.pick(propArtists); !slices.Contains(artists, feat) { + s += " feat. " + feat + } + } + s += " - " + r.pick(propTitles) + if r.chance(50) { + s += " (" + r.pick(propRemixers) + " Remix)" + } + return s +} + +// quietTrack is a track-shaped input that parses without warnings. +func (r *rng) quietTrack() string { + for { + if s := r.trackString(); len(Parse(s).Warnings) == 0 { + return s + } + } +} + +// tracklistFragments exercise the line splitter, the time scanner, emphasis and the line +// kinds (the fragments of the JS and Rust tracklist property tests). +var tracklistFragments = []string{ + "\n", "\r\n", "\r", "\n\r", " ", "\u2028", "\u0085", "\u00a0", " ", "\t", "\u3000", "00:00", + "0:00 ", "04:37 ", "1:02:03 ", "01:02:03.5 ", "125:30 ", "12:34,250", "1:75 ", "0:61:00 ", + "1:2", "[", "]", "(", ")", "[00:10] ", "(1:00)", " - ", " – ", "-", "|", ".", ":", "=> ", "==>", + "1 ", "2 ", "01. ", "3) ", "Artist", "Title", "Noisia - Stigma", "Intro", "interview", + "Tracklist:", "Part 2", "https://x.y", "www.", "_-_", "Ab-Cd", "ID", "(VIP)", "**", "*", "__", + "_", "***", "* ", "- ", "• ", "**[", "]**", "w/ ", "W/", "\u200b", "𝄞", "🎵", "é", "Кино", "a", + "7", "\x00", "\"", "\\", "\xff", +} + +func (r *rng) noisyText() string { + var b strings.Builder + for n := r.below(41); n > 0; n-- { + b.WriteString(r.pick(tracklistFragments)) + } + return b.String() +} + +var timeStyles = []string{"M:SS", "MM:SS", "H:MM:SS", "HH:MM:SS", "MM:SS.d", "M:SS,ddd"} + +func writeTime(style string, seconds, frac int) string { + h, m, s := seconds/3600, (seconds%3600)/60, seconds%60 + switch style { + case "M:SS": + return fmt.Sprintf("%d:%02d", seconds/60, s) + case "MM:SS": + return fmt.Sprintf("%02d:%02d", seconds/60, s) + case "H:MM:SS": + return fmt.Sprintf("%d:%02d:%02d", h, m, s) + case "HH:MM:SS": + return fmt.Sprintf("%02d:%02d:%02d", h, m, s) + case "MM:SS.d": + return fmt.Sprintf("%02d:%02d.%d", seconds/60, s, frac%10) + } + return fmt.Sprintf("%d:%02d,%03d", seconds/60, s, frac) +} + +var listRests = []string{ + "Noisia - Stigma", "01. Phace - Plastic Acid", "2 Unlimited - No Limit", "Intro", + "Paperclip interview", "Mefjus - Suicide Bassline (VIP)", "", "ID - ID", +} + +func (r *rng) listLine() string { + if r.below(7) == 0 { + return r.pick([]string{"", "Tracklist:", "a note", "https://example.com"}) + } + t := writeTime(r.pick(timeStyles), r.below(3600), r.below(1000)) + gap := r.pick([]string{" ", " ", " - ", " | ", " => "}) + rest := r.pick(listRests) + if lead := r.pick([]string{"", " ", "["}); lead != "[" { + return lead + t + gap + rest + } + return "[" + t + "]" + gap + rest +} + +// timedList is a realistic timed list for the edit properties. +func (r *rng) timedList() string { + n := 1 + r.below(12) + eol := r.pick([]string{"\n", "\r\n"}) + lines := make([]string, n) + for i := range lines { + lines[i] = r.listLine() + } + text := strings.Join(lines, eol) + if r.chance(50) { + text += eol + } + return text +} + +func (r *rng) anyText() string { + if r.chance(30) { + return r.timedList() + } + return r.noisyText() +} + +// --------------------------------------------------------------------------------------------- +// Helpers + +// specSchemas is spec/schema, or nil when ../spec is absent (the module zip): the schema +// checks are then skipped, every other check still runs. +var specSchemas = sync.OnceValue(func() *schemaSet { + s, err := loadSchemas(filepath.Join(specDir, "schema")) + if err != nil { + return nil + } + return s +}) + +// checkJSONSchema validates the JSON of an output against fn's schema (checkSchema). +func checkJSONSchema(tb testing.TB, fn string, out []byte, what string) { + tb.Helper() + s := specSchemas() + if s == nil { + return + } + v, err := parseJSON(out) + if err != nil { + tb.Fatalf("%s: invalid JSON %q", what, out) + } + if d := checkSchema(s, fn, v); d != "" { + tb.Fatalf("%s: output violates the schema: %s\n%s", what, d, out) + } +} + +// trackJSON is the JSON of a track without its input, for comparisons. +func trackJSON(t Track) string { + t.Input = "" + return string(marshal(&t)) +} + +// trimmedWS reports whether s has no R0.2 whitespace at either end. +func trimmedWS(s string) bool { + r := []rune(s) + return len(r) == 0 || (!isWhitespace(r[0]) && !isWhitespace(r[len(r)-1])) +} + +// --------------------------------------------------------------------------------------------- +// Single-track checks + +// checkArtistHygiene is invariant 5: names are non-empty and trimmed, and no two credits share +// a dedup key (R9.2: producers are deduped only among producers). +func checkArtistHygiene(tb testing.TB, s string, track *Track) { + tb.Helper() + seen := map[string]bool{} + for _, a := range track.Artists { + if a.Name == "" || !trimmedWS(a.Name) { + tb.Fatalf("%q: bad artist name %q", s, a.Name) + } + class := "c:" + if a.Role == RoleProducer { + class = "p:" + } + k := class + dedupKey(a.Name) + if seen[k] { + tb.Fatalf("%q: duplicate artist %q", s, a.Name) + } + seen[k] = true + } +} + +// checkTrackTotality is invariants 1, 2, 4 and 5 on any string: every public single-track +// function in every mode, with the string as its own options, returns; Parser and the +// one-shot functions agree; the output is schema-valid; normalize is idempotent. +func checkTrackTotality(tb testing.TB, s string) { + tb.Helper() + clean := sanitize(s) + def := Parse(s) + if def.Input != clean { + tb.Fatalf("%q: input %q is not the sanitized input", s, def.Input) + } + checkJSONSchema(tb, "parse", marshal(&def), fmt.Sprintf("parse(%q)", s)) + checkArtistHygiene(tb, s, &def) + _ = Format(def) + _ = AllArtists(def) + artists := ParseArtists(s) + checkJSONSchema(tb, "parseArtists", marshal(artistList(artists)), fmt.Sprintf("parseArtists(%q)", s)) + once := Normalize(s) + if twice := Normalize(once); twice != once { + tb.Fatalf("normalize is not idempotent on %q: %q then %q", s, once, twice) + } + for _, mode := range append([]Mode{ModeAuto, Mode("bogus")}, AllModes()...) { + options := ParseOptions{ + Mode: mode, + Uploader: s, + KnownArtists: []string{s, "a", ""}, + SplitAnd: SplitAndAlways, + } + p := NewParser(options) + track := p.Parse(s) + if track.Input != clean { + tb.Fatalf("%q in %q: input %q", s, mode, track.Input) + } + if a, b := string(marshal(&track)), func() string { t := ParseWith(s, options); return string(marshal(&t)) }(); a != b { + tb.Fatalf("%q in %q: Parser and ParseWith differ:\n%s\n%s", s, mode, a, b) + } + checkJSONSchema(tb, "parse", marshal(&track), fmt.Sprintf("parse(%q, %q)", s, mode)) + checkArtistHygiene(tb, s, &track) + if a, b := string(marshal(artistList(p.ParseArtists(s)))), string(marshal(artistList(ParseArtistsWith(s, options)))); a != b { + tb.Fatalf("%q in %q: Parser.ParseArtists and ParseArtistsWith differ", s, mode) + } + for _, feat := range []FeatPlacement{"", FeatSource, FeatArtist, FeatTitle, FeatOmit, "nope"} { + _ = FormatWith(track, FormatOptions{ + Feat: feat, FeatMarker: &s, Joiners: JoinersCanonical, Position: true, + }) + } + } +} + +// formatOptionsFrom is a format option set chosen by r, odd values included. +func formatOptionsFrom(r *rng, s string) FormatOptions { + return FormatOptions{ + Feat: FeatPlacement(r.pick([]string{"", "source", "artist", "title", "omit", "x"})), + FeatMarker: []*string{nil, nil, Ptr(""), Ptr("feat."), Ptr("ft."), Ptr("&"), &s}[r.below(7)], + Joiners: JoinerStyle(r.pick([]string{"", "original", "canonical", "x"})), + Versions: VersionsOption(r.pick([]string{"", "all", "none", "x"})), + OmitProducers: r.chance(30), + Position: r.chance(50), + } +} + +// checkNoiseInsensitive is invariant 3 on a track-shaped input: doubled spaces, dash variants +// and a zero-width space change nothing but the input. +func checkNoiseInsensitive(tb testing.TB, s string, cut int) { + tb.Helper() + base := trackJSON(Parse(s)) + rs := []rune(s) + cut %= len(rs) + 1 + noisy := []string{ + strings.ReplaceAll(s, " ", " "), + strings.ReplaceAll(s, " - ", " – "), + strings.ReplaceAll(s, " - ", " — "), + string(rs[:cut]) + "\u200b" + string(rs[cut:]), + } + for _, n := range noisy { + if got := trackJSON(Parse(n)); got != base { + tb.Fatalf("noise changed the parse of %q (%q):\n%s\n%s", s, n, base, got) + } + } +} + +// shape is what R11.6 promises to keep: names with roles, the title, and each version's type +// and names. +func shape(t *Track) string { + var b strings.Builder + for _, a := range t.Artists { + fmt.Fprintf(&b, "%s/%s;", a.Name, a.Role) + } + fmt.Fprintf(&b, "|%s|", t.Title) + for _, v := range t.Versions { + fmt.Fprintf(&b, "%s:", v.Type) + for _, a := range v.Artists { + fmt.Fprintf(&b, "%s,", a.Name) + } + b.WriteString(";") + } + return b.String() +} + +// checkRoundTrip is invariant 8 (R11.6) on a warning-free track-shaped input. +func checkRoundTrip(tb testing.TB, s string) { + tb.Helper() + first := Parse(s) + if len(first.Warnings) > 0 { + return + } + formatted := Format(first) + second := Parse(formatted) + if a, b := shape(&first), shape(&second); a != b { + tb.Fatalf("round trip %q -> %q:\n%s\n%s", s, formatted, a, b) + } +} + +// contentWords is invariant 6: the words of normalize(input), minus separators, joiners, feat +// markers and bracket characters. +func contentWords(normalized string) []string { + var out []string + for _, w := range strings.FieldsFunc(normalized, isWhitespace) { + switch w { + case "-", "&", "x", "vs.", "feat.": + continue + } + w = strings.Trim(w, "()[],.") + if w != "" { + out = append(out, w) + } + } + return out +} + +func outputStrings(t *Track) []string { + out := []string{t.Title, t.FullTitle} + for _, a := range t.Artists { + out = append(out, a.Name) + } + for _, v := range t.Versions { + out = append(out, v.Raw) + for _, a := range v.Artists { + out = append(out, a.Name) + } + } + for _, j := range t.Junk { + out = append(out, j.Raw) + } + if t.Position != nil { + out = append(out, t.Position.Raw) + } + if t.Timestamp != nil { + out = append(out, t.Timestamp.Raw) + } + return out +} + +// checkConservation is invariant 6 ("no word goes missing") on a track-shaped input. +func checkConservation(tb testing.TB, s string) { + tb.Helper() + track := Parse(s) + fields := outputStrings(&track) + for _, w := range contentWords(Normalize(s)) { + if !slices.ContainsFunc(fields, func(f string) bool { return strings.Contains(f, w) }) { + tb.Fatalf("%q of %q is in no output field: %s", w, s, marshal(&track)) + } + } +} + +// decorated is a track-shaped input with an optional position and junk group (invariant 6). +func (r *rng) decorated() string { + s := r.trackString() + if r.chance(30) { + s = r.pick([]string{"01. ", "7. ", "12. ", "[03:45] ", "1:02:03 "}) + s + } + if r.chance(30) { + s += r.pick([]string{" (Official Video)", " [HD]", " [Free Download]", " (VIP)"}) + } + return s +} + +// checkMetamorphic is invariant 7 on a warning-free track-shaped input. +func checkMetamorphic(tb testing.TB, s string) { + tb.Helper() + plain := Parse(s) + if len(plain.Warnings) > 0 { + return + } + // Prefixing `01. ` only sets the position. + numbered := Parse("01. " + s) + if numbered.Position == nil || *numbered.Position != (Position{Raw: "01", Number: 1}) { + tb.Fatalf("01. %s: position %+v", s, numbered.Position) + } + numbered.Position = nil + if a, b := trackJSON(plain), trackJSON(numbered); a != b { + tb.Fatalf("01. changed more than the position of %q:\n%s\n%s", s, a, b) + } + // Appending ` (Official Video)` only adds junk (and may switch the mode to youtube). + noisy := Parse(s + " (Official Video)") + want := append(append([]Junk{}, plain.Junk...), Junk{Raw: "Official Video", Kind: JunkKindVideo}) + if !slices.Equal(noisy.Junk, want) { + tb.Fatalf("%q (Official Video): junk %+v", s, noisy.Junk) + } + if noisy.Mode != plain.Mode && noisy.Mode != ModeYouTube { + tb.Fatalf("%q (Official Video): mode %q", s, noisy.Mode) + } + noisy.Junk, noisy.Mode = plain.Junk, plain.Mode + if a, b := trackJSON(plain), trackJSON(noisy); a != b { + tb.Fatalf("(Official Video) changed more than the junk of %q:\n%s\n%s", s, a, b) + } + if !strings.HasSuffix(s, " Remix)") { + return + } + open := strings.LastIndexByte(s, '(') + head, group := s[:open], s[open+1:len(s)-1] + // (X Remix) and [X Remix] differ only in the delimiter. + square := Parse(head + "[" + group + "]") + if n := len(square.Versions); n == 0 || square.Versions[n-1].Delimiter != DelimiterSquare { + tb.Fatalf("%q: no square version", s) + } + for i := range square.Versions { + square.Versions[i].Delimiter = DelimiterParen + } + square.FullTitle = plain.FullTitle + if a, b := trackJSON(plain), trackJSON(square); a != b { + tb.Fatalf("[ ] changed more than the delimiter of %q:\n%s\n%s", s, a, b) + } + // REMIX and Remix differ only in raw. + shouted := strings.ReplaceAll(group, " Remix", " REMIX") + upper := Parse(head + "(" + shouted + ")") + if n := len(upper.Versions); n == 0 || upper.Versions[n-1].Raw != shouted { + tb.Fatalf("%q: REMIX raw %+v", s, upper.Versions) + } + for i := range upper.Versions { + if i < len(plain.Versions) { + upper.Versions[i].Raw = plain.Versions[i].Raw + } + } + upper.FullTitle = plain.FullTitle + if a, b := trackJSON(plain), trackJSON(upper); a != b { + tb.Fatalf("REMIX changed more than raw in %q:\n%s\n%s", s, a, b) + } +} + +// checkShapedTrack runs every track-shaped check on inputs drawn from r. +func checkShapedTrack(tb testing.TB, r *rng) { + tb.Helper() + s := r.trackString() + checkNoiseInsensitive(tb, s, r.below(1000)) + checkRoundTrip(tb, s) + checkMetamorphic(tb, s) + checkConservation(tb, r.decorated()) + track := Parse(s) + _ = FormatWith(track, formatOptionsFrom(r, s)) +} + +// --------------------------------------------------------------------------------------------- +// Tracklist checks + +func rawLines(l *Tracklist) []string { + out := make([]string, len(l.Entries)) + for i, e := range l.Entries { + out[i] = e.Raw + string(e.Eol) + } + return out +} + +func raws(text string) []string { + l := ParseTracklist(text) + out := make([]string, len(l.Entries)) + for i, e := range l.Entries { + out[i] = e.Raw + } + return out +} + +// checkTracklist is R13.11 invariants 1 and 2 on any text: lossless, parts concatenate to raw, +// line numbering and terminators, the kind/track pairing, schema-valid output. +func checkTracklist(tb testing.TB, text string, options TracklistOptions) { + tb.Helper() + clean := sanitize(text) + l := ParseTracklistWith(text, options) + if got := strings.Join(rawLines(&l), ""); got != clean { + tb.Fatalf("not lossless: %q gives %q", text, got) + } + checkJSONSchema(tb, "parseTracklist", marshal(&l), fmt.Sprintf("parseTracklist(%q)", text)) + if l.Stats.Lines != len(l.Entries) { + tb.Fatalf("%q: stats.lines %d, %d entries", text, l.Stats.Lines, len(l.Entries)) + } + for i, e := range l.Entries { + p := e.Parts + if p.Lead+p.Time+p.Gap+p.Rest != e.Raw { + tb.Fatalf("%q line %d: parts %+v do not join to %q", text, i+1, p, e.Raw) + } + // R13.1.3: without a time, `lead` holds at most a bullet; `time` and `gap` are empty. + if (e.Time == nil) != (p.Time == "") || (e.Time == nil && p.Gap != "") { + tb.Fatalf("%q line %d: time %+v with parts %+v", text, i+1, e.Time, p) + } + if (e.Track != nil) != (e.Kind == EntryKindTrack || e.Kind == EntryKindMarker) { + tb.Fatalf("%q line %d: kind %q with track %v", text, i+1, e.Kind, e.Track != nil) + } + if strings.ContainsAny(e.Raw, "\r\n") { + tb.Fatalf("%q line %d: raw %q holds a line break", text, i+1, e.Raw) + } + if e.Line != i+1 { + tb.Fatalf("%q: entry %d has line %d", text, i, e.Line) + } + // Only the last line may lack a terminator. + if e.Eol == EolNone && i != len(l.Entries)-1 { + tb.Fatalf("%q line %d: no terminator before the last line", text, i+1) + } + } +} + +// looseEdits is a random edit list for the JSON door: every field may be anything. +func (r *rng) looseEdits() jsonValue { + fields := []string{ + "-3", "0", "1", "2", "5", "15", "1.5", "-0.25", "1e300", "-1e300", "1e999", "-1e999", + "null", "true", "false", `"x"`, `""`, "[1,2]", "{}", "9007199254740993", "359999.5", + } + ops := []string{"set-time", "shift", "sort-by-time", "set-rest", "insert", "delete", "x"} + texts := []string{`"a\nb"`, `"c\rd"`, `"00:10 New - Line"`, `"w/ x"`, `""`, `"\ud800"`} + var edits []string + for n := r.below(7); n > 0; n-- { + if r.chance(8) { + edits = append(edits, r.pick([]string{"null", "5", `"shift"`, "[]", "{}"})) + continue + } + parts := []string{fmt.Sprintf(`"op":%q`, r.pick(ops))} + for _, key := range []string{"line", "seconds", "from", "after"} { + if r.chance(60) { + parts = append(parts, fmt.Sprintf("%q:%s", key, r.pick(fields))) + } + } + if r.chance(30) { + var items []string + for k := r.below(4); k > 0; k-- { + items = append(items, r.pick(fields)) + } + parts = append(parts, `"lines":[`+strings.Join(items, ",")+"]") + } + for _, key := range []string{"rest", "text"} { + if r.chance(60) { + value := r.pick(fields) + if r.chance(80) { + value = r.pick(texts) + } + parts = append(parts, fmt.Sprintf("%q:%s", key, value)) + } + } + edits = append(edits, "{"+strings.Join(parts, ",")+"}") + } + v, err := parseJSON([]byte("[" + strings.Join(edits, ",") + "]")) + if err != nil { + panic(err) // a bug in the generator + } + return v +} + +// checkLooseEdits is R13.11 invariant 2 for edits: any edit list through the JSON door returns +// a schema-valid result whose changed lines are sorted, unique and in range, and whose text +// parses losslessly. +func checkLooseEdits(tb testing.TB, text string, edits jsonValue) { + tb.Helper() + clean := sanitize(text) + out := wireCall("applyEdits", clean, jsonValue{kind: jsonObject}, jsonValue{kind: jsonObject}, edits) + what := fmt.Sprintf("applyEdits(%q, %s)", text, marshal(edits)) + checkJSONSchema(tb, "applyEdits", out, what) + v, err := parseJSON(out) + if err != nil { + tb.Fatalf("%s: invalid JSON %q", what, out) + } + newText, _ := v.getString("text") + n := len(ParseTracklist(newText).Entries) + changed, _ := v.get("changed") + prev := 0.0 + for _, c := range changed.arr { + if c.kind != jsonNumber || c.num <= prev || c.num > float64(n) { + tb.Fatalf("%s: changed %s with %d lines", what, marshal(changed), n) + } + prev = c.num + } + if l := ParseTracklist(newText); strings.Join(rawLines(&l), "") != newText { + tb.Fatalf("%s: the result does not parse losslessly", what) + } +} + +func warned(r *EditResult, codes ...EditWarningCode) bool { + return slices.ContainsFunc(r.Warnings, func(w EditWarning) bool { return slices.Contains(codes, w.Code) }) +} + +// checkIdentity is R13.11 invariant 3: no edits return the text unchanged. +func checkIdentity(tb testing.TB, text string) { + tb.Helper() + for _, edits := range [][]Edit{nil, {}} { + r := ApplyEdits(text, edits) + if r.Text != sanitize(text) || len(r.Changed) != 0 || len(r.Warnings) != 0 { + tb.Fatalf("applyEdits(%q, none) = %+v", text, r) + } + } +} + +// checkLocality is R13.11 invariant 3: an edit on one line leaves every other line byte for +// byte, and changes only that line. +func checkLocality(tb testing.TB, text string, r *rng) { + tb.Helper() + text = sanitize(text) + before := ParseTracklist(text) + lines := rawLines(&before) + if len(lines) == 0 { + return + } + line := 1 + r.below(len(lines)) + seconds := float64(r.below(8001) - 4000) + var edit Edit + switch r.below(3) { + case 0: + edit = SetTime(line, seconds) + case 1: + edit = SetRest(line, "New - Rest") + default: + edit = ShiftLines(seconds, line) + } + res := ApplyEdits(text, []Edit{edit}) + afterList := ParseTracklist(res.Text) + after := rawLines(&afterList) + if len(after) != len(lines) { + tb.Fatalf("%+v on %q: %d lines became %d", edit, text, len(lines), len(after)) + } + for i := range after { + if i != line-1 && after[i] != lines[i] { + tb.Fatalf("%+v on %q: line %d changed: %q -> %q", edit, text, i+1, lines[i], after[i]) + } + } + for _, c := range res.Changed { + if c != line { + tb.Fatalf("%+v on %q: changed %v", edit, text, res.Changed) + } + } + if warned(&res, EditWarningCodeEditInvalid) && (res.Text != text || len(res.Changed) != 0) { + tb.Fatalf("%+v on %q: an invalid edit changed the text", edit, text) + } +} + +// checkInsertDelete is R13.11 invariant 3 for insert and delete: the other lines stay. +func checkInsertDelete(tb testing.TB, text string, r *rng) { + tb.Helper() + text = sanitize(text) + before := raws(text) + if len(before) == 0 || hasBareCR(text) { + // R13.9.5: after an edit the lines are re-read, so a line ending in a bare "\r" next + // to an empty "\n" line merges with it. The simple expectation below does not model + // that. + return + } + at := r.below(len(before) + 1) + const newLine = "00:00 New - Line" + ins := ApplyEdits(text, []Edit{Insert(at, newLine)}) + expected := slices.Insert(slices.Clone(before), at, newLine) + if got := raws(ins.Text); !slices.Equal(got, expected) { + tb.Fatalf("insert after %d in %q: %q, want %q", at, text, got, expected) + } + if !slices.Contains(ins.Changed, at+1) { + tb.Fatalf("insert after %d in %q: changed %v", at, text, ins.Changed) + } + line := 1 + r.below(len(before)) + del := ApplyEdits(text, []Edit{Delete(line)}) + kept := slices.Delete(slices.Clone(before), line-1, line) + got := raws(del.Text) + // Deleting the last line moves its eol ("" here) up: an empty line that becomes last + // without an eol is not a line (R13.9.5), so trailing empty lines may disappear. + for len(kept) > 0 && kept[len(kept)-1] == "" && len(got) < len(kept) && line == len(before) { + kept = kept[:len(kept)-1] + } + if !slices.Equal(got, kept) { + tb.Fatalf("delete %d in %q: %q, want %q", line, text, got, kept) + } +} + +// hasBareCR reports whether text has a "\r" that is not part of a "\r\n". +func hasBareCR(text string) bool { + for i := 0; i < len(text); i++ { + if text[i] == '\r' && (i+1 >= len(text) || text[i+1] != '\n') { + return true + } + } + return false +} + +func timeWidths(text string) []int { + l := ParseTracklist(text) + out := make([]int, len(l.Entries)) + for i, e := range l.Entries { + out[i] = -1 + if e.Time != nil { + out[i] = len(e.Time.Raw) + } + } + return out +} + +// checkShiftRoundTrip is R13.11 invariant 4: shift(+s) then shift(-s) restores the text, +// unless a time was clamped or upgraded or its digit count grew (R13.9.7). It reports whether +// the round trip was checked. +func checkShiftRoundTrip(tb testing.TB, text string, r *rng) bool { + tb.Helper() + text = sanitize(text) + s := float64(1 + r.below(5000)) + n := len(ParseTracklist(text).Entries) + shift := func(seconds float64) Edit { return Shift(seconds) } + if from := 1 + r.below(12); r.chance(50) && from <= n { + shift = func(seconds float64) Edit { return ShiftFrom(seconds, from) } + } + up := ApplyEdits(text, []Edit{shift(s)}) + down := ApplyEdits(up.Text, []Edit{shift(-s)}) + lossy := []EditWarningCode{EditWarningCodeTimeClamped, EditWarningCodeStyleUpgraded, EditWarningCodeEditInvalid} + if warned(&up, lossy...) || warned(&down, lossy...) || !slices.Equal(timeWidths(up.Text), timeWidths(text)) { + return false + } + if down.Text != text { + tb.Fatalf("shift ±%v on %q gives %q", s, text, down.Text) + } + return true +} + +// checkSort is R13.11 invariant 4 for sort-by-time: the eol slots stay, times ascend, and a +// second sort changes nothing. +func checkSort(tb testing.TB, text string) { + tb.Helper() + text = sanitize(text) + eols := func(text string) []Eol { + l := ParseTracklist(text) + out := make([]Eol, len(l.Entries)) + for i, e := range l.Entries { + out[i] = e.Eol + } + return out + } + once := ApplyEdits(text, []Edit{SortByTime()}) + // An empty line sorted into the last slot (eol "") is not a line any more (R13.1.1). + if a, b := eols(once.Text), eols(text); len(a) == len(b) && !slices.Equal(a, b) { + tb.Fatalf("sort of %q moved the terminators: %q", text, once.Text) + } + prev := -1.0 + for _, e := range ParseTracklist(once.Text).Entries { + if e.Time != nil { + if e.Time.Seconds < prev { + tb.Fatalf("sort of %q is not sorted: %q", text, once.Text) + } + prev = e.Time.Seconds + } + } + if twice := ApplyEdits(once.Text, []Edit{SortByTime()}); twice.Text != once.Text { + tb.Fatalf("sort of %q is not idempotent", text) + } +} + +// checkOneLine is R13.11 invariant 5: the track of a one-line text is the parse of its line +// text in tracklist mode. It reports whether the line had a track. +func checkOneLine(tb testing.TB, text string) bool { + tb.Helper() + text = strings.NewReplacer("\r", " ", "\n", " ").Replace(sanitize(text)) + l := ParseTracklist(text) + if len(l.Entries) == 0 { + return false + } + if len(l.Entries) != 1 { + tb.Fatalf("%q: %d entries", text, len(l.Entries)) + } + e := l.Entries[0] + if e.Track == nil { + return false + } + want := ParseWith(e.Track.Input, ParseOptions{Mode: ModeTracklist}) + if a, b := string(marshal(e.Track)), string(marshal(&want)); a != b { + tb.Fatalf("%q: the entry's track is not the parse of its text:\n%s\n%s", text, a, b) + } + if !strings.ContainsAny(e.Parts.Rest, "*_") && !e.Layered && e.Track.Input != e.Parts.Rest { + tb.Fatalf("%q: track input %q, rest %q", text, e.Track.Input, e.Parts.Rest) + } + return true +} + +var emphasisRests = []string{ + "Noisia - Stigma", "01. Phace - Plastic Acid", "Intro", "Paperclip interview", + "Mefjus - Suicide Bassline (VIP)", "ID - ID", "Noisia feat. Foreign Beggars - Shellshock", +} + +var timeWraps = [][2]string{ + {"", ""}, {"**", "**"}, {"__", "__"}, {"*", "*"}, {"_", "_"}, {"**[", "]**"}, {"[**", "**]"}, + {"**[**", "**]"}, {"_[", "]_"}, +} + +// checkEmphasis is R13.11 invariant 6: emphasis around the time or the track part changes +// neither the time, the kind nor the track. +func checkEmphasis(tb testing.TB, t, rest string) { + tb.Helper() + bare := ParseTracklist(t + " " + rest).Entries[0] + for _, w := range timeWraps { + for _, wrap := range []string{"", "**", "__", "*", "_"} { + decorated := w[0] + t + w[1] + " " + wrap + rest + wrap + e := ParseTracklist(decorated).Entries[0] + if (e.Time == nil) != (bare.Time == nil) || (e.Time != nil && e.Time.Seconds != bare.Time.Seconds) { + tb.Fatalf("%q: time %+v, want %+v", decorated, e.Time, bare.Time) + } + if e.Kind != bare.Kind { + tb.Fatalf("%q: kind %q, want %q", decorated, e.Kind, bare.Kind) + } + if (e.Track == nil) != (bare.Track == nil) || + (e.Track != nil && string(marshal(e.Track)) != string(marshal(bare.Track))) { + tb.Fatalf("%q: track differs from %q", decorated, t+" "+rest) + } + } + } +} + +// --------------------------------------------------------------------------------------------- +// Seeded property tests + +// propertyRuns scales the iteration counts down under -short and -race. +func propertyRuns(n int) int { + switch { + case testing.Short(): + return n / 10 + case raceEnabled: + return n / 4 + } + return n +} + +func TestPropertyTotality(t *testing.T) { + r := newRNG(1) + for i := 0; i < propertyRuns(2000); i++ { + checkTrackTotality(t, r.anyString()) + } + for _, s := range []string{"", " ", "\x00", "\ufeff", "-", " - ", "(", ")", "((((", "]]]]", "\U0010ffff", "\xff\xfe"} { + checkTrackTotality(t, s) + } + for _, f := range trickyFragments { + checkTrackTotality(t, f) + checkTrackTotality(t, strings.Repeat(f, 50)) + } +} + +func TestPropertyNormalizeIdempotent(t *testing.T) { + r := newRNG(2) + for i := 0; i < propertyRuns(4000); i++ { + s := r.anyString() + once := Normalize(s) + if twice := Normalize(once); twice != once { + t.Fatalf("case %d: %q: %q then %q", i, s, once, twice) + } + } +} + +func TestPropertyNoiseInsensitive(t *testing.T) { + r := newRNG(3) + for i := 0; i < propertyRuns(500); i++ { + checkNoiseInsensitive(t, r.trackString(), r.below(1000)) + } +} + +func TestPropertyArtistHygiene(t *testing.T) { + r := newRNG(5) + for i := 0; i < propertyRuns(3000); i++ { + s := r.trackString() + if r.chance(70) { + s = r.anyString() + } + track := Parse(s) + checkArtistHygiene(t, s, &track) + } +} + +func TestPropertyConservation(t *testing.T) { + r := newRNG(6) + for i := 0; i < propertyRuns(1000); i++ { + checkConservation(t, r.decorated()) + } +} + +func TestPropertyMetamorphic(t *testing.T) { + r := newRNG(7) + for i := 0; i < propertyRuns(500); i++ { + checkMetamorphic(t, r.quietTrack()) + } +} + +func TestPropertyRoundTrip(t *testing.T) { + r := newRNG(11) + for i := 0; i < propertyRuns(500); i++ { + s := r.quietTrack() + checkRoundTrip(t, s) + _ = FormatWith(Parse(s), formatOptionsFrom(r, s)) + } +} + +func TestPropertyTracklistLossless(t *testing.T) { + r := newRNG(21) + for i := 0; i < propertyRuns(3000); i++ { + checkTracklist(t, r.anyText(), TracklistOptions{}) + } +} + +func TestPropertyOnlyLFCRLFAndCRBreakLines(t *testing.T) { + for text, want := range map[string]int{ + "a\u2028b\u2029c\u0085d\u000be\u000cf": 1, + "a\r\nb\rc\nd\n": 4, + "\n\r\r\n": 3, + "": 0, + } { + if got := len(ParseTracklist(text).Entries); got != want { + t.Errorf("%q: %d lines, want %d", text, got, want) + } + } +} + +func TestPropertyAnyEditListReturns(t *testing.T) { + r := newRNG(22) + for i := 0; i < propertyRuns(2000); i++ { + checkLooseEdits(t, r.anyText(), r.looseEdits()) + } +} + +func TestPropertyNoEditsIsTheIdentity(t *testing.T) { + r := newRNG(23) + for i := 0; i < propertyRuns(1000); i++ { + checkIdentity(t, r.anyText()) + } +} + +func TestPropertyEditLocality(t *testing.T) { + r := newRNG(24) + for i := 0; i < propertyRuns(1500); i++ { + text := r.timedList() + if r.chance(20) { + text = r.noisyText() + } + checkLocality(t, text, r) + checkInsertDelete(t, r.timedList(), r) + } +} + +func TestPropertyShiftRoundTrip(t *testing.T) { + r := newRNG(26) + checked := 0 + for i := 0; i < propertyRuns(2000); i++ { + if checkShiftRoundTrip(t, r.timedList(), r) { + checked++ + } + } + if checked < propertyRuns(2000)/20 { + t.Fatalf("only %d round trips were checked", checked) + } +} + +func TestPropertySort(t *testing.T) { + r := newRNG(27) + for i := 0; i < propertyRuns(1500); i++ { + checkSort(t, r.timedList()) + } +} + +func TestPropertyOneLineTrack(t *testing.T) { + r := newRNG(28) + tracks := 0 + for i := 0; i < propertyRuns(3000); i++ { + text := "" + if r.chance(50) { + text = r.listLine() + } + if checkOneLine(t, text+r.noisyText()) { + tracks++ + } + } + if tracks < propertyRuns(3000)/6 { + t.Fatalf("only %d one-line tracks were checked", tracks) + } +} + +func TestPropertyEmphasis(t *testing.T) { + r := newRNG(29) + for i := 0; i < propertyRuns(40); i++ { + tm := writeTime(r.pick(timeStyles), r.below(3600), r.below(1000)) + for _, rest := range emphasisRests { + checkEmphasis(t, tm, rest) + } + } +} diff --git a/go/race_test.go b/go/race_test.go new file mode 100644 index 0000000..ec411a0 --- /dev/null +++ b/go/race_test.go @@ -0,0 +1,7 @@ +//go:build race + +package trackparse + +// raceEnabled is true under -race, which makes the code several times slower: the property +// tests run fewer cases and the time ceilings are wider. +const raceEnabled = true diff --git a/go/scanner.go b/go/scanner.go new file mode 100644 index 0000000..6f52d87 --- /dev/null +++ b/go/scanner.go @@ -0,0 +1,329 @@ +package trackparse + +// R3: top-level group scanner and skeleton (js/src/scanner.ts, rust/src/scanner.rs). +// +// A skel is a skeleton (code points) plus, for every code point, its absolute offset in the +// normalized input. Offsets are in UTF-16 units, as in the JS reference, so every "order of +// appearance" comparison gives the same answer. Groups are looked up by the offset of their +// placeholder, so any slice of a skeleton still knows which groups it contains. + +// ph is the R3.4 placeholder code point. R1.2 removes it from input, so it never occurs there. +const ph rune = 0xe000 + +// group is one top-level bracket group (R3.1). +type group struct { + open Delimiter + // inner is the R3.5 inner text, trimmed and whitespace-collapsed. + inner string + // raw is the group exactly as written, brackets included. + raw string + // pos is the absolute offset of the opener. + pos int +} + +// groupMap holds the groups of one scan by the offset of their opener. It is only looked up, +// never ranged over, and shared (read-only) by every slice of the skeleton. +type groupMap map[int]*group + +// skel is a skeleton: text with each top-level group replaced by ph, and the absolute offset +// of every code point. +type skel struct { + text []rune + pos []int + groups groupMap +} + +// closerOf is the closing bracket for an opener, or noRune. +func closerOf(r rune) rune { + switch r { + case '(': + return ')' + case '[': + return ']' + case '{': + return '}' + } + return noRune +} + +// delimiterOf is the version delimiter of an opener. +func delimiterOf(r rune) Delimiter { + switch r { + case '[': + return DelimiterSquare + case '{': + return DelimiterCurly + } + return DelimiterParen +} + +// scan is R3.1 to R3.5 on s, whose first code point sits at absolute offset base. The second +// result is "unbalanced" (R3.3). +func scan(s []rune, base int) (skel, bool) { + // The absolute offset of every code point, plus one entry for the end of the string. + offsets := make([]int, 0, len(s)+1) + off := base + for _, r := range s { + offsets = append(offsets, off) + if r >= 0x10000 { + off += 2 + } else { + off++ + } + } + offsets = append(offsets, off) + offsetAt := func(i int) int { + if i >= 0 && i < len(offsets) { + return offsets[i] + } + return off + } + + text := make([]rune, 0, len(s)) + pos := make([]int, 0, len(s)) + groups := groupMap{} + var stack []rune + groupStart := 0 + for i, r := range s { + if len(stack) == 0 { + if closer := closerOf(r); closer != noRune { + stack = append(stack, closer) + groupStart = i + } else { + text = append(text, r) + pos = append(pos, offsetAt(i)) + } + continue + } + if closer := closerOf(r); closer != noRune { + stack = append(stack, closer) + } else if stack[len(stack)-1] == r { + stack = stack[:len(stack)-1] + if len(stack) == 0 { + addGroup(s, groupStart, i+1, true, offsetAt, groups) + text = append(text, ph) + pos = append(pos, offsetAt(groupStart)) + } + } + // R3.2: a non-matching closer is literal text inside the group. + } + unbalanced := len(stack) > 0 + if unbalanced { + // R3.3: the group runs to the end of the string. + addGroup(s, groupStart, len(s), false, offsetAt, groups) + text = append(text, ph) + pos = append(pos, offsetAt(groupStart)) + } + return skel{text: text, pos: pos, groups: groups}, unbalanced +} + +// addGroup records the group s[start:end] (closed: end includes the closer). +func addGroup(s []rune, start, end int, closed bool, offsetAt func(int) int, groups groupMap) { + innerEnd := end + if closed { + innerEnd = end - 1 + } + p := offsetAt(start) + groups[p] = &group{ + open: delimiterOf(at(s, start)), + inner: collapseRunes(sub(s, start+1, innerEnd)), + raw: string(sub(s, start, end)), + pos: p, + } +} + +// --------------------------------------------------------------------------------------------- +// Skeleton operations + +// clamped is t[a:b] with both ends clamped to the slice (JS slice with non-negative bounds). +func clamped[T any](t []T, a, b int) []T { + if b > len(t) { + b = len(t) + } + if b < 0 { + b = 0 + } + if a > b { + a = b + } + if a < 0 { + a = 0 + } + return t[a:b] +} + +// len is the number of code points. +func (s skel) len() int { return len(s.text) } + +// isEmpty reports whether the skeleton has no code points. +func (s skel) isEmpty() bool { return len(s.text) == 0 } + +// sliceSkel is s[start:end], clamped. The text and offsets are copied, the groups shared. +func sliceSkel(s *skel, start, end int) skel { + return skel{ + text: append([]rune(nil), clamped(s.text, start, end)...), + pos: append([]int(nil), clamped(s.pos, start, end)...), + groups: s.groups, + } +} + +// sliceFrom is s[start:]. +func sliceFrom(s *skel, start int) skel { + return sliceSkel(s, start, len(s.text)) +} + +// trimSkel removes R0.2 whitespace at both ends. +func trimSkel(s *skel) skel { + a, b := 0, len(s.text) + for a < b && isWhitespace(at(s.text, a)) { + a++ + } + for b > a && isWhitespace(before(s.text, b)) { + b-- + } + return sliceSkel(s, a, b) +} + +// concatSkel is a followed by b (the groups of a). +func concatSkel(a, b *skel) skel { + text := make([]rune, 0, len(a.text)+len(b.text)) + text = append(append(text, a.text...), b.text...) + pos := make([]int, 0, len(a.pos)+len(b.pos)) + pos = append(append(pos, a.pos...), b.pos...) + return skel{text: text, pos: pos, groups: a.groups} +} + +// groupAt is the group behind the placeholder at index, or nil. +func groupAt(s *skel, index int) *group { + if at(s.text, index) != ph || index < 0 || index >= len(s.pos) { + return nil + } + return s.groups[s.pos[index]] +} + +// indexedGroup is a group with the index of its placeholder. +type indexedGroup struct { + index int + group *group +} + +// groupsOf is the groups of the skeleton, left to right. +func groupsOf(s *skel) []indexedGroup { + var out []indexedGroup + for i := range s.text { + if g := groupAt(s, i); g != nil { + out = append(out, indexedGroup{index: i, group: g}) + } + } + return out +} + +// hasGroup reports whether the skeleton holds a placeholder. +func hasGroup(s *skel) bool { + for _, r := range s.text { + if r == ph { + return true + } + } + return false +} + +// renderSkel substitutes the groups back (R3.4 reassembly). Whitespace is not touched. +func renderSkel(s *skel) string { + out := make([]rune, 0, len(s.text)) + for i, r := range s.text { + if g := groupAt(s, i); g != nil { + out = append(out, []rune(g.raw)...) + } else { + out = append(out, r) + } + } + return string(out) +} + +// startPos is the absolute offset of the first code point, or fallback for an empty skeleton. +func startPos(s *skel, fallback int) int { + if len(s.pos) == 0 { + return fallback + } + return s.pos[0] +} + +// removeGroups removes the placeholders of the groups at the given offsets. +func removeGroups(s *skel, remove map[int]struct{}) skel { + if len(remove) == 0 { + return *s + } + text := make([]rune, 0, len(s.text)) + pos := make([]int, 0, len(s.pos)) + for i, r := range s.text { + if i >= len(s.pos) { + break + } + p := s.pos[i] + if _, gone := remove[p]; r == ph && gone { + continue + } + text = append(text, r) + pos = append(pos, p) + } + return skel{text: text, pos: pos, groups: s.groups} +} + +// isSpacedDashAt is R6.1: "-" with a space immediately on both sides. +func isSpacedDashAt(t []rune, i int) bool { + return at(t, i) == '-' && before(t, i) == ' ' && at(t, i+1) == ' ' +} + +// hasSpacedDash reports whether t has a spaced dash. +func hasSpacedDash(t []rune) bool { + for i := 1; i+1 < len(t); i++ { + if isSpacedDashAt(t, i) { + return true + } + } + return false +} + +// segment is a trimmed piece of a skeleton and its range inside the parent. +type segment struct { + skel skel + start int + end int +} + +// trimmedSegment is s[start:end] trimmed of R0.2 whitespace. +func trimmedSegment(s *skel, start, end int) segment { + a := start + b := end + if b < start { + b = start + } + for a < b && isWhitespace(at(s.text, a)) { + a++ + } + for b > a && isWhitespace(before(s.text, b)) { + b-- + } + return segment{skel: sliceSkel(s, a, b), start: a, end: b} +} + +// splitAtSpacedDashes is R6.1 / R8.2: split a skeleton at every spaced dash into trimmed +// segments. With allowLeading, a string starting with "- " yields an empty first segment (R6.3). +func splitAtSpacedDashes(s *skel, allowLeading bool) []segment { + var segments []segment + t := s.text + start := 0 + if allowLeading && at(t, 0) == '-' && at(t, 1) == ' ' { + segments = append(segments, segment{skel: sliceSkel(s, 0, 0), start: 0, end: 0}) + start = 2 + } + i := max(start, 1) + for ; i+1 < len(t); i++ { + if isSpacedDashAt(t, i) { + segments = append(segments, trimmedSegment(s, start, i-1)) + start = i + 2 + } + } + return append(segments, trimmedSegment(s, start, len(t))) +} diff --git a/go/schema_test.go b/go/schema_test.go new file mode 100644 index 0000000..7ec59b6 --- /dev/null +++ b/go/schema_test.go @@ -0,0 +1,205 @@ +package trackparse + +// A small JSON Schema validator for the subset spec/schema uses (type, enum, required, +// properties, additionalProperties: false, items, oneOf, $ref within and across the schema +// files, minimum, maximum, minLength). The module has no dependencies, so no general validator; +// a keyword outside the subset fails the run, so a schema change cannot be skipped silently. + +import ( + "math" + "os" + "path/filepath" + "strconv" + "strings" + "unicode/utf8" +) + +// annotation keywords that do not constrain a value. +var schemaAnnotations = map[string]bool{ + "$schema": true, "$id": true, "title": true, "description": true, "default": true, + "$comment": true, "$defs": true, "examples": true, +} + +// schemaSet holds the schema files of spec/schema by file name. +type schemaSet struct { + docs map[string]jsonValue +} + +func loadSchemas(dir string) (*schemaSet, error) { + s := &schemaSet{docs: map[string]jsonValue{}} + for _, name := range []string{"parsed-track.schema.json", "tracklist.schema.json"} { + text, err := os.ReadFile(filepath.Join(dir, name)) + if err != nil { + return nil, err + } + v, err := parseJSON(text) + if err != nil { + return nil, err + } + s.docs[name] = v + } + return s, nil +} + +// resolve follows a $ref from file: "#/$defs/x", "other.json" or "other.json#/$defs/x". +func (s *schemaSet) resolve(file, ref string) (jsonValue, string, bool) { + target, pointer, _ := strings.Cut(ref, "#") + if target != "" { + file = target + } + node, ok := s.docs[file] + if !ok { + return jsonValue{}, "", false + } + for _, part := range strings.Split(strings.TrimPrefix(pointer, "/"), "/") { + if part == "" { + continue + } + if node, ok = node.get(part); !ok { + return jsonValue{}, "", false + } + } + return node, file, true +} + +// validateAt checks v against the definition at ref of file ("" for the root); "" when valid. +func (s *schemaSet) validateAt(file, ref string, v jsonValue) string { + schema, f, ok := s.resolve(file, ref) + if !ok { + return "schema: cannot resolve " + file + ref + } + return s.validate(schema, f, v, "$") +} + +func typeMatches(name string, v jsonValue) bool { + switch name { + case "null": + return v.kind == jsonNull + case "boolean": + return v.kind == jsonBool + case "string": + return v.kind == jsonString + case "number": + return v.kind == jsonNumber && !math.IsNaN(v.num) && !math.IsInf(v.num, 0) + case "integer": + return v.kind == jsonNumber && v.num == math.Trunc(v.num) && !math.IsInf(v.num, 0) + case "array": + return v.kind == jsonArray + case "object": + return v.kind == jsonObject + } + return false +} + +func (s *schemaSet) validate(schema jsonValue, file string, v jsonValue, path string) string { + if schema.kind != jsonObject { + return path + ": schema is not an object" + } + for _, kw := range schema.obj { + if schemaAnnotations[kw.key] { + continue + } + if d := s.keyword(kw.key, kw.val, schema, file, v, path); d != "" { + return d + } + } + return "" +} + +func (s *schemaSet) keyword(key string, arg, schema jsonValue, file string, v jsonValue, path string) string { + switch key { + case "$ref": + target, f, ok := s.resolve(file, arg.str) + if !ok { + return path + ": cannot resolve $ref " + arg.str + } + return s.validate(target, f, v, path) + case "type": + names := []jsonValue{arg} + if arg.kind == jsonArray { + names = arg.arr + } + for _, n := range names { + if typeMatches(n.str, v) { + return "" + } + } + return path + ": expected type " + show(arg) + ", got " + show(v) + case "enum": + for _, e := range arg.arr { + if sameScalar(e, v) { + return "" + } + } + return path + ": " + show(v) + " is not one of " + show(arg) + case "required": + if v.kind != jsonObject { + return "" + } + for _, k := range arg.arr { + if _, ok := v.get(k.str); !ok { + return path + ": missing required key " + k.str + } + } + case "properties": + if v.kind != jsonObject { + return "" + } + for _, m := range v.obj { + if sub, ok := arg.get(m.key); ok { + if d := s.validate(sub, file, m.val, path+"."+m.key); d != "" { + return d + } + } + } + case "additionalProperties": + if v.kind != jsonObject { + return "" + } + if arg.kind != jsonBool || arg.b { + return path + ": unsupported additionalProperties " + show(arg) + } + props, _ := schema.get("properties") + for _, m := range v.obj { + if _, ok := props.get(m.key); !ok { + return path + ": unexpected key " + m.key + } + } + case "items": + if v.kind != jsonArray { + return "" + } + for i, x := range v.arr { + if d := s.validate(arg, file, x, path+"["+strconv.Itoa(i)+"]"); d != "" { + return d + } + } + case "oneOf": + n, last := 0, "" + for _, alt := range arg.arr { + if d := s.validate(alt, file, v, path); d == "" { + n++ + } else { + last = d + } + } + if n != 1 { + return path + ": " + strconv.Itoa(n) + " oneOf branches match (" + last + ")" + } + case "minimum": + if v.kind == jsonNumber && v.num < arg.num { + return path + ": " + show(v) + " is below " + show(arg) + } + case "maximum": + if v.kind == jsonNumber && v.num > arg.num { + return path + ": " + show(v) + " is above " + show(arg) + } + case "minLength": + if v.kind == jsonString && float64(utf8.RuneCountInString(v.str)) < arg.num { + return path + ": string shorter than " + show(arg) + } + default: + return path + ": unsupported schema keyword " + key + " (extend schema_test.go)" + } + return "" +} diff --git a/go/scripts/dump_artist_cases.mjs b/go/scripts/dump_artist_cases.mjs new file mode 100644 index 0000000..ec93c16 --- /dev/null +++ b/go/scripts/dump_artist_cases.mjs @@ -0,0 +1,99 @@ +#!/usr/bin/env node +// Writes go/testdata/artist_cases.json: values from the JS reference for the artist-side unit +// tests (artist_side_test.go), which run before the title side of the Go port exists. +// +// pnpm --filter trackparse build && node go/scripts/dump_artist_cases.mjs [path/to/js/dist] +// +// Three sections, all taken from inputs of the shared fixtures: +// artists: R10 parseArtists of every parseArtists fixture input and of the artist side (the +// text before the first " - ") of every parse fixture input, with the case options. +// `input` is already normalized (R1), since normalize.go belongs to the title side. +// versions: every bracketed version of the parse outputs (each one is R5 on its raw text). +// tracks: parse outputs of the handwritten fixtures and the format fixtures, with format() +// under several format options and allArtists(). +import { readdirSync, readFileSync, writeFileSync } from "node:fs"; +import { dirname, join, resolve } from "node:path"; +import { fileURLToPath, pathToFileURL } from "node:url"; + +const here = dirname(fileURLToPath(import.meta.url)); +const specDir = resolve(here, "../../spec"); +const dist = resolve(process.argv[2] ?? resolve(here, "../../js/dist")); +const tp = await import(pathToFileURL(join(dist, "index.js")).href); + +function files(dir) { + const out = []; + for (const e of readdirSync(dir, { withFileTypes: true })) { + const p = join(dir, e.name); + if (e.isDirectory()) out.push(...files(p)); + else if (e.name.endsWith(".json")) out.push(p); + } + return out.sort(); +} + +const formatOptions = [ + {}, + { feat: "artist" }, + { feat: "title" }, + { feat: "omit" }, + { joiners: "canonical" }, + { joiners: "canonical", feat: "artist" }, + { featMarker: "featuring" }, + { versions: "none", producers: false }, + { position: true }, +]; + +const artists = new Map(); +const versions = new Map(); +const tracks = []; +for (const file of files(join(specDir, "fixtures"))) { + const doc = JSON.parse(readFileSync(file, "utf8")); + if (!Array.isArray(doc.cases)) continue; + const handwritten = file.includes("/handwritten/"); + for (const c of doc.cases) { + const fn = c.fn ?? doc.defaults?.fn ?? "parse"; + const options = { ...doc.defaults?.options, ...c.options }; + const input = c.input; + if (typeof input !== "string") continue; + const addArtists = (text) => { + const norm = tp.normalize(text); + const key = JSON.stringify([norm, options]); + if (!artists.has(key)) { + const entry = { input: norm, expected: tp.parseArtists(text, options) }; + if (Object.keys(options).length > 0) entry.options = options; + artists.set(key, entry); + } + }; + if (fn === "parseArtists") addArtists(input); + if (fn !== "parse" && fn !== "format") continue; + const dash = input.indexOf(" - "); + if (fn === "parse" && dash > 0) addArtists(input.slice(0, dash)); + const track = tp.parse(input, options); + for (const v of track.versions) { + if (v.delimiter === "-") continue; + const key = JSON.stringify([v.raw, v.delimiter, options.knownArtists ?? null, options.splitAnd ?? null, options.keywords ?? null]); + if (!versions.has(key)) { + versions.set(key, Object.keys(options).length > 0 ? { options, version: v } : { version: v }); + } + } + if (handwritten || fn === "format") { + const cases = fn === "format" ? [c.formatOptions ?? {}] : formatOptions; + tracks.push({ + track, + formats: cases.map((o) => [o, tp.format(track, o)]), + allArtists: tp.allArtists(track), + }); + } + } +} + +const out = { + specVersion: tp.SPEC_VERSION, + artists: [...artists.values()], + versions: [...versions.values()], + tracks, +}; +const target = resolve(here, "../testdata/artist_cases.json"); +writeFileSync(target, `${JSON.stringify(out)}\n`); +console.log( + `${target}: ${out.artists.length} artist lists, ${out.versions.length} versions, ${out.tracks.length} tracks`, +); diff --git a/go/scripts/gen_data.mjs b/go/scripts/gen_data.mjs new file mode 100644 index 0000000..1c009ce --- /dev/null +++ b/go/scripts/gen_data.mjs @@ -0,0 +1,131 @@ +#!/usr/bin/env node +// Compiles spec/data/*.json and spec/VERSION into data_gen.go: one Go variable per key of each +// data file, in file order, so no JSON is parsed at run time. +// +// node go/scripts/gen_data.mjs write the file +// node go/scripts/gen_data.mjs --check exit 1 if the committed file is stale +// +// Shapes: a string array becomes []string, an object of strings []dataKV (file order; JS +// Object.entries order is applied at run time by tables.go), an array of joiner objects +// []dataJoiner, a string a const. Any other shape is an error: extend this script first. +import { readdirSync, readFileSync, writeFileSync } from "node:fs"; +import { dirname, join, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; + +const here = dirname(fileURLToPath(import.meta.url)); +const specDir = resolve(here, "../../spec"); +const dataDir = join(specDir, "data"); +const outFile = resolve(here, "../data_gen.go"); + +/** A Go interpreted string literal: printable ASCII as is, everything else escaped. */ +function str(s) { + let out = '"'; + for (const ch of s) { + const cp = ch.codePointAt(0); + if (ch === '"' || ch === "\\") out += `\\${ch}`; + else if (cp >= 0x20 && cp < 0x7f) out += ch; + else if (cp <= 0xffff) out += `\\u${cp.toString(16).padStart(4, "0")}`; + else out += `\\U${cp.toString(16).padStart(8, "0")}`; + } + return `${out}"`; +} + +const camel = (s) => s.replace(/[-_]([a-z])/g, (_m, c) => c.toUpperCase()); +const pascal = (s) => { + const c = camel(s); + return c.charAt(0).toUpperCase() + c.slice(1); +}; + +const JOINER_KEYS = new Set(["raw", "canonical", "kind", "caseSensitive"]); + +function fail(where, why) { + console.error(`gen_data.mjs: ${where}: ${why}; extend go/scripts/gen_data.mjs`); + process.exit(2); +} + +function render() { + const version = readFileSync(join(specDir, "VERSION"), "utf8").trim(); + const out = [ + "// Code generated by go/scripts/gen_data.mjs from spec/data and spec/VERSION. DO NOT EDIT.", + "", + "package trackparse", + "", + "// SpecVersion is the version of the spec this module implements.", + `const SpecVersion = ${str(version)} // x-release-please-version`, + "", + "// dataKV is one entry of a JSON object in spec/data, in file order.", + "type dataKV struct {", + "\tkey string", + "\tvalue string", + "}", + "", + "// dataJoiner is one entry of spec/data/joiners.json.", + "type dataJoiner struct {", + "\traw string", + "\tcanonical string", + "\tkind string", + "\tcaseSensitive bool", + "}", + ]; + for (const file of readdirSync(dataDir).filter((f) => f.endsWith(".json")).sort()) { + const data = JSON.parse(readFileSync(join(dataDir, file), "utf8")); + const stem = file.slice(0, -5); + for (const [key, v] of Object.entries(data)) { + if (key === "$comment") continue; + const name = `data${pascal(stem)}${pascal(key)}`; + const where = `spec/data/${file} ${key}`; + out.push(""); + out.push(`// ${name} is ${key} in spec/data/${file}.`); + if (typeof v === "string") { + out.push(`const ${name} = ${str(v)}`); + } else if (Array.isArray(v) && v.every((x) => typeof x === "string")) { + out.push(`var ${name} = []string{`); + for (const x of v) out.push(`\t${str(x)},`); + out.push("}"); + } else if (Array.isArray(v) && v.every((x) => x && typeof x === "object" && !Array.isArray(x))) { + out.push(`var ${name} = []dataJoiner{`); + for (const x of v) { + const fields = []; + for (const [k, fv] of Object.entries(x)) { + if (!JOINER_KEYS.has(k)) fail(where, `unknown key ${k}`); + if (k === "caseSensitive") { + if (typeof fv !== "boolean") fail(where, "caseSensitive is not a boolean"); + fields.push(`caseSensitive: ${fv}`); + } else { + if (typeof fv !== "string") fail(where, `${k} is not a string`); + fields.push(`${k}: ${str(fv)}`); + } + } + out.push(`\t{${fields.join(", ")}},`); + } + out.push("}"); + } else if (v && typeof v === "object" && !Array.isArray(v)) { + out.push(`var ${name} = []dataKV{`); + for (const [k, x] of Object.entries(v)) { + if (k === "$comment") continue; + if (typeof x !== "string") fail(where, `value of ${k} is not a string`); + out.push(`\t{${str(k)}, ${str(x)}},`); + } + out.push("}"); + } else { + fail(where, "unsupported shape"); + } + } + } + return `${out.join("\n")}\n`; +} + +const content = render(); +let current = ""; +try { + current = readFileSync(outFile, "utf8"); +} catch {} +if (process.argv.includes("--check")) { + if (current !== content) { + console.error("go/data_gen.go is stale: run node go/scripts/gen_data.mjs"); + process.exit(1); + } +} else if (current !== content) { + writeFileSync(outFile, content); + console.log(`wrote ${outFile}`); +} diff --git a/go/scripts/gen_unicode.mjs b/go/scripts/gen_unicode.mjs new file mode 100644 index 0000000..8771abf --- /dev/null +++ b/go/scripts/gen_unicode.mjs @@ -0,0 +1,488 @@ +#!/usr/bin/env node +// Writes go/unicode_gen.go: the Unicode tables of the Go port, all taken from the JS reference +// engine (Node) so the module's Unicode version is Node's, never the user's Go toolchain's: +// +// - general categories L and Lu (SPEC R0.6): /\p{L}/u and /\p{Lu}/u, as range tables; +// - String.prototype.toLowerCase() (R0.4 dedup key): runs of code points with a common delta, +// the multi-code-point results, and the properties Cased and Case_Ignorable that the +// final-sigma rule reads; +// - String.prototype.normalize("NFC" | "NFD") (R1, R0.4): full canonical decompositions, +// canonical combining class ranks, composition pairs and the NFC quick-check sets. Hangul +// syllables are left to the algorithm in unicode.go. +// +// How the canonical combining classes are derived (Node has no API for them): +// 1. Only code points with NFD(c) == c can appear in decomposed text, so only they get a class. +// 2. P1 = U+0334 and P240 = U+0345 are probes with NFD(P240 + P1) == P1 + P240, so +// ccc(P1) < ccc(P240). Canonical ordering swaps two adjacent non-starters exactly when the +// first has the larger class, and never moves a starter (class 0). So c is a non-starter iff +// NFD(c + P1) == P1 + c (then ccc(c) > ccc(P1) > 0) or NFD(P240 + c) == c + P240 (then +// 0 < ccc(c) < ccc(P240)). A non-starter that fails both would need +// ccc(P240) <= ccc(c) <= ccc(P1), which is impossible. +// 3. The non-starters are sorted with the comparator "a before b iff NFD(b + a) == a + b" +// (a has the smaller class), equal when neither order is swapped, and numbered 1, 2, ... +// by class. The numbers are ranks, not the Unicode values: normalization only observes the +// order of classes and whether two are equal, and ranks keep both. The test with +// TRACKPARSE_UNICODE_FULL=1 checks every ordered pair of non-starters against Node. +// +// Composition pairs: a primary composite is a code point c with NFD(c) != c and NFC(c) == c. +// Its pair is (NFC of all but the last code point of NFD(c), that last code point); the +// generator checks that the first part is one code point and that NFC(first + last) == c. +// +// node go/scripts/gen_unicode.mjs write unicode_gen.go and the test data +// node go/scripts/gen_unicode.mjs --check exit 1 if either is stale +// node go/scripts/gen_unicode.mjs --cases
write the exhaustive cases to /cases.jsonl +import { mkdirSync, readFileSync, writeFileSync } from "node:fs"; +import { dirname, join, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; + +const here = dirname(fileURLToPath(import.meta.url)); +const goDir = resolve(here, ".."); +const UNICODE = process.versions.unicode; + +const S_BASE = 0xac00; +const S_COUNT = 11172; +const isSurrogate = (cp) => cp >= 0xd800 && cp <= 0xdfff; +const isHangulSyllable = (cp) => cp >= S_BASE && cp < S_BASE + S_COUNT; +const chr = (cp) => String.fromCodePoint(cp); +const cps = (s) => [...s].map((c) => c.codePointAt(0)); +const NFD = (s) => s.normalize("NFD"); +const NFC = (s) => s.normalize("NFC"); + +function* scalars() { + for (let cp = 0; cp < 0x110000; cp++) if (!isSurrogate(cp)) yield cp; +} + +/** Inclusive ranges of the code points for which `test` holds. */ +function rangesOf(test) { + const out = []; + let start = -1; + for (let cp = 0; cp <= 0x110000; cp++) { + const hit = cp < 0x110000 && !isSurrogate(cp) && test(cp); + if (hit && start < 0) start = cp; + if (!hit && start >= 0) { + out.push([start, cp - 1]); + start = -1; + } + } + return out; +} +const regexRanges = (re) => rangesOf((cp) => re.test(chr(cp))); + +/** toLowerCase() of each code point that changes, as in rust/scripts/gen_data.mjs. */ +function lowercase() { + const runs = []; + const multi = []; + let run = null; + for (const cp of scalars()) { + const lower = cps(chr(cp).toLowerCase()); + if (lower.length === 1 && lower[0] === cp) continue; + if (lower.length !== 1) { + multi.push([cp, lower]); + run = null; // a run must not step over a code point of the other table + continue; + } + const delta = lower[0] - cp; + if (run && run.delta === delta && (run.step === 0 ? cp - run.last <= 2 : cp - run.last === run.step)) { + run.step = cp - run.last; + run.last = cp; + } else { + run = { first: cp, last: cp, step: 0, delta }; + runs.push(run); + } + } + for (const r of runs) if (r.step === 0) r.step = 1; + return { runs, multi }; +} + +/** The normalization tables (see the header comment for the method). */ +function normalization() { + const decomp = []; // [cp, [full NFD]] for non-Hangul code points that decompose + const stable = []; // code points with NFD(c) == c + for (const cp of scalars()) { + if (isHangulSyllable(cp)) continue; + const s = chr(cp); + const d = NFD(s); + if (d !== s) decomp.push([cp, cps(d)]); + else stable.push(cp); + } + + // Combining class ranks. + const P1 = "\u0334"; + const P240 = "\u0345"; + if (NFD(P240 + P1) !== P1 + P240) throw new Error("probe order: expected ccc(U+0334) < ccc(U+0345)"); + const nonStarters = stable.filter((cp) => { + const s = chr(cp); + return NFD(s + P1) === P1 + s || NFD(P240 + s) === s + P240; + }); + // cmp < 0 when a has the smaller class. + const cmp = (a, b) => { + const sa = chr(a); + const sb = chr(b); + if (NFD(sb + sa) === sa + sb) return -1; + if (NFD(sa + sb) === sb + sa) return 1; + return 0; + }; + const sorted = [...nonStarters].sort((a, b) => cmp(a, b) || a - b); + const rank = new Map(); + let r = 0; + for (let i = 0; i < sorted.length; i++) { + if (i === 0 || cmp(sorted[i - 1], sorted[i]) !== 0) r++; + rank.set(sorted[i], r); + } + if (r > 255) throw new Error("more than 255 classes"); + if (rank.get(0x334) !== 1 || rank.get(0x345) !== r) throw new Error("probes are not the extreme classes"); + const ccc = (cp) => rank.get(cp) ?? 0; + const cccRanges = []; + for (const cp of [...rank.keys()].sort((a, b) => a - b)) { + const last = cccRanges[cccRanges.length - 1]; + if (last && last[1] === cp - 1 && last[2] === ccc(cp)) last[1] = cp; + else cccRanges.push([cp, cp, ccc(cp)]); + } + + // Composition pairs and the NFC quick-check sets. + const nfcNo = new Set(); + const pairs = []; + for (const cp of scalars()) if (NFC(chr(cp)) !== chr(cp)) nfcNo.add(cp); + for (const [cp, d] of decomp) { + if (nfcNo.has(cp)) continue; + // A decomposable code point that NFC keeps starts with a starter: the quick check gives it + // class 0. + if (ccc(d[0]) !== 0) throw new Error(`U+${cp.toString(16)}: NFC-stable but starts with a non-starter`); + const last = d[d.length - 1]; + const first = cps(NFC(String.fromCodePoint(...d.slice(0, -1)))); + if (first.length !== 1 || NFC(chr(first[0]) + chr(last)) !== chr(cp)) { + throw new Error(`U+${cp.toString(16)}: no composition pair`); + } + pairs.push([first[0], last, cp]); + } + pairs.sort((a, b) => a[0] - b[0] || a[1] - b[1]); + const second = new Set(pairs.map((p) => p[1])); + for (let v = 0x1161; v <= 0x1175; v++) second.add(v); // Hangul V and T (algorithmic) + for (let t = 0x11a8; t <= 0x11c2; t++) second.add(t); + + const quickMin = Math.min(decomp[0][0], cccRanges[0][0], ...nfcNo, ...second); + return { + decomp, + cccRanges, + rank, + nonStarters: sorted.sort((a, b) => a - b), + pairs, + nfcNo: rangesOf((cp) => nfcNo.has(cp)), + second: rangesOf((cp) => second.has(cp)), + quickMin, + }; +} + +/** A Go string literal, ASCII only. */ +function goStr(arr) { + let out = '"'; + for (const cp of arr) { + if (cp === 0x22 || cp === 0x5c) out += `\\${String.fromCharCode(cp)}`; + else if (cp >= 0x20 && cp < 0x7f) out += String.fromCharCode(cp); + else if (cp <= 0xffff) out += `\\u${cp.toString(16).padStart(4, "0")}`; + else out += `\\U${cp.toString(16).padStart(8, "0")}`; + } + return `${out}"`; +} +const hex = (n) => `0x${n.toString(16)}`; + +/** Composite literal elements, `perLine` to a line. */ +function rows(items, perLine) { + const lines = []; + for (let i = 0; i < items.length; i += perLine) lines.push(`\t${items.slice(i, i + perLine).join(", ")},`); + return lines.join("\n"); +} + +const HEADER_UNICODE = `// Unicode ${UNICODE}`; +function renderGo(t) { + const ranges = (name, doc, rs) => + `// ${name}: ${doc}\nvar ${name} = []uniRange{\n${rows( + rs.map(([a, b]) => `{${hex(a)}, ${hex(b)}}`), + 6, + )}\n}\n`; + const { runs, multi } = t.lower; + const n = t.norm; + return [ + "// Code generated by scripts/gen_unicode.mjs; DO NOT EDIT.", + "// Run `node scripts/gen_unicode.mjs` in go/ to regenerate.", + "//", + "// Tables taken from the JS reference engine (Node), so the Unicode version is Node's and not", + "// the Go toolchain's: categories L and Lu (R0.6), toLowerCase() (R0.4) and NFC/NFD (R1, R0.4).", + "// The method behind the combining class ranks is described in scripts/gen_unicode.mjs.", + HEADER_UNICODE, + "", + "package trackparse", + "", + `// unicodeVersion is the Unicode version of Node's tables these were generated from.`, + `const unicodeVersion = ${goStr(cps(UNICODE))}`, + "", + ranges("uniLetter", "general category L (Lu, Ll, Lt, Lm, Lo), JS /\\p{L}/u.", t.letter), + ranges("uniUpper", "general category Lu, JS /\\p{Lu}/u.", t.upper), + ranges("uniCased", "property Cased, read by the final-sigma rule.", t.cased), + ranges("uniCaseIgnorable", "property Case_Ignorable, read by the final-sigma rule.", t.ignorable), + "// uniLower: JS toLowerCase() of one code point. Every first + k*step <= last maps to itself", + "// plus delta. Sorted by first, no overlaps.", + `var uniLower = []lowerRun{\n${rows( + runs.map((r) => `{${hex(r.first)}, ${hex(r.last)}, ${r.step}, ${r.delta}}`), + 4, + )}\n}\n`, + "// uniLowerMulti: code points whose lowercase is several code points. Sorted.", + `var uniLowerMulti = []lowerMulti{\n${rows( + multi.map(([cp, to]) => `{${hex(cp)}, ${goStr(to)}}`), + 4, + )}\n}\n`, + "// uniCCC: canonical combining class ranks of the code points that are their own NFD; 0 when", + "// absent. Ranks keep the order and equality of the classes, which is all normalization uses.", + `var uniCCC = []cccRange{\n${rows( + n.cccRanges.map(([a, b, c]) => `{${hex(a)}, ${hex(b)}, ${c}}`), + 5, + )}\n}\n`, + "// uniDecomp: full canonical decomposition (NFD) of every code point that has one, except the", + "// Hangul syllables. Sorted by code point.", + `var uniDecomp = []decompEntry{\n${rows( + n.decomp.map(([cp, d]) => `{${hex(cp)}, ${goStr(d)}}`), + 4, + )}\n}\n`, + "// uniCompose: canonical composition pairs (first, second) -> primary composite, without the", + "// Hangul syllables and the composition exclusions. Sorted by first, then second.", + `var uniCompose = []composePair{\n${rows( + n.pairs.map(([a, b, c]) => `{${hex(a)}, ${hex(b)}, ${hex(c)}}`), + 4, + )}\n}\n`, + ranges("uniNFCNo", "code points that NFC changes on their own (NFC_Quick_Check=No).", n.nfcNo), + ranges( + "uniComposeSecond", + "code points that can compose with what precedes them (NFC_Quick_Check=Maybe).", + n.second, + ), + "// uniQuickMin: every code point below it is a starter that neither normalization form changes", + "// and that never composes with what precedes it.", + `const uniQuickMin = ${hex(n.quickMin)}`, + "", + ].join("\n"); +} + +function tables() { + return { + letter: regexRanges(/^\p{L}$/u), + upper: regexRanges(/^\p{Lu}$/u), + cased: regexRanges(/^\p{Cased}$/u), + ignorable: regexRanges(/^\p{Case_Ignorable}$/u), + lower: lowercase(), + norm: normalization(), + }; +} + +// --------------------------------------------------------------------------- +// Test cases: one JSON object per line, {"g": group, "s": input, "c": NFC, "d": NFD, +// "l": toLowerCase, "k": category bits (1 = \p{L}, 2 = \p{Lu}, single code points only)}. +// "c", "d" and "l" are left out when equal to "s". + +/** mulberry32: a small seeded PRNG, so the committed sample is reproducible. */ +function prng(seed) { + let a = seed >>> 0; + return () => { + a = (a + 0x6d2b79f5) >>> 0; + let t = a; + t = Math.imul(t ^ (t >>> 15), t | 1); + t ^= t + Math.imul(t ^ (t >>> 7), t | 61); + return ((t ^ (t >>> 14)) >>> 0) / 4294967296; + }; +} + +function caseLine(g, s, single) { + const o = { g, s }; + const c = NFC(s); + const d = NFD(s); + const l = s.toLowerCase(); + if (c !== s) o.c = c; + if (d !== s) o.d = d; + if (l !== s) o.l = l; + if (single) o.k = (/^\p{L}$/u.test(s) ? 1 : 0) | (/^\p{Lu}$/u.test(s) ? 2 : 0); + return JSON.stringify(o); +} + +function* cases(t, full) { + const rnd = prng(0x7a11 + (full ? 1 : 0)); + const pick = (arr) => arr[Math.floor(rnd() * arr.length)]; + const int = (lo, hi) => lo + Math.floor(rnd() * (hi - lo + 1)); + const n = t.norm; + const marks = n.nonStarters; + const decompCps = n.decomp.map((e) => e[0]); + const lowerCps = [...t.lower.runs.flatMap((r) => [r.first, r.last]), ...t.lower.multi.map((m) => m[0])]; + + // Single code points: all of them, or the interesting ones plus a stride. + if (full) { + for (const cp of scalars()) yield caseLine("single", chr(cp), true); + } else { + // The committed sample is shipped in the module zip, so it stays small (under 300 KB): every + // range boundary of the tables, and every SAMPLE-th entry of the per-code-point lists. + const SAMPLE = 8; + const every = (list) => list.filter((_, i) => i % SAMPLE === 0); + const set = new Set([...every(decompCps), ...every(marks), ...every(lowerCps), ...every(n.pairs.map((p) => p[1]))]); + for (const [a, b] of [...t.letter, ...t.upper, ...n.nfcNo, ...t.cased, ...t.ignorable]) { + set.add(a); + set.add(b); + } + for (const cp of scalars()) if (cp % 4999 === 0) set.add(cp); + for (let cp = S_BASE; cp < S_BASE + S_COUNT; cp += 997) set.add(cp); + for (const cp of [...set].sort((a, b) => a - b)) if (!isSurrogate(cp)) yield caseLine("single", chr(cp), true); + } + + // Ordered pairs of non-starters, bare and after a starter. + const bases = ["a", "e", "o", "A", "u", "\u03b1", "\u03c9", "\u0438", "\u0b47", "\u1100", "\u05d0", "\u0627", "\u3099"]; + if (full) { + let i = 0; + for (const x of marks) { + for (const y of marks) { + const xy = chr(x) + chr(y); + yield caseLine("pair", xy); + yield caseLine("pair+base", bases[i++ % bases.length] + xy); + } + } + } else { + for (let i = 0; i < 500; i++) yield caseLine("pair+base", pick(bases) + chr(pick(marks)) + chr(pick(marks))); + } + + // Composition: every pair, blocked and unblocked by a mark in between, and the composite plus + // marks. + // (The sample takes one of the three forms per pair, in turn.) + for (const [i, [a, b, c]] of n.pairs.entries()) { + if (full || i % 3 === 0) yield caseLine("compose", chr(a) + chr(b)); + if (full || i % 3 === 1) yield caseLine("compose", chr(a) + chr(pick(marks)) + chr(b)); + if (full || i % 3 === 2) yield caseLine("compose", chr(c) + chr(pick(marks))); + } + + // Starter + mark + mark triples (starters that decompose or compose are the interesting ones). + const starters = [...decompCps.filter((cp) => !n.nfcNo.some(([lo, hi]) => cp >= lo && cp <= hi)), ...n.pairs.map((p) => p[0])]; + const triples = full ? 200000 : 400; + for (let i = 0; i < triples; i++) yield caseLine("triple", chr(pick(starters)) + chr(pick(marks)) + chr(pick(marks))); + + // Hangul: L+V, LV+T for the whole conjoining jamo blocks, syllables followed by T, and longer + // jamo runs. + const L = []; + const V = []; + const T = []; + for (let cp = 0x1100; cp <= 0x115f; cp++) L.push(cp); + for (let cp = 0x1160; cp <= 0x11a7; cp++) V.push(cp); + for (let cp = 0x11a8; cp <= 0x11ff; cp++) T.push(cp); + for (let cp = 0xa960; cp <= 0xa97c; cp++) L.push(cp); + for (let cp = 0xd7b0; cp <= 0xd7c6; cp++) V.push(cp); + for (let cp = 0xd7cb; cp <= 0xd7fb; cp++) T.push(cp); + T.push(0x11a7); // T base itself must not compose + const lv = []; + for (let s = S_BASE; s < S_BASE + S_COUNT; s += 28) lv.push(s); + if (full) { + for (const l of L) for (const v of V) yield caseLine("hangul", chr(l) + chr(v)); + for (const s of lv) for (const t2 of T) yield caseLine("hangul", chr(s) + chr(t2)); + for (let s = S_BASE; s < S_BASE + S_COUNT; s++) yield caseLine("hangul", chr(s) + chr(pick(T))); + } else { + for (let i = 0; i < 150; i++) yield caseLine("hangul", chr(pick(L)) + chr(pick(V))); + for (let i = 0; i < 150; i++) yield caseLine("hangul", chr(pick(lv)) + chr(pick(T))); + } + const jamo = [...L, ...V, ...T, 0x302e, 0x0301]; + for (let i = 0; i < (full ? 50000 : 100); i++) { + let s = ""; + for (let k = int(2, 6); k > 0; k--) s += chr(pick(jamo)); + yield caseLine("hangul", s); + } + + // Final sigma. + const sigma = [ + "\u03a3", "A\u03a3", "\u03a3A", "A\u03a3A", "\u039f\u0394\u039f\u03a3", "\u039f\u0394\u039f\u03a3 A", + "A\u03a3.", "A.\u03a3", "A\u03a3.A", "A\u03a3'", "A'\u03a3", "A\u03a3\u0301", "A\u0301\u03a3", + "A\u03a3\u0345", "A\u0345\u03a3", "\u03a3\u03a3", "A\u03a3\u03a3", "A\u03a3\u03a3A", "1\u03a3", + "A1\u03a3", "\u02b0\u03a3", "A\u02b0\u03a3", "A\u03a3\u02b0", "A\u00ad\u03a3", "A\u03a3\u00ad", + "A\u03a3\u00adB", "\u0130\u03a3", "a\u03a3 b\u03a3", "\u1f00\u03a3", "\u24b6\u03a3", "A\u03a3\u24b6", + "\ud801\udc00\u03a3", "A\u200d\u03a3", "A\u03a3\u200d", "A\u03a3\ufe0f", "A:\u03a3:", "A\u03a3:B", + ]; + for (const s of sigma) yield caseLine("sigma", s); + const sigmaPool = ["\u03a3", "\u03a3", "A", "a", "1", " ", ".", "'", ":", "\u0301", "\u0345", "\u02b0", "\u00ad", "\u24b6", "\u0130", "\u200d"]; + for (let i = 0; i < (full ? 50000 : 300); i++) { + let s = ""; + for (let k = int(1, 8); k > 0; k--) s += pick(sigmaPool); + yield caseLine("sigma", s); + } + + // Random strings. + const span = (lo, hi) => () => int(lo, hi); + const pools = [ + span(0x20, 0x7e), span(0x20, 0x7e), span(0x20, 0x7e), span(0x9, 0xd), + span(0xa0, 0x24f), span(0x1e00, 0x1eff), + span(0x370, 0x3ff), span(0x1f00, 0x1fff), () => 0x3a3, + span(0x400, 0x52f), + span(S_BASE, S_BASE + S_COUNT - 1), span(0x1100, 0x11ff), span(0x3130, 0x318f), + span(0x300, 0x36f), span(0x300, 0x36f), () => pick(marks), () => pick(marks), + span(0x1f300, 0x1faff), () => 0x200d, () => 0xfe0f, span(0x1f3fb, 0x1f3ff), + span(0x4e00, 0x9fff), span(0xf900, 0xfaff), span(0x2f800, 0x2fa1f), span(0x3040, 0x30ff), + () => pick(decompCps), () => pick(lowerCps), () => pick(starters), + ]; + for (let i = 0; i < (full ? 200000 : 300); i++) { + const cpsOut = []; + for (let k = int(1, 24); k > 0; k--) { + const cp = pick(pools)(); + if (!isSurrogate(cp)) cpsOut.push(cp); + } + yield caseLine("random", String.fromCodePoint(...cpsOut)); + } +} + +// --------------------------------------------------------------------------- + +const args = process.argv.slice(2); +const casesAt = args.indexOf("--cases"); +if (casesAt >= 0) { + const dir = args[casesAt + 1]; + if (!dir) throw new Error("--cases needs a directory"); + mkdirSync(dir, { recursive: true }); + const lines = []; + let bytes = 0; + const path = join(dir, "cases.jsonl"); + writeFileSync(path, ""); + for (const line of cases(tables(), true)) { + lines.push(line); + bytes += line.length; + if (bytes > 1 << 22) { + writeFileSync(path, `${lines.join("\n")}\n`, { flag: "a" }); + lines.length = 0; + bytes = 0; + } + } + writeFileSync(path, `${lines.join("\n")}\n`, { flag: "a" }); + writeFileSync(join(dir, "unicode-version.txt"), `${UNICODE}\n`); + console.log(`wrote ${path}`); +} else { + const check = args.includes("--check"); + const t = tables(); + let stale = false; + const emit = (rel, content) => { + const path = join(goDir, rel); + let current = ""; + try { + current = readFileSync(path, "utf8"); + } catch {} + if (check) { + // The tables depend on Node's Unicode version: only compare like with like. + let gen = ""; + try { + gen = readFileSync(join(goDir, "unicode_gen.go"), "utf8"); + } catch {} + const other = gen.match(/^\/\/ Unicode (\S+)$/m); + if (other && other[1] !== UNICODE) { + console.log(`${rel}: skipped (Unicode ${UNICODE} here)`); + return; + } + if (current !== content) { + console.error(`${rel} is stale: run node scripts/gen_unicode.mjs`); + stale = true; + } + } else if (current !== content) { + mkdirSync(dirname(path), { recursive: true }); + writeFileSync(path, content); + console.log(`wrote ${path}`); + } + }; + emit("unicode_gen.go", renderGo(t)); + emit("testdata/unicode/cases.jsonl", `${[...cases(t, false)].join("\n")}\n`); + if (stale) process.exit(1); +} diff --git a/go/separator.go b/go/separator.go new file mode 100644 index 0000000..53851c5 --- /dev/null +++ b/go/separator.go @@ -0,0 +1,352 @@ +package trackparse + +// R6: artist/title separator, including the R6.2 suffix peeling shared with R8.2 +// (js/src/separator.ts, rust/src/separator.rs). + +// peeled is a dash suffix taken off by R6.2 or R8.2. cls is one of the peelable kinds: junk, +// flag, year or versions (Rust's Peelable). +type peeled struct { + cls classification + raw string + pos int +} + +// classifySegment is the R6.2 classification of a bare dash segment: placeholders make it +// Unknown. +func classifySegment(seg skel, c *ctx) classification { + if hasGroup(&seg) { + return classification{kind: classUnknown} + } + text := collapseRunes(seg.text) + s := site{source: SourceTitle, delimiter: DelimiterDash, pos: startPos(&seg, 0)} + return classify(text, s, c) +} + +// isPeelable reports whether R6.2 / R8.2 can peel a classification. +func isPeelable(cls classification) bool { + switch cls.kind { + case classJunk, classFlag, classYear, classVersions: + return true + } + return false +} + +// peelSuffixes is R6.2 / R8.2: peel classifiable suffixes off the right end. relaxed drops +// conditions (i) to (iv) (R8.2 with an artist side). It gives the remaining segments and the +// peeled suffixes, left to right. +func peelSuffixes(segments []segment, relaxed bool, c *ctx) ([]segment, []peeled) { + remaining := segments + var out []peeled + for len(remaining) >= 2 { + last := remaining[len(remaining)-1] + cls := classifySegment(last.skel, c) + if !isPeelable(cls) { + break + } + words := splitWordsRunes(last.skel.text) + // (ii) does not apply to prefix-form versions ("Andy C b2b Hedex - Live at Printworks"). + prefixForm := false + if cls.kind == classVersions { + prefixForm = true + for _, v := range cls.versions { + if !v.prefixForm { + prefixForm = false + break + } + } + } + hasYear := false + for _, w := range words { + if _, ok := yearOf(w); ok { + hasYear = true + break + } + } + ok := relaxed || + len(remaining) > 2 || + (len(words) >= 2 && !prefixForm) || + hasYear || + cls.kind == classJunk + if !ok { + break + } + out = append(out, peeled{cls: cls, raw: collapseRunes(last.skel.text), pos: startPos(&last.skel, 0)}) + remaining = remaining[:len(remaining)-1] + } + // Left to right. + for i, j := 0, len(out)-1; i < j; i, j = i+1, j-1 { + out[i], out[j] = out[j], out[i] + } + return remaining, out +} + +// separatorResult is the outcome of R6. +type separatorResult struct { + artist *skel + title skel + // split: a separator split the string (R6.3 to R6.7), so R8.2 peels without conditions. + split bool + peeled []peeled +} + +// separatorInput is what R6 reads. +type separatorInput struct { + skel skel + mode Mode + // uploader is the R6.8 fallback artist, or nil. + uploader *skel + // listContext is the R13.4.2 list context (internal, set only by the tracklist module): it + // enables the R6.10 tight "letter-Uppercase" dash in tracklist mode. + listContext bool +} + +// splitParts is an artist side (nil when empty) and a title side. +type splitParts struct { + artist *skel + title skel +} + +// nonEmpty is the trimmed skeleton, or nil when it is empty. +func nonEmpty(s skel) *skel { + t := trimSkel(&s) + if t.isEmpty() { + return nil + } + return &t +} + +// splitAt cuts s around [cutStart, cutEnd). +func splitAt(s skel, cutStart, cutEnd int) splitParts { + right := sliceFrom(&s, cutEnd) + return splitParts{artist: nonEmpty(sliceSkel(&s, 0, cutStart)), title: trimSkel(&right)} +} + +// resultOf is a separator result for split parts. +func resultOf(parts splitParts, p []peeled) separatorResult { + return separatorResult{artist: parts.artist, title: parts.title, split: parts.artist != nil, peeled: p} +} + +// firstDashSplit is R6.3: the first segment is the artist side, the rest (up to the last kept +// one) the title. +func firstDashSplit(sk skel, segments []segment) (splitParts, bool) { + if len(segments) < 2 { + return splitParts{}, false + } + first, second, last := segments[0], segments[1], segments[len(segments)-1] + var artist *skel + if !first.skel.isEmpty() { + a := first.skel + artist = &a + } + return splitParts{artist: artist, title: sliceSkel(&sk, second.start, last.end)}, true +} + +// findSeparator is R6. +func findSeparator(in separatorInput, c *ctx) separatorResult { + sk := in.skel + mode := in.mode + segments := splitAtSpacedDashes(&sk, true) + if mode == ModeTracklist { + return tracklistSeparator(sk, segments, in.listContext, c) + } + remaining, p := peelSuffixes(segments, false, c) + + // R6.3 + if parts, ok := firstDashSplit(sk, remaining); ok { + return resultOf(parts, p) + } + + rest := sliceSkel(&sk, 0, 0) + if len(remaining) > 0 { + rest = remaining[0].skel + } + if other, ok := splitWithoutSpacedDash(rest, mode, c); ok { + return resultOf(other, p) + } + + // R6.8: the uploader fallback does not warn noSeparator. + var artist *skel + if mode == ModeYouTube { + artist = in.uploader + } + if !rest.isEmpty() && artist == nil { + c.warn(WarningNoSeparator) + } + return separatorResult{artist: artist, title: rest, split: false, peeled: p} +} + +// tracklistSeparator is R6.10, tracklist mode. The first spaced dash always separates (no R6.2 +// peeling; R8.2 still peels later suffixes on the title side). Without one: R6.4, then the +// first "_-_", then (list context only) the last tight "letter-Uppercase" dash; both of these +// warn unspacedDashSplit. +func tracklistSeparator(sk skel, segments []segment, listContext bool, c *ctx) separatorResult { + if parts, ok := firstDashSplit(sk, segments); ok { + return resultOf(parts, nil) + } + rest := sliceSkel(&sk, 0, 0) + if len(segments) > 0 { + rest = segments[0].skel + } + if asym, ok := asymmetricDash(rest.text); ok { + c.warn(WarningAsymmetricDashSplit) + return resultOf(splitAt(rest, asym, asym+1), nil) + } + if u, ok := underscoreDash(rest.text); ok { + c.warn(WarningUnspacedDashSplit) + return resultOf(splitAt(rest, u, u+3), nil) + } + if listContext { + if tight, ok := tightUpperDash(rest.text); ok { + c.warn(WarningUnspacedDashSplit) + return resultOf(splitAt(rest, tight, tight+1), nil) + } + } + if !rest.isEmpty() { + c.warn(WarningNoSeparator) + } + return separatorResult{title: rest} +} + +// underscoreDash is the index of the first "_-_". +func underscoreDash(t []rune) (int, bool) { + for i := 0; i+2 < len(t); i++ { + if t[i] == '_' && t[i+1] == '-' && t[i+2] == '_' { + return i, true + } + } + return 0, false +} + +// tightUpperDash is R6.10: the last "-" with a letter (R0.6) on its left and an uppercase +// letter (Lu) on its right, as in R6.7 ("Jay-Z-Numb" gives "Jay-Z" and "Numb"). +func tightUpperDash(t []rune) (int, bool) { + for i := len(t) - 2; i >= 1; i-- { + if at(t, i) == '-' && isLetterBefore(t, i) && isUpperAt(t, i+1) { + return i, true + } + } + return 0, false +} + +// splitWithoutSpacedDash is R6.4 to R6.7. +func splitWithoutSpacedDash(s skel, mode Mode, c *ctx) (splitParts, bool) { + if asym, ok := asymmetricDash(s.text); ok { + c.warn(WarningAsymmetricDashSplit) + return splitAt(s, asym, asym+1), true + } + if mode == ModeYouTube { + if quoted, ok := quotedTitle(s); ok { + c.warn(WarningQuotedTitleSplit) + return quoted, true + } + if by, ok := bySplit(s, c); ok { + c.warn(WarningBySplit) + lr := splitAt(s, by, by+4) + var artist *skel + if !lr.title.isEmpty() { + right := lr.title + artist = &right + } + title := s + if lr.artist != nil { + title = *lr.artist + } + return splitParts{artist: artist, title: title}, true + } + } + if mode == ModeYouTube || mode == ModeFilename { + if dash, ok := unspacedDash(s, c); ok { + c.warn(WarningUnspacedDashSplit) + return splitAt(s, dash, dash+1), true + } + } + return splitParts{}, false +} + +// asymmetricDash is R6.4: the first "-" with a space on exactly one side. +func asymmetricDash(t []rune) (int, bool) { + for i := 1; i+1 < len(t); i++ { + if at(t, i) == '-' && isWhitespace(before(t, i)) != isWhitespace(at(t, i+1)) { + return i, true + } + } + return 0, false +} + +// quotedTitle is R6.5: Artist "Title" (extra). +func quotedTitle(s skel) (splitParts, bool) { + t := s.text + open := runeIndex(t, '"') + if open <= 0 { + return splitParts{}, false + } + rel := runeIndex(tail(t, open+1), '"') + if rel < 0 { + return splitParts{}, false + } + closeAt := rel + open + 1 + left := sliceSkel(&s, 0, open) + artist := trimSkel(&left) + if last := at(artist.text, artist.len()-1); last == ':' || last == '-' { + shorter := sliceSkel(&artist, 0, artist.len()-1) + artist = trimSkel(&shorter) + } + quoted, after := sliceSkel(&s, open+1, closeAt), sliceFrom(&s, closeAt+1) + joined := concatSkel("ed, &after) + title := trimSkel(&joined) + var a *skel + if !artist.isEmpty() { + a = &artist + } + return splitParts{artist: a, title: title}, true +} + +// bySplit is R6.6: the index of the space before the last usable " by ". The right side must +// be non-empty and not a single stopword ("Stand by Me"). +func bySplit(s skel, c *ctx) (int, bool) { + t := s.text + // Candidates right to left; index 0 is never one (i > 0 in the JS loop). + for i := len(t) - 4; i > 0; i-- { + if at(t, i) != ' ' || at(t, i+1) != 'b' || at(t, i+2) != 'y' || at(t, i+3) != ' ' { + continue + } + // Placeholder-only words (groups such as "(Official Video)") don't count here. + var right []string + for _, w := range splitWordsRunes(tail(t, i+4)) { + if w == string(ph) { + continue + } + right = append(right, w) + } + singleStopword := len(right) == 1 && inVocab(right[0], c.t.stopwords) + if len(right) > 0 && !singleStopword { + return i, true + } + } + return 0, false +} + +// unspacedDash is R6.7: the chosen unspaced dash index ("Jay-Z-Numb"). +func unspacedDash(s skel, c *ctx) (int, bool) { + t := s.text + last, found := 0, false + for i := 1; i+1 < len(t); i++ { + if at(t, i) != '-' || isWhitespace(before(t, i)) || isWhitespace(at(t, i+1)) { + continue + } + if !(at(t, i+1) == '"' || isLetterAt(t, i+1)) { + continue + } + if len(c.knownKeys) > 0 && isKnownArtist(renderPrefix(&s, i), c) { + return i, true + } + last, found = i, true + } + return last, found +} + +// renderPrefix is the rendered text of s[:end]. +func renderPrefix(s *skel, end int) string { + head := sliceSkel(s, 0, end) + return renderSkel(&head) +} diff --git a/go/tables.go b/go/tables.go new file mode 100644 index 0000000..2296037 --- /dev/null +++ b/go/tables.go @@ -0,0 +1,218 @@ +package trackparse + +import ( + "slices" + "sync" +) + +// Vocabulary tables compiled from spec/data (data_gen.go), optionally extended by +// options.keywords (R12). The default tables are built once and shared; tables with keywords +// are built per Parser. Tables are read-only after building, so they are safe for concurrent +// use. The maps in them are only looked up, never ranged over. + +// spacedJoiner is one spaced joiner of joiners.json (R7.3). +type spacedJoiner struct { + raw string + canonical string + isAnd bool + caseSensitive bool +} + +// runInfo is the category of a word in the modifier run left of a version head (R5.7.2). +// Version types are strings: keywords.versionHeads values pass through to the output as given. +// A nil field is not set (JS undefined). +type runInfo struct { + typeCapable *string + descriptor *string + genre bool + head *string +} + +// tables are the vocabulary the pipeline reads. +type tables struct { + featMarkers *phraseTable[struct{}] + bracketOnlyFeat *phraseTable[struct{}] + producerMarkers *phraseTable[struct{}] + // titleFeatMarkers are the only unbracketed feat markers on the title side, plus + // keywords.featMarkers (R8.3). + titleFeatMarkers *phraseTable[struct{}] + // titleProducerMarkers are the only unbracketed producer markers on the title side (R8.3). + titleProducerMarkers *phraseTable[struct{}] + // junkOrGenre is junk phrases plus genres (kind genre): the R5.1 tokenizer vocabulary. + junkOrGenre *phraseTable[string] + // junkPhrases is junk phrases only (R8.4). + junkPhrases *phraseTable[string] + junkConnectors wordSet + labelSuffixes wordSet + heads *phraseTable[string] + genericHeadTypes wordSet + // runWords is everything allowed in the R5.7.2 modifier run, keyed by phrase. + runWords *phraseTable[runInfo] + prefixForms *phraseTable[string] + spacedJoiners []spacedJoiner + // tightJoiners maps a tight joiner to its canonical form. + tightJoiners map[string]string + featCanonical string + noSplitBefore wordSet + stopwords wordSet + unknownCaseSensitive wordSet + unknownCaseInsensitive wordSet + extensions wordSet + // platformSuffixes are sorted by UTF-16 length, longest first (stable). + platformSuffixes []string +} + +// lowerKeys is JS `asciiLower(s).trim()` of each entry, empty ones dropped. +func lowerKeys(list []string) []string { + var out []string + for _, s := range list { + if k := jsTrim(asciiLower(s)); k != "" { + out = append(out, k) + } + } + return out +} + +// dataEntries are the pairs of a data object in JS Object.entries order. +func dataEntries(list []dataKV) []kv { + pairs := make([]kv, len(list)) + for i, p := range list { + pairs[i] = kv(p) + } + return jsEntries(pairs) +} + +// markerTable is a set-like phrase table of base plus extra. +func markerTable(base, extra []string) *phraseTable[struct{}] { + t := newPhraseTable[struct{}]() + for _, m := range base { + t.add(m, struct{}{}) + } + for _, m := range extra { + t.add(m, struct{}{}) + } + return t +} + +// kindTable is a phrase table of string values. +func kindTable(entries ...[]kv) *phraseTable[string] { + t := newPhraseTable[string]() + for _, list := range entries { + for _, e := range list { + t.add(e.key, e.value) + } + } + return t +} + +// buildTables compiles the tables; kw nil means no extra words. +func buildTables(kw *keywordLists) *tables { + if kw == nil { + kw = &keywordLists{} + } + extraFeat := lowerKeys(kw.featMarkers) + + junkEntries := append(dataEntries(dataJunkPhrases), kw.junk...) + genres := append(slices.Clone(dataGenresGenres), lowerKeys(kw.genres)...) + genreEntries := make([]kv, len(genres)) + for i, g := range genres { + genreEntries[i] = kv{g, string(JunkKindGenre)} + } + + headEntries := append(dataEntries(dataVersionKeywordsHeads), kw.versionHeads...) + + // A Map in JS: the first note of a key fixes its place, later notes merge into it. + var runKeys []string + runIndex := map[string]int{} + var runInfos []runInfo + note := func(key string, patch func(*runInfo)) { + k := jsTrim(asciiLower(key)) + i, ok := runIndex[k] + if !ok { + i = len(runInfos) + runIndex[k] = i + runKeys = append(runKeys, k) + runInfos = append(runInfos, runInfo{}) + } + patch(&runInfos[i]) + } + for _, e := range dataEntries(dataVersionKeywordsTypeCapableModifiers) { + t := e.value + note(e.key, func(info *runInfo) { info.typeCapable = &t }) + } + for _, d := range append(slices.Clone(dataDescriptorsDescriptors), lowerKeys(kw.descriptors)...) { + value := jsTrim(asciiLower(d)) + note(d, func(info *runInfo) { info.descriptor = &value }) + } + for _, g := range genres { + note(g, func(info *runInfo) { info.genre = true }) + } + for _, e := range headEntries { + t := e.value + note(e.key, func(info *runInfo) { info.head = &t }) + } + runWords := newPhraseTable[runInfo]() + for i, k := range runKeys { + runWords.add(k, runInfos[i]) + } + + spaced := make([]spacedJoiner, len(dataJoinersSpaced)) + for i, j := range dataJoinersSpaced { + spaced[i] = spacedJoiner{ + raw: j.raw, + canonical: j.canonical, + isAnd: j.kind == "and", + caseSensitive: j.caseSensitive, + } + } + tight := make(map[string]string, len(dataJoinersTight)) + for _, j := range dataJoinersTight { + tight[j.raw] = j.canonical + } + suffixes := slices.Clone(dataPlatformSuffixesSuffixes) + // JS sorts by UTF-16 length, longest first; the sort is stable. + slices.SortStableFunc(suffixes, func(a, b string) int { + return utf16LenString(b) - utf16LenString(a) + }) + + return &tables{ + featMarkers: markerTable(dataFeatMarkersMarkers, extraFeat), + bracketOnlyFeat: markerTable(dataFeatMarkersBracketOnly, nil), + producerMarkers: markerTable(dataFeatMarkersProducer, nil), + titleFeatMarkers: markerTable(dataFeatMarkersTitleMarkers, extraFeat), + titleProducerMarkers: markerTable(dataFeatMarkersTitleProducer, nil), + junkOrGenre: kindTable(junkEntries, genreEntries), // junk first: it wins over a genre + junkPhrases: kindTable(junkEntries), + junkConnectors: newWordSet(dataJunkConnectors), + labelSuffixes: newWordSet(dataJunkLabelSuffixes), + heads: kindTable(headEntries), + genericHeadTypes: newWordSet(dataVersionKeywordsGenericHeads), + runWords: runWords, + prefixForms: kindTable(dataEntries(dataVersionKeywordsPrefixForms)), + spacedJoiners: spaced, + tightJoiners: tight, + featCanonical: dataJoinersFeatCanonical, + noSplitBefore: newWordSet(dataNoSplitBeforeWords), + stopwords: newWordSet(dataStopwordsWords), + unknownCaseSensitive: newWordSet(dataUnknownTokensCaseSensitive), + unknownCaseInsensitive: newWordSet(dataUnknownTokensCaseInsensitive), + extensions: newWordSet(dataExtensionsExtensions), + platformSuffixes: suffixes, + } +} + +// defaultTables are the tables without keywords, built once. +var defaultTables = sync.OnceValue(func() *tables { return buildTables(nil) }) + +// tablesFor is the default tables when kw is nil, else fresh tables with the extra words. +func tablesFor(kw *keywordLists) *tables { + if kw == nil { + return defaultTables() + } + return buildTables(kw) +} + +// isUnknownToken is R7.5 / R8.6: an unknown placeholder name (ID, ???, Untitled...). +func isUnknownToken(text string, t *tables) bool { + return t.unknownCaseSensitive.has(text) || t.unknownCaseInsensitive.has(asciiLower(text)) +} diff --git a/go/testdata/skip.json b/go/testdata/skip.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/go/testdata/skip.json @@ -0,0 +1 @@ +{} diff --git a/go/testdata/unicode/cases.jsonl b/go/testdata/unicode/cases.jsonl new file mode 100644 index 0000000..4771adb --- /dev/null +++ b/go/testdata/unicode/cases.jsonl @@ -0,0 +1,6109 @@ +{"g":"single","s":"\u0000","k":0} +{"g":"single","s":"'","k":0} +{"g":"single","s":".","k":0} +{"g":"single","s":":","k":0} +{"g":"single","s":"A","l":"a","k":3} +{"g":"single","s":"Z","l":"z","k":3} +{"g":"single","s":"^","k":0} +{"g":"single","s":"`","k":0} +{"g":"single","s":"a","k":1} +{"g":"single","s":"z","k":1} +{"g":"single","s":"¨","k":0} +{"g":"single","s":"ª","k":1} +{"g":"single","s":"­","k":0} +{"g":"single","s":"¯","k":0} +{"g":"single","s":"´","k":0} +{"g":"single","s":"µ","k":1} +{"g":"single","s":"·","k":0} +{"g":"single","s":"¸","k":0} +{"g":"single","s":"º","k":1} +{"g":"single","s":"À","d":"À","l":"à","k":3} +{"g":"single","s":"É","d":"É","l":"é","k":3} +{"g":"single","s":"Ò","d":"Ò","l":"ò","k":3} +{"g":"single","s":"Ö","d":"Ö","l":"ö","k":3} +{"g":"single","s":"Ø","l":"ø","k":3} +{"g":"single","s":"Ü","d":"Ü","l":"ü","k":3} +{"g":"single","s":"Þ","l":"þ","k":3} +{"g":"single","s":"ç","d":"ç","k":1} +{"g":"single","s":"ï","d":"ï","k":1} +{"g":"single","s":"ö","d":"ö","k":1} +{"g":"single","s":"ø","k":1} +{"g":"single","s":"ú","d":"ú","k":1} +{"g":"single","s":"Ā","d":"Ā","l":"ā","k":3} +{"g":"single","s":"Ă","d":"Ă","l":"ă","k":3} +{"g":"single","s":"ă","d":"ă","k":1} +{"g":"single","s":"Ą","d":"Ą","l":"ą","k":3} +{"g":"single","s":"Ć","d":"Ć","l":"ć","k":3} +{"g":"single","s":"Ĉ","d":"Ĉ","l":"ĉ","k":3} +{"g":"single","s":"Ċ","d":"Ċ","l":"ċ","k":3} +{"g":"single","s":"ċ","d":"ċ","k":1} +{"g":"single","s":"Č","d":"Č","l":"č","k":3} +{"g":"single","s":"Ď","d":"Ď","l":"ď","k":3} +{"g":"single","s":"Đ","l":"đ","k":3} +{"g":"single","s":"Ē","d":"Ē","l":"ē","k":3} +{"g":"single","s":"Ĕ","d":"Ĕ","l":"ĕ","k":3} +{"g":"single","s":"ĕ","d":"ĕ","k":1} +{"g":"single","s":"Ė","d":"Ė","l":"ė","k":3} +{"g":"single","s":"Ę","d":"Ę","l":"ę","k":3} +{"g":"single","s":"Ě","d":"Ě","l":"ě","k":3} +{"g":"single","s":"Ĝ","d":"Ĝ","l":"ĝ","k":3} +{"g":"single","s":"ĝ","d":"ĝ","k":1} +{"g":"single","s":"Ğ","d":"Ğ","l":"ğ","k":3} +{"g":"single","s":"Ġ","d":"Ġ","l":"ġ","k":3} +{"g":"single","s":"Ģ","d":"Ģ","l":"ģ","k":3} +{"g":"single","s":"Ĥ","d":"Ĥ","l":"ĥ","k":3} +{"g":"single","s":"ĥ","d":"ĥ","k":1} +{"g":"single","s":"Ħ","l":"ħ","k":3} +{"g":"single","s":"Ĩ","d":"Ĩ","l":"ĩ","k":3} +{"g":"single","s":"Ī","d":"Ī","l":"ī","k":3} +{"g":"single","s":"Ĭ","d":"Ĭ","l":"ĭ","k":3} +{"g":"single","s":"Į","d":"Į","l":"į","k":3} +{"g":"single","s":"į","d":"į","k":1} +{"g":"single","s":"İ","d":"İ","l":"i̇","k":3} +{"g":"single","s":"IJ","l":"ij","k":3} +{"g":"single","s":"Ĵ","d":"Ĵ","l":"ĵ","k":3} +{"g":"single","s":"Ķ","d":"Ķ","l":"ķ","k":3} +{"g":"single","s":"Ĺ","d":"Ĺ","l":"ĺ","k":3} +{"g":"single","s":"Ļ","d":"Ļ","l":"ļ","k":3} +{"g":"single","s":"Ľ","d":"Ľ","l":"ľ","k":3} +{"g":"single","s":"Ŀ","l":"ŀ","k":3} +{"g":"single","s":"Ł","l":"ł","k":3} +{"g":"single","s":"Ń","d":"Ń","l":"ń","k":3} +{"g":"single","s":"Ņ","d":"Ņ","l":"ņ","k":3} +{"g":"single","s":"Ň","d":"Ň","l":"ň","k":3} +{"g":"single","s":"Ŋ","l":"ŋ","k":3} +{"g":"single","s":"Ō","d":"Ō","l":"ō","k":3} +{"g":"single","s":"Ŏ","d":"Ŏ","l":"ŏ","k":3} +{"g":"single","s":"Ő","d":"Ő","l":"ő","k":3} +{"g":"single","s":"Œ","l":"œ","k":3} +{"g":"single","s":"Ŕ","d":"Ŕ","l":"ŕ","k":3} +{"g":"single","s":"Ŗ","d":"Ŗ","l":"ŗ","k":3} +{"g":"single","s":"Ř","d":"Ř","l":"ř","k":3} +{"g":"single","s":"Ś","d":"Ś","l":"ś","k":3} +{"g":"single","s":"Ŝ","d":"Ŝ","l":"ŝ","k":3} +{"g":"single","s":"Ş","d":"Ş","l":"ş","k":3} +{"g":"single","s":"Š","d":"Š","l":"š","k":3} +{"g":"single","s":"Ţ","d":"Ţ","l":"ţ","k":3} +{"g":"single","s":"Ť","d":"Ť","l":"ť","k":3} +{"g":"single","s":"Ŧ","l":"ŧ","k":3} +{"g":"single","s":"Ũ","d":"Ũ","l":"ũ","k":3} +{"g":"single","s":"Ū","d":"Ū","l":"ū","k":3} +{"g":"single","s":"Ŭ","d":"Ŭ","l":"ŭ","k":3} +{"g":"single","s":"Ů","d":"Ů","l":"ů","k":3} +{"g":"single","s":"Ű","d":"Ű","l":"ű","k":3} +{"g":"single","s":"Ų","d":"Ų","l":"ų","k":3} +{"g":"single","s":"Ŵ","d":"Ŵ","l":"ŵ","k":3} +{"g":"single","s":"Ŷ","d":"Ŷ","l":"ŷ","k":3} +{"g":"single","s":"Ÿ","d":"Ÿ","l":"ÿ","k":3} +{"g":"single","s":"Ź","d":"Ź","l":"ź","k":3} +{"g":"single","s":"Ż","d":"Ż","l":"ż","k":3} +{"g":"single","s":"Ž","d":"Ž","l":"ž","k":3} +{"g":"single","s":"ž","d":"ž","k":1} +{"g":"single","s":"Ɓ","l":"ɓ","k":3} +{"g":"single","s":"Ƃ","l":"ƃ","k":3} +{"g":"single","s":"Ƅ","l":"ƅ","k":3} +{"g":"single","s":"Ɔ","l":"ɔ","k":3} +{"g":"single","s":"Ƈ","l":"ƈ","k":3} +{"g":"single","s":"Ɖ","l":"ɖ","k":3} +{"g":"single","s":"Ƌ","l":"ƌ","k":3} +{"g":"single","s":"Ǝ","l":"ǝ","k":3} +{"g":"single","s":"Ə","l":"ə","k":3} +{"g":"single","s":"Ƒ","l":"ƒ","k":3} +{"g":"single","s":"Ɠ","l":"ɠ","k":3} +{"g":"single","s":"Ɣ","l":"ɣ","k":3} +{"g":"single","s":"Ɩ","l":"ɩ","k":3} +{"g":"single","s":"Ƙ","l":"ƙ","k":3} +{"g":"single","s":"Ɯ","l":"ɯ","k":3} +{"g":"single","s":"Ɲ","l":"ɲ","k":3} +{"g":"single","s":"Ɵ","l":"ɵ","k":3} +{"g":"single","s":"Ơ","d":"Ơ","l":"ơ","k":3} +{"g":"single","s":"Ƣ","l":"ƣ","k":3} +{"g":"single","s":"Ƥ","l":"ƥ","k":3} +{"g":"single","s":"Ʀ","l":"ʀ","k":3} +{"g":"single","s":"Ƨ","l":"ƨ","k":3} +{"g":"single","s":"Ʃ","l":"ʃ","k":3} +{"g":"single","s":"Ƭ","l":"ƭ","k":3} +{"g":"single","s":"Ʈ","l":"ʈ","k":3} +{"g":"single","s":"Ư","d":"Ư","l":"ư","k":3} +{"g":"single","s":"Ʊ","l":"ʊ","k":3} +{"g":"single","s":"Ƴ","l":"ƴ","k":3} +{"g":"single","s":"Ƶ","l":"ƶ","k":3} +{"g":"single","s":"Ʒ","l":"ʒ","k":3} +{"g":"single","s":"Ƹ","l":"ƹ","k":3} +{"g":"single","s":"ƺ","k":1} +{"g":"single","s":"Ƽ","l":"ƽ","k":3} +{"g":"single","s":"ƿ","k":1} +{"g":"single","s":"DŽ","l":"dž","k":3} +{"g":"single","s":"Dž","l":"dž","k":1} +{"g":"single","s":"LJ","l":"lj","k":3} +{"g":"single","s":"NJ","l":"nj","k":3} +{"g":"single","s":"Nj","l":"nj","k":1} +{"g":"single","s":"Ǎ","d":"Ǎ","l":"ǎ","k":3} +{"g":"single","s":"Ǐ","d":"Ǐ","l":"ǐ","k":3} +{"g":"single","s":"ǐ","d":"ǐ","k":1} +{"g":"single","s":"Ǒ","d":"Ǒ","l":"ǒ","k":3} +{"g":"single","s":"Ǔ","d":"Ǔ","l":"ǔ","k":3} +{"g":"single","s":"Ǖ","d":"Ǖ","l":"ǖ","k":3} +{"g":"single","s":"Ǘ","d":"Ǘ","l":"ǘ","k":3} +{"g":"single","s":"ǘ","d":"ǘ","k":1} +{"g":"single","s":"Ǚ","d":"Ǚ","l":"ǚ","k":3} +{"g":"single","s":"Ǜ","d":"Ǜ","l":"ǜ","k":3} +{"g":"single","s":"Ǟ","d":"Ǟ","l":"ǟ","k":3} +{"g":"single","s":"Ǡ","d":"Ǡ","l":"ǡ","k":3} +{"g":"single","s":"ǡ","d":"ǡ","k":1} +{"g":"single","s":"Ǣ","d":"Ǣ","l":"ǣ","k":3} +{"g":"single","s":"Ǥ","l":"ǥ","k":3} +{"g":"single","s":"Ǧ","d":"Ǧ","l":"ǧ","k":3} +{"g":"single","s":"Ǩ","d":"Ǩ","l":"ǩ","k":3} +{"g":"single","s":"Ǫ","d":"Ǫ","l":"ǫ","k":3} +{"g":"single","s":"ǫ","d":"ǫ","k":1} +{"g":"single","s":"Ǭ","d":"Ǭ","l":"ǭ","k":3} +{"g":"single","s":"Ǯ","d":"Ǯ","l":"ǯ","k":3} +{"g":"single","s":"DZ","l":"dz","k":3} +{"g":"single","s":"Ǵ","d":"Ǵ","l":"ǵ","k":3} +{"g":"single","s":"Ƕ","l":"ƕ","k":3} +{"g":"single","s":"Ǹ","d":"Ǹ","l":"ǹ","k":3} +{"g":"single","s":"Ǻ","d":"Ǻ","l":"ǻ","k":3} +{"g":"single","s":"Ǽ","d":"Ǽ","l":"ǽ","k":3} +{"g":"single","s":"Ǿ","d":"Ǿ","l":"ǿ","k":3} +{"g":"single","s":"Ȁ","d":"Ȁ","l":"ȁ","k":3} +{"g":"single","s":"Ȃ","d":"Ȃ","l":"ȃ","k":3} +{"g":"single","s":"Ȅ","d":"Ȅ","l":"ȅ","k":3} +{"g":"single","s":"Ȇ","d":"Ȇ","l":"ȇ","k":3} +{"g":"single","s":"Ȉ","d":"Ȉ","l":"ȉ","k":3} +{"g":"single","s":"Ȋ","d":"Ȋ","l":"ȋ","k":3} +{"g":"single","s":"Ȍ","d":"Ȍ","l":"ȍ","k":3} +{"g":"single","s":"Ȏ","d":"Ȏ","l":"ȏ","k":3} +{"g":"single","s":"Ȑ","d":"Ȑ","l":"ȑ","k":3} +{"g":"single","s":"Ȓ","d":"Ȓ","l":"ȓ","k":3} +{"g":"single","s":"Ȕ","d":"Ȕ","l":"ȕ","k":3} +{"g":"single","s":"Ȗ","d":"Ȗ","l":"ȗ","k":3} +{"g":"single","s":"Ș","d":"Ș","l":"ș","k":3} +{"g":"single","s":"Ț","d":"Ț","l":"ț","k":3} +{"g":"single","s":"Ȝ","l":"ȝ","k":3} +{"g":"single","s":"Ȟ","d":"Ȟ","l":"ȟ","k":3} +{"g":"single","s":"Ƞ","l":"ƞ","k":3} +{"g":"single","s":"Ȣ","l":"ȣ","k":3} +{"g":"single","s":"Ȥ","l":"ȥ","k":3} +{"g":"single","s":"Ȧ","d":"Ȧ","l":"ȧ","k":3} +{"g":"single","s":"Ȩ","d":"Ȩ","l":"ȩ","k":3} +{"g":"single","s":"Ȫ","d":"Ȫ","l":"ȫ","k":3} +{"g":"single","s":"Ȭ","d":"Ȭ","l":"ȭ","k":3} +{"g":"single","s":"Ȯ","d":"Ȯ","l":"ȯ","k":3} +{"g":"single","s":"Ȱ","d":"Ȱ","l":"ȱ","k":3} +{"g":"single","s":"Ȳ","d":"Ȳ","l":"ȳ","k":3} +{"g":"single","s":"Ⱥ","l":"ⱥ","k":3} +{"g":"single","s":"Ȼ","l":"ȼ","k":3} +{"g":"single","s":"Ƚ","l":"ƚ","k":3} +{"g":"single","s":"Ⱦ","l":"ⱦ","k":3} +{"g":"single","s":"Ɂ","l":"ɂ","k":3} +{"g":"single","s":"Ƀ","l":"ƀ","k":3} +{"g":"single","s":"Ʌ","l":"ʌ","k":3} +{"g":"single","s":"Ɇ","l":"ɇ","k":3} +{"g":"single","s":"Ɉ","l":"ɉ","k":3} +{"g":"single","s":"Ɋ","l":"ɋ","k":3} +{"g":"single","s":"Ɍ","l":"ɍ","k":3} +{"g":"single","s":"Ɏ","l":"ɏ","k":3} +{"g":"single","s":"ʓ","k":1} +{"g":"single","s":"ʖ","k":1} +{"g":"single","s":"ʰ","k":1} +{"g":"single","s":"ʸ","k":1} +{"g":"single","s":"ˀ","k":1} +{"g":"single","s":"ˁ","k":1} +{"g":"single","s":"ˆ","k":1} +{"g":"single","s":"ˑ","k":1} +{"g":"single","s":"ˠ","k":1} +{"g":"single","s":"ˤ","k":1} +{"g":"single","s":"ˬ","k":1} +{"g":"single","s":"ˮ","k":1} +{"g":"single","s":"̀","k":0} +{"g":"single","s":"́","k":0} +{"g":"single","s":"̂","k":0} +{"g":"single","s":"̃","k":0} +{"g":"single","s":"̄","k":0} +{"g":"single","s":"̆","k":0} +{"g":"single","s":"̇","k":0} +{"g":"single","s":"̈","k":0} +{"g":"single","s":"̉","k":0} +{"g":"single","s":"̊","k":0} +{"g":"single","s":"̌","k":0} +{"g":"single","s":"̏","k":0} +{"g":"single","s":"̐","k":0} +{"g":"single","s":"̑","k":0} +{"g":"single","s":"̓","k":0} +{"g":"single","s":"̔","k":0} +{"g":"single","s":"̘","k":0} +{"g":"single","s":"̛","k":0} +{"g":"single","s":"̠","k":0} +{"g":"single","s":"̣","k":0} +{"g":"single","s":"̧","k":0} +{"g":"single","s":"̨","k":0} +{"g":"single","s":"̭","k":0} +{"g":"single","s":"̮","k":0} +{"g":"single","s":"̰","k":0} +{"g":"single","s":"̱","k":0} +{"g":"single","s":"̸","k":0} +{"g":"single","s":"̀","c":"̀","d":"̀","k":0} +{"g":"single","s":"́","c":"́","d":"́","k":0} +{"g":"single","s":"͂","k":0} +{"g":"single","s":"̓","c":"̓","d":"̓","k":0} +{"g":"single","s":"̈́","c":"̈́","d":"̈́","k":0} +{"g":"single","s":"ͅ","k":0} +{"g":"single","s":"͌","k":0} +{"g":"single","s":"͕","k":0} +{"g":"single","s":"͝","k":0} +{"g":"single","s":"ͥ","k":0} +{"g":"single","s":"ͭ","k":0} +{"g":"single","s":"ͯ","k":0} +{"g":"single","s":"Ͱ","l":"ͱ","k":3} +{"g":"single","s":"Ͳ","l":"ͳ","k":3} +{"g":"single","s":"ͳ","k":1} +{"g":"single","s":"ʹ","c":"ʹ","d":"ʹ","k":1} +{"g":"single","s":"͵","k":0} +{"g":"single","s":"Ͷ","l":"ͷ","k":3} +{"g":"single","s":"ͷ","k":1} +{"g":"single","s":"ͺ","k":1} +{"g":"single","s":"ͽ","k":1} +{"g":"single","s":";","c":";","d":";","k":0} +{"g":"single","s":"Ϳ","l":"ϳ","k":3} +{"g":"single","s":"΄","k":0} +{"g":"single","s":"΅","d":"΅","k":0} +{"g":"single","s":"Ά","d":"Ά","l":"ά","k":3} +{"g":"single","s":"·","c":"·","d":"·","k":0} +{"g":"single","s":"Έ","d":"Έ","l":"έ","k":3} +{"g":"single","s":"Ί","d":"Ί","l":"ί","k":3} +{"g":"single","s":"Ό","d":"Ό","l":"ό","k":3} +{"g":"single","s":"Ύ","d":"Ύ","l":"ύ","k":3} +{"g":"single","s":"Ώ","d":"Ώ","l":"ώ","k":3} +{"g":"single","s":"Α","l":"α","k":3} +{"g":"single","s":"Ρ","l":"ρ","k":3} +{"g":"single","s":"Σ","l":"σ","k":3} +{"g":"single","s":"Ϋ","d":"Ϋ","l":"ϋ","k":3} +{"g":"single","s":"ή","d":"ή","k":1} +{"g":"single","s":"Ϗ","l":"ϗ","k":3} +{"g":"single","s":"ϒ","k":3} +{"g":"single","s":"ϓ","d":"ϓ","k":3} +{"g":"single","s":"ϔ","d":"ϔ","k":3} +{"g":"single","s":"Ϙ","l":"ϙ","k":3} +{"g":"single","s":"Ϛ","l":"ϛ","k":3} +{"g":"single","s":"Ϝ","l":"ϝ","k":3} +{"g":"single","s":"Ϟ","l":"ϟ","k":3} +{"g":"single","s":"Ϡ","l":"ϡ","k":3} +{"g":"single","s":"Ϣ","l":"ϣ","k":3} +{"g":"single","s":"Ϥ","l":"ϥ","k":3} +{"g":"single","s":"Ϧ","l":"ϧ","k":3} +{"g":"single","s":"Ϩ","l":"ϩ","k":3} +{"g":"single","s":"Ϫ","l":"ϫ","k":3} +{"g":"single","s":"Ϭ","l":"ϭ","k":3} +{"g":"single","s":"Ϯ","l":"ϯ","k":3} +{"g":"single","s":"ϴ","l":"θ","k":3} +{"g":"single","s":"ϵ","k":1} +{"g":"single","s":"Ϸ","l":"ϸ","k":3} +{"g":"single","s":"Ϲ","l":"ϲ","k":3} +{"g":"single","s":"Ϻ","l":"ϻ","k":3} +{"g":"single","s":"Ͻ","l":"ͻ","k":3} +{"g":"single","s":"Ў","d":"Ў","l":"ў","k":3} +{"g":"single","s":"Я","l":"я","k":3} +{"g":"single","s":"ѝ","d":"ѝ","k":1} +{"g":"single","s":"Ѡ","l":"ѡ","k":3} +{"g":"single","s":"Ѣ","l":"ѣ","k":3} +{"g":"single","s":"Ѥ","l":"ѥ","k":3} +{"g":"single","s":"Ѧ","l":"ѧ","k":3} +{"g":"single","s":"Ѩ","l":"ѩ","k":3} +{"g":"single","s":"Ѫ","l":"ѫ","k":3} +{"g":"single","s":"Ѭ","l":"ѭ","k":3} +{"g":"single","s":"Ѯ","l":"ѯ","k":3} +{"g":"single","s":"Ѱ","l":"ѱ","k":3} +{"g":"single","s":"Ѳ","l":"ѳ","k":3} +{"g":"single","s":"Ѵ","l":"ѵ","k":3} +{"g":"single","s":"Ѷ","d":"Ѷ","l":"ѷ","k":3} +{"g":"single","s":"Ѹ","l":"ѹ","k":3} +{"g":"single","s":"Ѻ","l":"ѻ","k":3} +{"g":"single","s":"Ѽ","l":"ѽ","k":3} +{"g":"single","s":"Ѿ","l":"ѿ","k":3} +{"g":"single","s":"Ҁ","l":"ҁ","k":3} +{"g":"single","s":"ҁ","k":1} +{"g":"single","s":"҃","k":0} +{"g":"single","s":"҉","k":0} +{"g":"single","s":"Ҋ","l":"ҋ","k":3} +{"g":"single","s":"Ҍ","l":"ҍ","k":3} +{"g":"single","s":"Ҏ","l":"ҏ","k":3} +{"g":"single","s":"Ґ","l":"ґ","k":3} +{"g":"single","s":"Ғ","l":"ғ","k":3} +{"g":"single","s":"Ҕ","l":"ҕ","k":3} +{"g":"single","s":"Җ","l":"җ","k":3} +{"g":"single","s":"Ҙ","l":"ҙ","k":3} +{"g":"single","s":"Қ","l":"қ","k":3} +{"g":"single","s":"Ҝ","l":"ҝ","k":3} +{"g":"single","s":"Ҟ","l":"ҟ","k":3} +{"g":"single","s":"Ҡ","l":"ҡ","k":3} +{"g":"single","s":"Ң","l":"ң","k":3} +{"g":"single","s":"Ҥ","l":"ҥ","k":3} +{"g":"single","s":"Ҧ","l":"ҧ","k":3} +{"g":"single","s":"Ҩ","l":"ҩ","k":3} +{"g":"single","s":"Ҫ","l":"ҫ","k":3} +{"g":"single","s":"Ҭ","l":"ҭ","k":3} +{"g":"single","s":"Ү","l":"ү","k":3} +{"g":"single","s":"Ұ","l":"ұ","k":3} +{"g":"single","s":"Ҳ","l":"ҳ","k":3} +{"g":"single","s":"Ҵ","l":"ҵ","k":3} +{"g":"single","s":"Ҷ","l":"ҷ","k":3} +{"g":"single","s":"Ҹ","l":"ҹ","k":3} +{"g":"single","s":"Һ","l":"һ","k":3} +{"g":"single","s":"Ҽ","l":"ҽ","k":3} +{"g":"single","s":"Ҿ","l":"ҿ","k":3} +{"g":"single","s":"Ӏ","l":"ӏ","k":3} +{"g":"single","s":"Ӂ","d":"Ӂ","l":"ӂ","k":3} +{"g":"single","s":"Ӄ","l":"ӄ","k":3} +{"g":"single","s":"Ӆ","l":"ӆ","k":3} +{"g":"single","s":"Ӈ","l":"ӈ","k":3} +{"g":"single","s":"Ӊ","l":"ӊ","k":3} +{"g":"single","s":"Ӌ","l":"ӌ","k":3} +{"g":"single","s":"Ӎ","l":"ӎ","k":3} +{"g":"single","s":"Ӑ","d":"Ӑ","l":"ӑ","k":3} +{"g":"single","s":"Ӓ","d":"Ӓ","l":"ӓ","k":3} +{"g":"single","s":"Ӕ","l":"ӕ","k":3} +{"g":"single","s":"Ӗ","d":"Ӗ","l":"ӗ","k":3} +{"g":"single","s":"Ә","l":"ә","k":3} +{"g":"single","s":"Ӛ","d":"Ӛ","l":"ӛ","k":3} +{"g":"single","s":"Ӝ","d":"Ӝ","l":"ӝ","k":3} +{"g":"single","s":"Ӟ","d":"Ӟ","l":"ӟ","k":3} +{"g":"single","s":"Ӡ","l":"ӡ","k":3} +{"g":"single","s":"Ӣ","d":"Ӣ","l":"ӣ","k":3} +{"g":"single","s":"Ӥ","d":"Ӥ","l":"ӥ","k":3} +{"g":"single","s":"Ӧ","d":"Ӧ","l":"ӧ","k":3} +{"g":"single","s":"Ө","l":"ө","k":3} +{"g":"single","s":"Ӫ","d":"Ӫ","l":"ӫ","k":3} +{"g":"single","s":"Ӭ","d":"Ӭ","l":"ӭ","k":3} +{"g":"single","s":"Ӯ","d":"Ӯ","l":"ӯ","k":3} +{"g":"single","s":"Ӱ","d":"Ӱ","l":"ӱ","k":3} +{"g":"single","s":"Ӳ","d":"Ӳ","l":"ӳ","k":3} +{"g":"single","s":"Ӵ","d":"Ӵ","l":"ӵ","k":3} +{"g":"single","s":"Ӷ","l":"ӷ","k":3} +{"g":"single","s":"Ӹ","d":"Ӹ","l":"ӹ","k":3} +{"g":"single","s":"Ӻ","l":"ӻ","k":3} +{"g":"single","s":"Ӽ","l":"ӽ","k":3} +{"g":"single","s":"Ӿ","l":"ӿ","k":3} +{"g":"single","s":"Ԁ","l":"ԁ","k":3} +{"g":"single","s":"Ԃ","l":"ԃ","k":3} +{"g":"single","s":"Ԅ","l":"ԅ","k":3} +{"g":"single","s":"Ԇ","l":"ԇ","k":3} +{"g":"single","s":"Ԉ","l":"ԉ","k":3} +{"g":"single","s":"Ԋ","l":"ԋ","k":3} +{"g":"single","s":"Ԍ","l":"ԍ","k":3} +{"g":"single","s":"Ԏ","l":"ԏ","k":3} +{"g":"single","s":"Ԑ","l":"ԑ","k":3} +{"g":"single","s":"Ԓ","l":"ԓ","k":3} +{"g":"single","s":"Ԕ","l":"ԕ","k":3} +{"g":"single","s":"Ԗ","l":"ԗ","k":3} +{"g":"single","s":"Ԙ","l":"ԙ","k":3} +{"g":"single","s":"Ԛ","l":"ԛ","k":3} +{"g":"single","s":"Ԝ","l":"ԝ","k":3} +{"g":"single","s":"Ԟ","l":"ԟ","k":3} +{"g":"single","s":"Ԡ","l":"ԡ","k":3} +{"g":"single","s":"Ԣ","l":"ԣ","k":3} +{"g":"single","s":"Ԥ","l":"ԥ","k":3} +{"g":"single","s":"Ԧ","l":"ԧ","k":3} +{"g":"single","s":"Ԩ","l":"ԩ","k":3} +{"g":"single","s":"Ԫ","l":"ԫ","k":3} +{"g":"single","s":"Ԭ","l":"ԭ","k":3} +{"g":"single","s":"Ԯ","l":"ԯ","k":3} +{"g":"single","s":"ԯ","k":1} +{"g":"single","s":"Ա","l":"ա","k":3} +{"g":"single","s":"Ֆ","l":"ֆ","k":3} +{"g":"single","s":"ՙ","k":1} +{"g":"single","s":"՟","k":0} +{"g":"single","s":"ՠ","k":1} +{"g":"single","s":"ֈ","k":1} +{"g":"single","s":"֑","k":0} +{"g":"single","s":"֙","k":0} +{"g":"single","s":"֡","k":0} +{"g":"single","s":"֩","k":0} +{"g":"single","s":"ֱ","k":0} +{"g":"single","s":"ֹ","k":0} +{"g":"single","s":"ֽ","k":0} +{"g":"single","s":"ֿ","k":0} +{"g":"single","s":"ׁ","k":0} +{"g":"single","s":"ׂ","k":0} +{"g":"single","s":"ׄ","k":0} +{"g":"single","s":"ׅ","k":0} +{"g":"single","s":"ׇ","k":0} +{"g":"single","s":"א","k":1} +{"g":"single","s":"ת","k":1} +{"g":"single","s":"ׯ","k":1} +{"g":"single","s":"ײ","k":1} +{"g":"single","s":"״","k":0} +{"g":"single","s":"؀","k":0} +{"g":"single","s":"؅","k":0} +{"g":"single","s":"ؐ","k":0} +{"g":"single","s":"ؕ","k":0} +{"g":"single","s":"ؚ","k":0} +{"g":"single","s":"؜","k":0} +{"g":"single","s":"ؠ","k":1} +{"g":"single","s":"ؤ","d":"ؤ","k":1} +{"g":"single","s":"ـ","k":1} +{"g":"single","s":"ي","k":1} +{"g":"single","s":"ً","k":0} +{"g":"single","s":"ٍ","k":0} +{"g":"single","s":"ٔ","k":0} +{"g":"single","s":"ٕ","k":0} +{"g":"single","s":"ٝ","k":0} +{"g":"single","s":"ٟ","k":0} +{"g":"single","s":"ٮ","k":1} +{"g":"single","s":"ٯ","k":1} +{"g":"single","s":"ٰ","k":0} +{"g":"single","s":"ٱ","k":1} +{"g":"single","s":"ۓ","d":"ۓ","k":1} +{"g":"single","s":"ە","k":1} +{"g":"single","s":"ۖ","k":0} +{"g":"single","s":"ۚ","k":0} +{"g":"single","s":"۝","k":0} +{"g":"single","s":"۟","k":0} +{"g":"single","s":"ۤ","k":0} +{"g":"single","s":"ۥ","k":1} +{"g":"single","s":"ۦ","k":1} +{"g":"single","s":"ۨ","k":0} +{"g":"single","s":"۪","k":0} +{"g":"single","s":"ۭ","k":0} +{"g":"single","s":"ۮ","k":1} +{"g":"single","s":"ۯ","k":1} +{"g":"single","s":"ۺ","k":1} +{"g":"single","s":"ۼ","k":1} +{"g":"single","s":"ۿ","k":1} +{"g":"single","s":"܏","k":0} +{"g":"single","s":"ܐ","k":1} +{"g":"single","s":"ܑ","k":0} +{"g":"single","s":"ܒ","k":1} +{"g":"single","s":"ܯ","k":1} +{"g":"single","s":"ܰ","k":0} +{"g":"single","s":"ܸ","k":0} +{"g":"single","s":"݀","k":0} +{"g":"single","s":"݈","k":0} +{"g":"single","s":"݊","k":0} +{"g":"single","s":"ݍ","k":1} +{"g":"single","s":"ޥ","k":1} +{"g":"single","s":"ަ","k":0} +{"g":"single","s":"ް","k":0} +{"g":"single","s":"ޱ","k":1} +{"g":"single","s":"ߊ","k":1} +{"g":"single","s":"ߪ","k":1} +{"g":"single","s":"߫","k":0} +{"g":"single","s":"߰","k":0} +{"g":"single","s":"ߴ","k":1} +{"g":"single","s":"ߵ","k":1} +{"g":"single","s":"ߺ","k":1} +{"g":"single","s":"߽","k":0} +{"g":"single","s":"ࠀ","k":1} +{"g":"single","s":"ࠕ","k":1} +{"g":"single","s":"ࠖ","k":0} +{"g":"single","s":"࠙","k":0} +{"g":"single","s":"ࠚ","k":1} +{"g":"single","s":"ࠢ","k":0} +{"g":"single","s":"ࠤ","k":1} +{"g":"single","s":"ࠨ","k":1} +{"g":"single","s":"ࠬ","k":0} +{"g":"single","s":"࠭","k":0} +{"g":"single","s":"ࡀ","k":1} +{"g":"single","s":"ࡘ","k":1} +{"g":"single","s":"࡙","k":0} +{"g":"single","s":"࡛","k":0} +{"g":"single","s":"ࡠ","k":1} +{"g":"single","s":"ࡪ","k":1} +{"g":"single","s":"ࡰ","k":1} +{"g":"single","s":"ࢇ","k":1} +{"g":"single","s":"࢈","k":0} +{"g":"single","s":"ࢉ","k":1} +{"g":"single","s":"࢏","k":1} +{"g":"single","s":"࢐","k":0} +{"g":"single","s":"࢑","k":0} +{"g":"single","s":"ࢗ","k":0} +{"g":"single","s":"࢚","k":0} +{"g":"single","s":"࢟","k":0} +{"g":"single","s":"ࢠ","k":1} +{"g":"single","s":"ࣉ","k":1} +{"g":"single","s":"࣌","k":0} +{"g":"single","s":"ࣔ","k":0} +{"g":"single","s":"ࣜ","k":0} +{"g":"single","s":"ࣥ","k":0} +{"g":"single","s":"࣭","k":0} +{"g":"single","s":"ࣵ","k":0} +{"g":"single","s":"ࣽ","k":0} +{"g":"single","s":"ं","k":0} +{"g":"single","s":"ऄ","k":1} +{"g":"single","s":"ऴ","d":"ऴ","k":1} +{"g":"single","s":"ह","k":1} +{"g":"single","s":"ऺ","k":0} +{"g":"single","s":"़","k":0} +{"g":"single","s":"ऽ","k":1} +{"g":"single","s":"ु","k":0} +{"g":"single","s":"ै","k":0} +{"g":"single","s":"्","k":0} +{"g":"single","s":"ॐ","k":1} +{"g":"single","s":"॑","k":0} +{"g":"single","s":"॔","k":0} +{"g":"single","s":"ॗ","k":0} +{"g":"single","s":"क़","c":"क़","d":"क़","k":1} +{"g":"single","s":"य़","c":"य़","d":"य़","k":1} +{"g":"single","s":"ॡ","k":1} +{"g":"single","s":"ॢ","k":0} +{"g":"single","s":"ॣ","k":0} +{"g":"single","s":"ॱ","k":1} +{"g":"single","s":"ঀ","k":1} +{"g":"single","s":"ঁ","k":0} +{"g":"single","s":"অ","k":1} +{"g":"single","s":"ঌ","k":1} +{"g":"single","s":"এ","k":1} +{"g":"single","s":"ঐ","k":1} +{"g":"single","s":"ও","k":1} +{"g":"single","s":"ন","k":1} +{"g":"single","s":"প","k":1} +{"g":"single","s":"র","k":1} +{"g":"single","s":"ল","k":1} +{"g":"single","s":"শ","k":1} +{"g":"single","s":"হ","k":1} +{"g":"single","s":"়","k":0} +{"g":"single","s":"ঽ","k":1} +{"g":"single","s":"া","k":0} +{"g":"single","s":"ু","k":0} +{"g":"single","s":"ৄ","k":0} +{"g":"single","s":"্","k":0} +{"g":"single","s":"ৎ","k":1} +{"g":"single","s":"ড়","c":"ড়","d":"ড়","k":1} +{"g":"single","s":"ঢ়","c":"ঢ়","d":"ঢ়","k":1} +{"g":"single","s":"য়","c":"য়","d":"য়","k":1} +{"g":"single","s":"ৡ","k":1} +{"g":"single","s":"ৢ","k":0} +{"g":"single","s":"ৣ","k":0} +{"g":"single","s":"ৰ","k":1} +{"g":"single","s":"ৱ","k":1} +{"g":"single","s":"ৼ","k":1} +{"g":"single","s":"৾","k":0} +{"g":"single","s":"ਁ","k":0} +{"g":"single","s":"ਂ","k":0} +{"g":"single","s":"ਅ","k":1} +{"g":"single","s":"ਊ","k":1} +{"g":"single","s":"ਏ","k":1} +{"g":"single","s":"ਐ","k":1} +{"g":"single","s":"ਓ","k":1} +{"g":"single","s":"ਨ","k":1} +{"g":"single","s":"ਪ","k":1} +{"g":"single","s":"ਰ","k":1} +{"g":"single","s":"ਲ","k":1} +{"g":"single","s":"ਲ਼","c":"ਲ਼","d":"ਲ਼","k":1} +{"g":"single","s":"ਵ","k":1} +{"g":"single","s":"ਸ਼","c":"ਸ਼","d":"ਸ਼","k":1} +{"g":"single","s":"ਸ","k":1} +{"g":"single","s":"ਹ","k":1} +{"g":"single","s":"਼","k":0} +{"g":"single","s":"ੁ","k":0} +{"g":"single","s":"ੂ","k":0} +{"g":"single","s":"ੇ","k":0} +{"g":"single","s":"ੈ","k":0} +{"g":"single","s":"ੋ","k":0} +{"g":"single","s":"੍","k":0} +{"g":"single","s":"ੑ","k":0} +{"g":"single","s":"ਖ਼","c":"ਖ਼","d":"ਖ਼","k":1} +{"g":"single","s":"ਜ਼","c":"ਜ਼","d":"ਜ਼","k":1} +{"g":"single","s":"ੜ","k":1} +{"g":"single","s":"ਫ਼","c":"ਫ਼","d":"ਫ਼","k":1} +{"g":"single","s":"ੰ","k":0} +{"g":"single","s":"ੱ","k":0} +{"g":"single","s":"ੲ","k":1} +{"g":"single","s":"ੴ","k":1} +{"g":"single","s":"ੵ","k":0} +{"g":"single","s":"ઁ","k":0} +{"g":"single","s":"ં","k":0} +{"g":"single","s":"અ","k":1} +{"g":"single","s":"ઍ","k":1} +{"g":"single","s":"એ","k":1} +{"g":"single","s":"ઑ","k":1} +{"g":"single","s":"ઓ","k":1} +{"g":"single","s":"ન","k":1} +{"g":"single","s":"પ","k":1} +{"g":"single","s":"ર","k":1} +{"g":"single","s":"લ","k":1} +{"g":"single","s":"ળ","k":1} +{"g":"single","s":"વ","k":1} +{"g":"single","s":"હ","k":1} +{"g":"single","s":"઼","k":0} +{"g":"single","s":"ઽ","k":1} +{"g":"single","s":"ુ","k":0} +{"g":"single","s":"ૅ","k":0} +{"g":"single","s":"ે","k":0} +{"g":"single","s":"ૈ","k":0} +{"g":"single","s":"્","k":0} +{"g":"single","s":"ૐ","k":1} +{"g":"single","s":"ૠ","k":1} +{"g":"single","s":"ૡ","k":1} +{"g":"single","s":"ૢ","k":0} +{"g":"single","s":"ૣ","k":0} +{"g":"single","s":"ૹ","k":1} +{"g":"single","s":"ૺ","k":0} +{"g":"single","s":"૿","k":0} +{"g":"single","s":"ଁ","k":0} +{"g":"single","s":"ଅ","k":1} +{"g":"single","s":"ଌ","k":1} +{"g":"single","s":"ଏ","k":1} +{"g":"single","s":"ଐ","k":1} +{"g":"single","s":"ଓ","k":1} +{"g":"single","s":"ନ","k":1} +{"g":"single","s":"ପ","k":1} +{"g":"single","s":"ର","k":1} +{"g":"single","s":"ଲ","k":1} +{"g":"single","s":"ଳ","k":1} +{"g":"single","s":"ଵ","k":1} +{"g":"single","s":"ହ","k":1} +{"g":"single","s":"଼","k":0} +{"g":"single","s":"ଽ","k":1} +{"g":"single","s":"ି","k":0} +{"g":"single","s":"ୁ","k":0} +{"g":"single","s":"ୄ","k":0} +{"g":"single","s":"୍","k":0} +{"g":"single","s":"୕","k":0} +{"g":"single","s":"ୖ","k":0} +{"g":"single","s":"ଡ଼","c":"ଡ଼","d":"ଡ଼","k":1} +{"g":"single","s":"ଢ଼","c":"ଢ଼","d":"ଢ଼","k":1} +{"g":"single","s":"ୟ","k":1} +{"g":"single","s":"ୡ","k":1} +{"g":"single","s":"ୢ","k":0} +{"g":"single","s":"ୣ","k":0} +{"g":"single","s":"ୱ","k":1} +{"g":"single","s":"ஂ","k":0} +{"g":"single","s":"ஃ","k":1} +{"g":"single","s":"அ","k":1} +{"g":"single","s":"ஊ","k":1} +{"g":"single","s":"எ","k":1} +{"g":"single","s":"ஐ","k":1} +{"g":"single","s":"ஒ","k":1} +{"g":"single","s":"க","k":1} +{"g":"single","s":"ங","k":1} +{"g":"single","s":"ச","k":1} +{"g":"single","s":"ஜ","k":1} +{"g":"single","s":"ஞ","k":1} +{"g":"single","s":"ட","k":1} +{"g":"single","s":"ண","k":1} +{"g":"single","s":"த","k":1} +{"g":"single","s":"ந","k":1} +{"g":"single","s":"ப","k":1} +{"g":"single","s":"ம","k":1} +{"g":"single","s":"ஹ","k":1} +{"g":"single","s":"ா","k":0} +{"g":"single","s":"ீ","k":0} +{"g":"single","s":"்","k":0} +{"g":"single","s":"ௐ","k":1} +{"g":"single","s":"ఀ","k":0} +{"g":"single","s":"ఄ","k":0} +{"g":"single","s":"అ","k":1} +{"g":"single","s":"ఌ","k":1} +{"g":"single","s":"ఎ","k":1} +{"g":"single","s":"ఐ","k":1} +{"g":"single","s":"ఒ","k":1} +{"g":"single","s":"న","k":1} +{"g":"single","s":"ప","k":1} +{"g":"single","s":"హ","k":1} +{"g":"single","s":"఼","k":0} +{"g":"single","s":"ఽ","k":1} +{"g":"single","s":"ా","k":0} +{"g":"single","s":"ీ","k":0} +{"g":"single","s":"ె","k":0} +{"g":"single","s":"ై","d":"ై","k":0} +{"g":"single","s":"ొ","k":0} +{"g":"single","s":"్","k":0} +{"g":"single","s":"ౕ","k":0} +{"g":"single","s":"ౖ","k":0} +{"g":"single","s":"ౘ","k":1} +{"g":"single","s":"ౚ","k":1} +{"g":"single","s":"౜","k":1} +{"g":"single","s":"ౝ","k":1} +{"g":"single","s":"ౠ","k":1} +{"g":"single","s":"ౡ","k":1} +{"g":"single","s":"ౢ","k":0} +{"g":"single","s":"ౣ","k":0} +{"g":"single","s":"ಀ","k":1} +{"g":"single","s":"ಁ","k":0} +{"g":"single","s":"ಅ","k":1} +{"g":"single","s":"ಌ","k":1} +{"g":"single","s":"ಎ","k":1} +{"g":"single","s":"ಐ","k":1} +{"g":"single","s":"ಒ","k":1} +{"g":"single","s":"ನ","k":1} +{"g":"single","s":"ಪ","k":1} +{"g":"single","s":"ಳ","k":1} +{"g":"single","s":"ವ","k":1} +{"g":"single","s":"ಹ","k":1} +{"g":"single","s":"಼","k":0} +{"g":"single","s":"ಽ","k":1} +{"g":"single","s":"ಿ","k":0} +{"g":"single","s":"ೆ","k":0} +{"g":"single","s":"ೈ","d":"ೈ","k":0} +{"g":"single","s":"ೌ","k":0} +{"g":"single","s":"್","k":0} +{"g":"single","s":"೜","k":1} +{"g":"single","s":"ೞ","k":1} +{"g":"single","s":"ೠ","k":1} +{"g":"single","s":"ೡ","k":1} +{"g":"single","s":"ೢ","k":0} +{"g":"single","s":"ೣ","k":0} +{"g":"single","s":"ೱ","k":1} +{"g":"single","s":"ೲ","k":1} +{"g":"single","s":"ഀ","k":0} +{"g":"single","s":"ഁ","k":0} +{"g":"single","s":"ഄ","k":1} +{"g":"single","s":"ഌ","k":1} +{"g":"single","s":"എ","k":1} +{"g":"single","s":"ഐ","k":1} +{"g":"single","s":"ഒ","k":1} +{"g":"single","s":"ഺ","k":1} +{"g":"single","s":"഻","k":0} +{"g":"single","s":"഼","k":0} +{"g":"single","s":"ഽ","k":1} +{"g":"single","s":"ു","k":0} +{"g":"single","s":"ൄ","k":0} +{"g":"single","s":"്","k":0} +{"g":"single","s":"ൎ","k":1} +{"g":"single","s":"ൔ","k":1} +{"g":"single","s":"ൖ","k":1} +{"g":"single","s":"ൗ","k":0} +{"g":"single","s":"ൟ","k":1} +{"g":"single","s":"ൡ","k":1} +{"g":"single","s":"ൢ","k":0} +{"g":"single","s":"ൣ","k":0} +{"g":"single","s":"ൺ","k":1} +{"g":"single","s":"ൿ","k":1} +{"g":"single","s":"ඁ","k":0} +{"g":"single","s":"අ","k":1} +{"g":"single","s":"ඖ","k":1} +{"g":"single","s":"ක","k":1} +{"g":"single","s":"න","k":1} +{"g":"single","s":"ඳ","k":1} +{"g":"single","s":"ර","k":1} +{"g":"single","s":"ල","k":1} +{"g":"single","s":"ව","k":1} +{"g":"single","s":"ෆ","k":1} +{"g":"single","s":"්","k":0} +{"g":"single","s":"ි","k":0} +{"g":"single","s":"ු","k":0} +{"g":"single","s":"ූ","k":0} +{"g":"single","s":"ෝ","d":"ෝ","k":0} +{"g":"single","s":"ก","k":1} +{"g":"single","s":"ะ","k":1} +{"g":"single","s":"ั","k":0} +{"g":"single","s":"า","k":1} +{"g":"single","s":"ำ","k":1} +{"g":"single","s":"ิ","k":0} +{"g":"single","s":"ฺ","k":0} +{"g":"single","s":"เ","k":1} +{"g":"single","s":"ๆ","k":1} +{"g":"single","s":"่","k":0} +{"g":"single","s":"๎","k":0} +{"g":"single","s":"ກ","k":1} +{"g":"single","s":"ຂ","k":1} +{"g":"single","s":"ຄ","k":1} +{"g":"single","s":"ຆ","k":1} +{"g":"single","s":"ຊ","k":1} +{"g":"single","s":"ຌ","k":1} +{"g":"single","s":"ຣ","k":1} +{"g":"single","s":"ລ","k":1} +{"g":"single","s":"ວ","k":1} +{"g":"single","s":"ະ","k":1} +{"g":"single","s":"ັ","k":0} +{"g":"single","s":"າ","k":1} +{"g":"single","s":"ຳ","k":1} +{"g":"single","s":"ິ","k":0} +{"g":"single","s":"ຼ","k":0} +{"g":"single","s":"ຽ","k":1} +{"g":"single","s":"ເ","k":1} +{"g":"single","s":"ໄ","k":1} +{"g":"single","s":"ໆ","k":1} +{"g":"single","s":"່","k":0} +{"g":"single","s":"້","k":0} +{"g":"single","s":"໎","k":0} +{"g":"single","s":"ໜ","k":1} +{"g":"single","s":"ໟ","k":1} +{"g":"single","s":"ༀ","k":1} +{"g":"single","s":"༘","k":0} +{"g":"single","s":"༙","k":0} +{"g":"single","s":"༵","k":0} +{"g":"single","s":"༷","k":0} +{"g":"single","s":"༹","k":0} +{"g":"single","s":"ཀ","k":1} +{"g":"single","s":"གྷ","c":"གྷ","d":"གྷ","k":1} +{"g":"single","s":"ཇ","k":1} +{"g":"single","s":"ཉ","k":1} +{"g":"single","s":"ཌྷ","c":"ཌྷ","d":"ཌྷ","k":1} +{"g":"single","s":"དྷ","c":"དྷ","d":"དྷ","k":1} +{"g":"single","s":"བྷ","c":"བྷ","d":"བྷ","k":1} +{"g":"single","s":"ཛྷ","c":"ཛྷ","d":"ཛྷ","k":1} +{"g":"single","s":"ཀྵ","c":"ཀྵ","d":"ཀྵ","k":1} +{"g":"single","s":"ཬ","k":1} +{"g":"single","s":"ཱ","k":0} +{"g":"single","s":"ཱི","c":"ཱི","d":"ཱི","k":0} +{"g":"single","s":"ཱུ","c":"ཱུ","d":"ཱུ","k":0} +{"g":"single","s":"ྲྀ","c":"ྲྀ","d":"ྲྀ","k":0} +{"g":"single","s":"ླྀ","c":"ླྀ","d":"ླྀ","k":0} +{"g":"single","s":"ཾ","k":0} +{"g":"single","s":"ྀ","k":0} +{"g":"single","s":"ཱྀ","c":"ཱྀ","d":"ཱྀ","k":0} +{"g":"single","s":"ྂ","k":0} +{"g":"single","s":"྄","k":0} +{"g":"single","s":"྆","k":0} +{"g":"single","s":"྇","k":0} +{"g":"single","s":"ྈ","k":1} +{"g":"single","s":"ྌ","k":1} +{"g":"single","s":"ྍ","k":0} +{"g":"single","s":"ྒྷ","c":"ྒྷ","d":"ྒྷ","k":0} +{"g":"single","s":"ྗ","k":0} +{"g":"single","s":"ྙ","k":0} +{"g":"single","s":"ྜྷ","c":"ྜྷ","d":"ྜྷ","k":0} +{"g":"single","s":"ྡྷ","c":"ྡྷ","d":"ྡྷ","k":0} +{"g":"single","s":"ྦྷ","c":"ྦྷ","d":"ྦྷ","k":0} +{"g":"single","s":"ྫྷ","c":"ྫྷ","d":"ྫྷ","k":0} +{"g":"single","s":"ྐྵ","c":"ྐྵ","d":"ྐྵ","k":0} +{"g":"single","s":"ྼ","k":0} +{"g":"single","s":"࿆","k":0} +{"g":"single","s":"က","k":1} +{"g":"single","s":"ဪ","k":1} +{"g":"single","s":"ိ","k":0} +{"g":"single","s":"ူ","k":0} +{"g":"single","s":"ဲ","k":0} +{"g":"single","s":"့","k":0} +{"g":"single","s":"္","k":0} +{"g":"single","s":"်","k":0} +{"g":"single","s":"ွ","k":0} +{"g":"single","s":"ှ","k":0} +{"g":"single","s":"ဿ","k":1} +{"g":"single","s":"ၐ","k":1} +{"g":"single","s":"ၕ","k":1} +{"g":"single","s":"ၘ","k":0} +{"g":"single","s":"ၙ","k":0} +{"g":"single","s":"ၚ","k":1} +{"g":"single","s":"ၝ","k":1} +{"g":"single","s":"ၞ","k":0} +{"g":"single","s":"ၠ","k":0} +{"g":"single","s":"ၡ","k":1} +{"g":"single","s":"ၥ","k":1} +{"g":"single","s":"ၦ","k":1} +{"g":"single","s":"ၮ","k":1} +{"g":"single","s":"ၰ","k":1} +{"g":"single","s":"ၱ","k":0} +{"g":"single","s":"ၴ","k":0} +{"g":"single","s":"ၵ","k":1} +{"g":"single","s":"ႁ","k":1} +{"g":"single","s":"ႂ","k":0} +{"g":"single","s":"ႅ","k":0} +{"g":"single","s":"ႆ","k":0} +{"g":"single","s":"ႍ","k":0} +{"g":"single","s":"ႎ","k":1} +{"g":"single","s":"ႝ","k":0} +{"g":"single","s":"Ⴀ","l":"ⴀ","k":3} +{"g":"single","s":"Ⴥ","l":"ⴥ","k":3} +{"g":"single","s":"Ⴧ","l":"ⴧ","k":3} +{"g":"single","s":"Ⴭ","l":"ⴭ","k":3} +{"g":"single","s":"ა","k":1} +{"g":"single","s":"ჺ","k":1} +{"g":"single","s":"ჼ","k":1} +{"g":"single","s":"ჿ","k":1} +{"g":"single","s":"ቈ","k":1} +{"g":"single","s":"ቊ","k":1} +{"g":"single","s":"ቍ","k":1} +{"g":"single","s":"ቐ","k":1} +{"g":"single","s":"ቖ","k":1} +{"g":"single","s":"ቘ","k":1} +{"g":"single","s":"ቚ","k":1} +{"g":"single","s":"ቝ","k":1} +{"g":"single","s":"በ","k":1} +{"g":"single","s":"ኈ","k":1} +{"g":"single","s":"ኊ","k":1} +{"g":"single","s":"ኍ","k":1} +{"g":"single","s":"ነ","k":1} +{"g":"single","s":"ኰ","k":1} +{"g":"single","s":"ኲ","k":1} +{"g":"single","s":"ኵ","k":1} +{"g":"single","s":"ኸ","k":1} +{"g":"single","s":"ኾ","k":1} +{"g":"single","s":"ዀ","k":1} +{"g":"single","s":"ዂ","k":1} +{"g":"single","s":"ዅ","k":1} +{"g":"single","s":"ወ","k":1} +{"g":"single","s":"ዖ","k":1} +{"g":"single","s":"ዘ","k":1} +{"g":"single","s":"ጐ","k":1} +{"g":"single","s":"ጒ","k":1} +{"g":"single","s":"ጕ","k":1} +{"g":"single","s":"ጘ","k":1} +{"g":"single","s":"ፚ","k":1} +{"g":"single","s":"፝","k":0} +{"g":"single","s":"፟","k":0} +{"g":"single","s":"ᎀ","k":1} +{"g":"single","s":"ᎇ","k":1} +{"g":"single","s":"ᎏ","k":1} +{"g":"single","s":"Ꭰ","l":"ꭰ","k":3} +{"g":"single","s":"Ᏽ","l":"ᏽ","k":3} +{"g":"single","s":"ᏸ","k":1} +{"g":"single","s":"ᏽ","k":1} +{"g":"single","s":"ᐁ","k":1} +{"g":"single","s":"ᙬ","k":1} +{"g":"single","s":"ᙯ","k":1} +{"g":"single","s":"ᙿ","k":1} +{"g":"single","s":"ᚁ","k":1} +{"g":"single","s":"ᚚ","k":1} +{"g":"single","s":"ᚠ","k":1} +{"g":"single","s":"ᛪ","k":1} +{"g":"single","s":"ᛱ","k":1} +{"g":"single","s":"ᛸ","k":1} +{"g":"single","s":"ᜀ","k":1} +{"g":"single","s":"ᜑ","k":1} +{"g":"single","s":"ᜒ","k":0} +{"g":"single","s":"᜔","k":0} +{"g":"single","s":"ᜟ","k":1} +{"g":"single","s":"ᜱ","k":1} +{"g":"single","s":"ᜲ","k":0} +{"g":"single","s":"ᜳ","k":0} +{"g":"single","s":"ᝀ","k":1} +{"g":"single","s":"ᝑ","k":1} +{"g":"single","s":"ᝒ","k":0} +{"g":"single","s":"ᝓ","k":0} +{"g":"single","s":"ᝠ","k":1} +{"g":"single","s":"ᝬ","k":1} +{"g":"single","s":"ᝮ","k":1} +{"g":"single","s":"ᝰ","k":1} +{"g":"single","s":"ᝲ","k":0} +{"g":"single","s":"ᝳ","k":0} +{"g":"single","s":"ក","k":1} +{"g":"single","s":"ឳ","k":1} +{"g":"single","s":"឴","k":0} +{"g":"single","s":"឵","k":0} +{"g":"single","s":"ិ","k":0} +{"g":"single","s":"ួ","k":0} +{"g":"single","s":"ំ","k":0} +{"g":"single","s":"៉","k":0} +{"g":"single","s":"្","k":0} +{"g":"single","s":"៓","k":0} +{"g":"single","s":"ៗ","k":1} +{"g":"single","s":"ៜ","k":1} +{"g":"single","s":"៝","k":0} +{"g":"single","s":"᠋","k":0} +{"g":"single","s":"᠏","k":0} +{"g":"single","s":"ᠠ","k":1} +{"g":"single","s":"ᡃ","k":1} +{"g":"single","s":"ᡸ","k":1} +{"g":"single","s":"ᢀ","k":1} +{"g":"single","s":"ᢄ","k":1} +{"g":"single","s":"ᢅ","k":0} +{"g":"single","s":"ᢆ","k":0} +{"g":"single","s":"ᢇ","k":1} +{"g":"single","s":"ᢨ","k":1} +{"g":"single","s":"ᢩ","k":0} +{"g":"single","s":"ᢪ","k":1} +{"g":"single","s":"ᢰ","k":1} +{"g":"single","s":"ᣵ","k":1} +{"g":"single","s":"ᤀ","k":1} +{"g":"single","s":"ᤞ","k":1} +{"g":"single","s":"ᤠ","k":0} +{"g":"single","s":"ᤢ","k":0} +{"g":"single","s":"ᤧ","k":0} +{"g":"single","s":"ᤨ","k":0} +{"g":"single","s":"ᤲ","k":0} +{"g":"single","s":"᤹","k":0} +{"g":"single","s":"᤻","k":0} +{"g":"single","s":"ᥐ","k":1} +{"g":"single","s":"ᥭ","k":1} +{"g":"single","s":"ᥰ","k":1} +{"g":"single","s":"ᥴ","k":1} +{"g":"single","s":"ᦀ","k":1} +{"g":"single","s":"ᦫ","k":1} +{"g":"single","s":"ᦰ","k":1} +{"g":"single","s":"ᧉ","k":1} +{"g":"single","s":"ᨀ","k":1} +{"g":"single","s":"ᨖ","k":1} +{"g":"single","s":"ᨗ","k":0} +{"g":"single","s":"ᨘ","k":0} +{"g":"single","s":"ᨛ","k":0} +{"g":"single","s":"ᨠ","k":1} +{"g":"single","s":"ᩔ","k":1} +{"g":"single","s":"ᩖ","k":0} +{"g":"single","s":"ᩘ","k":0} +{"g":"single","s":"ᩞ","k":0} +{"g":"single","s":"᩠","k":0} +{"g":"single","s":"ᩢ","k":0} +{"g":"single","s":"ᩥ","k":0} +{"g":"single","s":"ᩬ","k":0} +{"g":"single","s":"ᩳ","k":0} +{"g":"single","s":"᩼","k":0} +{"g":"single","s":"᩿","k":0} +{"g":"single","s":"ᪧ","k":1} +{"g":"single","s":"᪰","k":0} +{"g":"single","s":"᪶","k":0} +{"g":"single","s":"ᪿ","k":0} +{"g":"single","s":"᫇","k":0} +{"g":"single","s":"᫏","k":0} +{"g":"single","s":"᫗","k":0} +{"g":"single","s":"᫝","k":0} +{"g":"single","s":"᫠","k":0} +{"g":"single","s":"᫡","k":0} +{"g":"single","s":"᫩","k":0} +{"g":"single","s":"᫫","k":0} +{"g":"single","s":"ᬀ","k":0} +{"g":"single","s":"ᬃ","k":0} +{"g":"single","s":"ᬅ","k":1} +{"g":"single","s":"ᬎ","d":"ᬎ","k":1} +{"g":"single","s":"ᬳ","k":1} +{"g":"single","s":"᬴","k":0} +{"g":"single","s":"ᬵ","k":0} +{"g":"single","s":"ᬶ","k":0} +{"g":"single","s":"ᬺ","k":0} +{"g":"single","s":"ᬼ","k":0} +{"g":"single","s":"ᭂ","k":0} +{"g":"single","s":"ᭅ","k":1} +{"g":"single","s":"ᭌ","k":1} +{"g":"single","s":"᭫","k":0} +{"g":"single","s":"᭮","k":0} +{"g":"single","s":"᭳","k":0} +{"g":"single","s":"ᮀ","k":0} +{"g":"single","s":"ᮁ","k":0} +{"g":"single","s":"ᮃ","k":1} +{"g":"single","s":"ᮠ","k":1} +{"g":"single","s":"ᮢ","k":0} +{"g":"single","s":"ᮥ","k":0} +{"g":"single","s":"ᮨ","k":0} +{"g":"single","s":"ᮩ","k":0} +{"g":"single","s":"᮫","k":0} +{"g":"single","s":"ᮭ","k":0} +{"g":"single","s":"ᮮ","k":1} +{"g":"single","s":"ᮯ","k":1} +{"g":"single","s":"ᮺ","k":1} +{"g":"single","s":"ᯥ","k":1} +{"g":"single","s":"᯦","k":0} +{"g":"single","s":"ᯨ","k":0} +{"g":"single","s":"ᯩ","k":0} +{"g":"single","s":"ᯭ","k":0} +{"g":"single","s":"ᯯ","k":0} +{"g":"single","s":"ᯱ","k":0} +{"g":"single","s":"ᰀ","k":1} +{"g":"single","s":"ᰣ","k":1} +{"g":"single","s":"ᰬ","k":0} +{"g":"single","s":"ᰳ","k":0} +{"g":"single","s":"ᰶ","k":0} +{"g":"single","s":"᰷","k":0} +{"g":"single","s":"ᱍ","k":1} +{"g":"single","s":"ᱏ","k":1} +{"g":"single","s":"ᱚ","k":1} +{"g":"single","s":"ᱸ","k":1} +{"g":"single","s":"ᱽ","k":1} +{"g":"single","s":"ᲀ","k":1} +{"g":"single","s":"Ᲊ","l":"ᲊ","k":3} +{"g":"single","s":"ᲊ","k":1} +{"g":"single","s":"Ა","l":"ა","k":3} +{"g":"single","s":"Ჺ","l":"ჺ","k":3} +{"g":"single","s":"Ჽ","l":"ჽ","k":3} +{"g":"single","s":"Ჿ","l":"ჿ","k":3} +{"g":"single","s":"᳐","k":0} +{"g":"single","s":"᳒","k":0} +{"g":"single","s":"᳔","k":0} +{"g":"single","s":"᳕","k":0} +{"g":"single","s":"᳝","k":0} +{"g":"single","s":"᳠","k":0} +{"g":"single","s":"᳢","k":0} +{"g":"single","s":"᳦","k":0} +{"g":"single","s":"᳨","k":0} +{"g":"single","s":"ᳩ","k":1} +{"g":"single","s":"ᳬ","k":1} +{"g":"single","s":"᳭","k":0} +{"g":"single","s":"ᳮ","k":1} +{"g":"single","s":"ᳳ","k":1} +{"g":"single","s":"᳴","k":0} +{"g":"single","s":"ᳵ","k":1} +{"g":"single","s":"ᳶ","k":1} +{"g":"single","s":"᳸","k":0} +{"g":"single","s":"᳹","k":0} +{"g":"single","s":"ᳺ","k":1} +{"g":"single","s":"ᴀ","k":1} +{"g":"single","s":"ᴬ","k":1} +{"g":"single","s":"ᵪ","k":1} +{"g":"single","s":"ᵸ","k":1} +{"g":"single","s":"ᶛ","k":1} +{"g":"single","s":"ᶿ","k":1} +{"g":"single","s":"᷁","k":0} +{"g":"single","s":"᷉","k":0} +{"g":"single","s":"᷑","k":0} +{"g":"single","s":"ᷙ","k":0} +{"g":"single","s":"ᷡ","k":0} +{"g":"single","s":"ᷩ","k":0} +{"g":"single","s":"ᷱ","k":0} +{"g":"single","s":"᷹","k":0} +{"g":"single","s":"᷿","k":0} +{"g":"single","s":"Ḁ","d":"Ḁ","l":"ḁ","k":3} +{"g":"single","s":"ḁ","d":"ḁ","k":1} +{"g":"single","s":"Ḃ","d":"Ḃ","l":"ḃ","k":3} +{"g":"single","s":"Ḅ","d":"Ḅ","l":"ḅ","k":3} +{"g":"single","s":"Ḇ","d":"Ḇ","l":"ḇ","k":3} +{"g":"single","s":"Ḉ","d":"Ḉ","l":"ḉ","k":3} +{"g":"single","s":"ḉ","d":"ḉ","k":1} +{"g":"single","s":"Ḋ","d":"Ḋ","l":"ḋ","k":3} +{"g":"single","s":"Ḍ","d":"Ḍ","l":"ḍ","k":3} +{"g":"single","s":"Ḏ","d":"Ḏ","l":"ḏ","k":3} +{"g":"single","s":"Ḑ","d":"Ḑ","l":"ḑ","k":3} +{"g":"single","s":"ḑ","d":"ḑ","k":1} +{"g":"single","s":"Ḓ","d":"Ḓ","l":"ḓ","k":3} +{"g":"single","s":"Ḕ","d":"Ḕ","l":"ḕ","k":3} +{"g":"single","s":"Ḗ","d":"Ḗ","l":"ḗ","k":3} +{"g":"single","s":"Ḙ","d":"Ḙ","l":"ḙ","k":3} +{"g":"single","s":"ḙ","d":"ḙ","k":1} +{"g":"single","s":"Ḛ","d":"Ḛ","l":"ḛ","k":3} +{"g":"single","s":"Ḝ","d":"Ḝ","l":"ḝ","k":3} +{"g":"single","s":"Ḟ","d":"Ḟ","l":"ḟ","k":3} +{"g":"single","s":"Ḡ","d":"Ḡ","l":"ḡ","k":3} +{"g":"single","s":"ḡ","d":"ḡ","k":1} +{"g":"single","s":"Ḣ","d":"Ḣ","l":"ḣ","k":3} +{"g":"single","s":"Ḥ","d":"Ḥ","l":"ḥ","k":3} +{"g":"single","s":"Ḧ","d":"Ḧ","l":"ḧ","k":3} +{"g":"single","s":"Ḩ","d":"Ḩ","l":"ḩ","k":3} +{"g":"single","s":"ḩ","d":"ḩ","k":1} +{"g":"single","s":"Ḫ","d":"Ḫ","l":"ḫ","k":3} +{"g":"single","s":"Ḭ","d":"Ḭ","l":"ḭ","k":3} +{"g":"single","s":"Ḯ","d":"Ḯ","l":"ḯ","k":3} +{"g":"single","s":"Ḱ","d":"Ḱ","l":"ḱ","k":3} +{"g":"single","s":"ḱ","d":"ḱ","k":1} +{"g":"single","s":"Ḳ","d":"Ḳ","l":"ḳ","k":3} +{"g":"single","s":"Ḵ","d":"Ḵ","l":"ḵ","k":3} +{"g":"single","s":"Ḷ","d":"Ḷ","l":"ḷ","k":3} +{"g":"single","s":"Ḹ","d":"Ḹ","l":"ḹ","k":3} +{"g":"single","s":"ḹ","d":"ḹ","k":1} +{"g":"single","s":"Ḻ","d":"Ḻ","l":"ḻ","k":3} +{"g":"single","s":"Ḽ","d":"Ḽ","l":"ḽ","k":3} +{"g":"single","s":"Ḿ","d":"Ḿ","l":"ḿ","k":3} +{"g":"single","s":"Ṁ","d":"Ṁ","l":"ṁ","k":3} +{"g":"single","s":"ṁ","d":"ṁ","k":1} +{"g":"single","s":"Ṃ","d":"Ṃ","l":"ṃ","k":3} +{"g":"single","s":"Ṅ","d":"Ṅ","l":"ṅ","k":3} +{"g":"single","s":"Ṇ","d":"Ṇ","l":"ṇ","k":3} +{"g":"single","s":"Ṉ","d":"Ṉ","l":"ṉ","k":3} +{"g":"single","s":"ṉ","d":"ṉ","k":1} +{"g":"single","s":"Ṋ","d":"Ṋ","l":"ṋ","k":3} +{"g":"single","s":"Ṍ","d":"Ṍ","l":"ṍ","k":3} +{"g":"single","s":"Ṏ","d":"Ṏ","l":"ṏ","k":3} +{"g":"single","s":"Ṑ","d":"Ṑ","l":"ṑ","k":3} +{"g":"single","s":"ṑ","d":"ṑ","k":1} +{"g":"single","s":"Ṓ","d":"Ṓ","l":"ṓ","k":3} +{"g":"single","s":"Ṕ","d":"Ṕ","l":"ṕ","k":3} +{"g":"single","s":"Ṗ","d":"Ṗ","l":"ṗ","k":3} +{"g":"single","s":"Ṙ","d":"Ṙ","l":"ṙ","k":3} +{"g":"single","s":"ṙ","d":"ṙ","k":1} +{"g":"single","s":"Ṛ","d":"Ṛ","l":"ṛ","k":3} +{"g":"single","s":"Ṝ","d":"Ṝ","l":"ṝ","k":3} +{"g":"single","s":"Ṟ","d":"Ṟ","l":"ṟ","k":3} +{"g":"single","s":"Ṡ","d":"Ṡ","l":"ṡ","k":3} +{"g":"single","s":"ṡ","d":"ṡ","k":1} +{"g":"single","s":"Ṣ","d":"Ṣ","l":"ṣ","k":3} +{"g":"single","s":"Ṥ","d":"Ṥ","l":"ṥ","k":3} +{"g":"single","s":"Ṧ","d":"Ṧ","l":"ṧ","k":3} +{"g":"single","s":"Ṩ","d":"Ṩ","l":"ṩ","k":3} +{"g":"single","s":"ṩ","d":"ṩ","k":1} +{"g":"single","s":"Ṫ","d":"Ṫ","l":"ṫ","k":3} +{"g":"single","s":"Ṭ","d":"Ṭ","l":"ṭ","k":3} +{"g":"single","s":"Ṯ","d":"Ṯ","l":"ṯ","k":3} +{"g":"single","s":"Ṱ","d":"Ṱ","l":"ṱ","k":3} +{"g":"single","s":"ṱ","d":"ṱ","k":1} +{"g":"single","s":"Ṳ","d":"Ṳ","l":"ṳ","k":3} +{"g":"single","s":"Ṵ","d":"Ṵ","l":"ṵ","k":3} +{"g":"single","s":"Ṷ","d":"Ṷ","l":"ṷ","k":3} +{"g":"single","s":"Ṹ","d":"Ṹ","l":"ṹ","k":3} +{"g":"single","s":"ṹ","d":"ṹ","k":1} +{"g":"single","s":"Ṻ","d":"Ṻ","l":"ṻ","k":3} +{"g":"single","s":"Ṽ","d":"Ṽ","l":"ṽ","k":3} +{"g":"single","s":"Ṿ","d":"Ṿ","l":"ṿ","k":3} +{"g":"single","s":"Ẁ","d":"Ẁ","l":"ẁ","k":3} +{"g":"single","s":"ẁ","d":"ẁ","k":1} +{"g":"single","s":"Ẃ","d":"Ẃ","l":"ẃ","k":3} +{"g":"single","s":"Ẅ","d":"Ẅ","l":"ẅ","k":3} +{"g":"single","s":"Ẇ","d":"Ẇ","l":"ẇ","k":3} +{"g":"single","s":"Ẉ","d":"Ẉ","l":"ẉ","k":3} +{"g":"single","s":"ẉ","d":"ẉ","k":1} +{"g":"single","s":"Ẋ","d":"Ẋ","l":"ẋ","k":3} +{"g":"single","s":"Ẍ","d":"Ẍ","l":"ẍ","k":3} +{"g":"single","s":"Ẏ","d":"Ẏ","l":"ẏ","k":3} +{"g":"single","s":"Ẑ","d":"Ẑ","l":"ẑ","k":3} +{"g":"single","s":"ẑ","d":"ẑ","k":1} +{"g":"single","s":"Ẓ","d":"Ẓ","l":"ẓ","k":3} +{"g":"single","s":"Ẕ","d":"Ẕ","l":"ẕ","k":3} +{"g":"single","s":"ẙ","d":"ẙ","k":1} +{"g":"single","s":"ẞ","l":"ß","k":3} +{"g":"single","s":"Ạ","d":"Ạ","l":"ạ","k":3} +{"g":"single","s":"Ả","d":"Ả","l":"ả","k":3} +{"g":"single","s":"Ấ","d":"Ấ","l":"ấ","k":3} +{"g":"single","s":"Ầ","d":"Ầ","l":"ầ","k":3} +{"g":"single","s":"Ẩ","d":"Ẩ","l":"ẩ","k":3} +{"g":"single","s":"Ẫ","d":"Ẫ","l":"ẫ","k":3} +{"g":"single","s":"Ậ","d":"Ậ","l":"ậ","k":3} +{"g":"single","s":"Ắ","d":"Ắ","l":"ắ","k":3} +{"g":"single","s":"Ằ","d":"Ằ","l":"ằ","k":3} +{"g":"single","s":"Ẳ","d":"Ẳ","l":"ẳ","k":3} +{"g":"single","s":"Ẵ","d":"Ẵ","l":"ẵ","k":3} +{"g":"single","s":"Ặ","d":"Ặ","l":"ặ","k":3} +{"g":"single","s":"Ẹ","d":"Ẹ","l":"ẹ","k":3} +{"g":"single","s":"Ẻ","d":"Ẻ","l":"ẻ","k":3} +{"g":"single","s":"Ẽ","d":"Ẽ","l":"ẽ","k":3} +{"g":"single","s":"Ế","d":"Ế","l":"ế","k":3} +{"g":"single","s":"Ề","d":"Ề","l":"ề","k":3} +{"g":"single","s":"Ể","d":"Ể","l":"ể","k":3} +{"g":"single","s":"Ễ","d":"Ễ","l":"ễ","k":3} +{"g":"single","s":"Ệ","d":"Ệ","l":"ệ","k":3} +{"g":"single","s":"Ỉ","d":"Ỉ","l":"ỉ","k":3} +{"g":"single","s":"Ị","d":"Ị","l":"ị","k":3} +{"g":"single","s":"Ọ","d":"Ọ","l":"ọ","k":3} +{"g":"single","s":"Ỏ","d":"Ỏ","l":"ỏ","k":3} +{"g":"single","s":"Ố","d":"Ố","l":"ố","k":3} +{"g":"single","s":"Ồ","d":"Ồ","l":"ồ","k":3} +{"g":"single","s":"Ổ","d":"Ổ","l":"ổ","k":3} +{"g":"single","s":"Ỗ","d":"Ỗ","l":"ỗ","k":3} +{"g":"single","s":"Ộ","d":"Ộ","l":"ộ","k":3} +{"g":"single","s":"Ớ","d":"Ớ","l":"ớ","k":3} +{"g":"single","s":"Ờ","d":"Ờ","l":"ờ","k":3} +{"g":"single","s":"Ở","d":"Ở","l":"ở","k":3} +{"g":"single","s":"Ỡ","d":"Ỡ","l":"ỡ","k":3} +{"g":"single","s":"Ợ","d":"Ợ","l":"ợ","k":3} +{"g":"single","s":"Ụ","d":"Ụ","l":"ụ","k":3} +{"g":"single","s":"Ủ","d":"Ủ","l":"ủ","k":3} +{"g":"single","s":"Ứ","d":"Ứ","l":"ứ","k":3} +{"g":"single","s":"Ừ","d":"Ừ","l":"ừ","k":3} +{"g":"single","s":"Ử","d":"Ử","l":"ử","k":3} +{"g":"single","s":"Ữ","d":"Ữ","l":"ữ","k":3} +{"g":"single","s":"Ự","d":"Ự","l":"ự","k":3} +{"g":"single","s":"Ỳ","d":"Ỳ","l":"ỳ","k":3} +{"g":"single","s":"Ỵ","d":"Ỵ","l":"ỵ","k":3} +{"g":"single","s":"Ỷ","d":"Ỷ","l":"ỷ","k":3} +{"g":"single","s":"Ỹ","d":"Ỹ","l":"ỹ","k":3} +{"g":"single","s":"Ỻ","l":"ỻ","k":3} +{"g":"single","s":"Ỽ","l":"ỽ","k":3} +{"g":"single","s":"Ỿ","l":"ỿ","k":3} +{"g":"single","s":"ἄ","d":"ἄ","k":1} +{"g":"single","s":"Ἀ","d":"Ἀ","l":"ἀ","k":3} +{"g":"single","s":"Ἄ","d":"Ἄ","l":"ἄ","k":3} +{"g":"single","s":"Ἇ","d":"Ἇ","l":"ἇ","k":3} +{"g":"single","s":"ἔ","d":"ἔ","k":1} +{"g":"single","s":"ἕ","d":"ἕ","k":1} +{"g":"single","s":"Ἐ","d":"Ἐ","l":"ἐ","k":3} +{"g":"single","s":"Ἕ","d":"Ἕ","l":"ἕ","k":3} +{"g":"single","s":"ἠ","d":"ἠ","k":1} +{"g":"single","s":"Ἠ","d":"Ἠ","l":"ἠ","k":3} +{"g":"single","s":"Ἧ","d":"Ἧ","l":"ἧ","k":3} +{"g":"single","s":"ἰ","d":"ἰ","k":1} +{"g":"single","s":"Ἰ","d":"Ἰ","l":"ἰ","k":3} +{"g":"single","s":"Ἷ","d":"Ἷ","l":"ἷ","k":3} +{"g":"single","s":"ὀ","d":"ὀ","k":1} +{"g":"single","s":"ὅ","d":"ὅ","k":1} +{"g":"single","s":"Ὀ","d":"Ὀ","l":"ὀ","k":3} +{"g":"single","s":"Ὂ","d":"Ὂ","l":"ὂ","k":3} +{"g":"single","s":"Ὅ","d":"Ὅ","l":"ὅ","k":3} +{"g":"single","s":"ὐ","d":"ὐ","k":1} +{"g":"single","s":"ὔ","d":"ὔ","k":1} +{"g":"single","s":"ὗ","d":"ὗ","k":1} +{"g":"single","s":"Ὑ","d":"Ὑ","l":"ὑ","k":3} +{"g":"single","s":"Ὓ","d":"Ὓ","l":"ὓ","k":3} +{"g":"single","s":"Ὕ","d":"Ὕ","l":"ὕ","k":3} +{"g":"single","s":"Ὗ","d":"Ὗ","l":"ὗ","k":3} +{"g":"single","s":"ὠ","d":"ὠ","k":1} +{"g":"single","s":"Ὠ","d":"Ὠ","l":"ὠ","k":3} +{"g":"single","s":"Ὧ","d":"Ὧ","l":"ὧ","k":3} +{"g":"single","s":"ὰ","d":"ὰ","k":1} +{"g":"single","s":"ά","c":"ά","d":"ά","k":1} +{"g":"single","s":"έ","c":"έ","d":"έ","k":1} +{"g":"single","s":"ή","c":"ή","d":"ή","k":1} +{"g":"single","s":"ί","c":"ί","d":"ί","k":1} +{"g":"single","s":"ὸ","d":"ὸ","k":1} +{"g":"single","s":"ό","c":"ό","d":"ό","k":1} +{"g":"single","s":"ύ","c":"ύ","d":"ύ","k":1} +{"g":"single","s":"ώ","c":"ώ","d":"ώ","k":1} +{"g":"single","s":"ᾀ","d":"ᾀ","k":1} +{"g":"single","s":"ᾂ","d":"ᾂ","k":1} +{"g":"single","s":"ᾈ","d":"ᾈ","l":"ᾀ","k":1} +{"g":"single","s":"ᾊ","d":"ᾊ","l":"ᾂ","k":1} +{"g":"single","s":"ᾒ","d":"ᾒ","k":1} +{"g":"single","s":"ᾚ","d":"ᾚ","l":"ᾒ","k":1} +{"g":"single","s":"ᾢ","d":"ᾢ","k":1} +{"g":"single","s":"ᾪ","d":"ᾪ","l":"ᾢ","k":1} +{"g":"single","s":"ᾲ","d":"ᾲ","k":1} +{"g":"single","s":"ᾴ","d":"ᾴ","k":1} +{"g":"single","s":"ᾶ","d":"ᾶ","k":1} +{"g":"single","s":"Ᾰ","d":"Ᾰ","l":"ᾰ","k":3} +{"g":"single","s":"Ὰ","d":"Ὰ","l":"ὰ","k":3} +{"g":"single","s":"Ά","c":"Ά","d":"Ά","l":"ά","k":3} +{"g":"single","s":"ᾼ","d":"ᾼ","l":"ᾳ","k":1} +{"g":"single","s":"᾽","k":0} +{"g":"single","s":"ι","c":"ι","d":"ι","k":1} +{"g":"single","s":"᾿","k":0} +{"g":"single","s":"῁","d":"῁","k":0} +{"g":"single","s":"ῂ","d":"ῂ","k":1} +{"g":"single","s":"ῄ","d":"ῄ","k":1} +{"g":"single","s":"ῆ","d":"ῆ","k":1} +{"g":"single","s":"ῇ","d":"ῇ","k":1} +{"g":"single","s":"Ὲ","d":"Ὲ","l":"ὲ","k":3} +{"g":"single","s":"Έ","c":"Έ","d":"Έ","l":"έ","k":3} +{"g":"single","s":"Ή","c":"Ή","d":"Ή","l":"ή","k":3} +{"g":"single","s":"ῌ","d":"ῌ","l":"ῃ","k":1} +{"g":"single","s":"῍","d":"῍","k":0} +{"g":"single","s":"῏","d":"῏","k":0} +{"g":"single","s":"ῐ","d":"ῐ","k":1} +{"g":"single","s":"ΐ","c":"ΐ","d":"ΐ","k":1} +{"g":"single","s":"ῖ","d":"ῖ","k":1} +{"g":"single","s":"Ῐ","d":"Ῐ","l":"ῐ","k":3} +{"g":"single","s":"Ῑ","d":"Ῑ","l":"ῑ","k":3} +{"g":"single","s":"Ί","c":"Ί","d":"Ί","l":"ί","k":3} +{"g":"single","s":"῝","d":"῝","k":0} +{"g":"single","s":"῟","d":"῟","k":0} +{"g":"single","s":"ῠ","d":"ῠ","k":1} +{"g":"single","s":"ῢ","d":"ῢ","k":1} +{"g":"single","s":"ΰ","c":"ΰ","d":"ΰ","k":1} +{"g":"single","s":"Ῠ","d":"Ῠ","l":"ῠ","k":3} +{"g":"single","s":"Ὺ","d":"Ὺ","l":"ὺ","k":3} +{"g":"single","s":"Ύ","c":"Ύ","d":"Ύ","l":"ύ","k":3} +{"g":"single","s":"Ῥ","d":"Ῥ","l":"ῥ","k":3} +{"g":"single","s":"῭","d":"῭","k":0} +{"g":"single","s":"΅","c":"΅","d":"΅","k":0} +{"g":"single","s":"`","c":"`","d":"`","k":0} +{"g":"single","s":"ῲ","d":"ῲ","k":1} +{"g":"single","s":"ῴ","d":"ῴ","k":1} +{"g":"single","s":"ῶ","d":"ῶ","k":1} +{"g":"single","s":"Ὸ","d":"Ὸ","l":"ὸ","k":3} +{"g":"single","s":"Ό","c":"Ό","d":"Ό","l":"ό","k":3} +{"g":"single","s":"Ώ","c":"Ώ","d":"Ώ","l":"ώ","k":3} +{"g":"single","s":"ῼ","d":"ῼ","l":"ῳ","k":1} +{"g":"single","s":"´","c":"´","d":"´","k":0} +{"g":"single","s":"῾","k":0} +{"g":"single","s":" ","c":" ","d":" ","k":0} +{"g":"single","s":" ","c":" ","d":" ","k":0} +{"g":"single","s":"​","k":0} +{"g":"single","s":"‏","k":0} +{"g":"single","s":"‘","k":0} +{"g":"single","s":"’","k":0} +{"g":"single","s":"․","k":0} +{"g":"single","s":"‧","k":0} +{"g":"single","s":"‪","k":0} +{"g":"single","s":"‮","k":0} +{"g":"single","s":"⁠","k":0} +{"g":"single","s":"⁤","k":0} +{"g":"single","s":"⁦","k":0} +{"g":"single","s":"","k":0} +{"g":"single","s":"ⁱ","k":1} +{"g":"single","s":"ⁿ","k":1} +{"g":"single","s":"ₐ","k":1} +{"g":"single","s":"ₜ","k":1} +{"g":"single","s":"⃐","k":0} +{"g":"single","s":"⃑","k":0} +{"g":"single","s":"⃙","k":0} +{"g":"single","s":"⃨","k":0} +{"g":"single","s":"⃰","k":0} +{"g":"single","s":"ℂ","k":3} +{"g":"single","s":"ℇ","k":3} +{"g":"single","s":"ℊ","k":1} +{"g":"single","s":"ℋ","k":3} +{"g":"single","s":"ℍ","k":3} +{"g":"single","s":"ℐ","k":3} +{"g":"single","s":"ℒ","k":3} +{"g":"single","s":"ℓ","k":1} +{"g":"single","s":"ℕ","k":3} +{"g":"single","s":"ℙ","k":3} +{"g":"single","s":"ℝ","k":3} +{"g":"single","s":"ℤ","k":3} +{"g":"single","s":"Ω","c":"Ω","d":"Ω","l":"ω","k":3} +{"g":"single","s":"ℨ","k":3} +{"g":"single","s":"K","c":"K","d":"K","l":"k","k":3} +{"g":"single","s":"Å","c":"Å","d":"Å","l":"å","k":3} +{"g":"single","s":"ℭ","k":3} +{"g":"single","s":"ℯ","k":1} +{"g":"single","s":"ℰ","k":3} +{"g":"single","s":"ℳ","k":3} +{"g":"single","s":"ℴ","k":1} +{"g":"single","s":"ℹ","k":1} +{"g":"single","s":"ℼ","k":1} +{"g":"single","s":"ℾ","k":3} +{"g":"single","s":"ℿ","k":3} +{"g":"single","s":"ⅅ","k":3} +{"g":"single","s":"ⅉ","k":1} +{"g":"single","s":"ⅎ","k":1} +{"g":"single","s":"Ⅰ","l":"ⅰ","k":0} +{"g":"single","s":"ⅿ","k":0} +{"g":"single","s":"Ↄ","l":"ↄ","k":3} +{"g":"single","s":"ↄ","k":1} +{"g":"single","s":"↮","d":"↮","k":0} +{"g":"single","s":"∦","d":"∦","k":0} +{"g":"single","s":"≮","d":"≮","k":0} +{"g":"single","s":"⊀","d":"⊀","k":0} +{"g":"single","s":"⊮","d":"⊮","k":0} +{"g":"single","s":"⋬","d":"⋬","k":0} +{"g":"single","s":"〈","c":"〈","d":"〈","k":0} +{"g":"single","s":"〉","c":"〉","d":"〉","k":0} +{"g":"single","s":"Ⓐ","l":"ⓐ","k":0} +{"g":"single","s":"ⓩ","k":0} +{"g":"single","s":"✎","k":0} +{"g":"single","s":"⫝̸","c":"⫝̸","d":"⫝̸","k":0} +{"g":"single","s":"Ⰰ","l":"ⰰ","k":3} +{"g":"single","s":"Ⱟ","l":"ⱟ","k":3} +{"g":"single","s":"Ⱡ","l":"ⱡ","k":3} +{"g":"single","s":"Ɫ","l":"ɫ","k":3} +{"g":"single","s":"Ɽ","l":"ɽ","k":3} +{"g":"single","s":"Ⱨ","l":"ⱨ","k":3} +{"g":"single","s":"Ⱪ","l":"ⱪ","k":3} +{"g":"single","s":"Ⱬ","l":"ⱬ","k":3} +{"g":"single","s":"Ɑ","l":"ɑ","k":3} +{"g":"single","s":"Ɒ","l":"ɒ","k":3} +{"g":"single","s":"Ⱳ","l":"ⱳ","k":3} +{"g":"single","s":"Ⱶ","l":"ⱶ","k":3} +{"g":"single","s":"ⱼ","k":1} +{"g":"single","s":"ⱽ","k":1} +{"g":"single","s":"Ȿ","l":"ȿ","k":3} +{"g":"single","s":"Ⲁ","l":"ⲁ","k":3} +{"g":"single","s":"Ⲃ","l":"ⲃ","k":3} +{"g":"single","s":"Ⲅ","l":"ⲅ","k":3} +{"g":"single","s":"Ⲇ","l":"ⲇ","k":3} +{"g":"single","s":"Ⲉ","l":"ⲉ","k":3} +{"g":"single","s":"Ⲋ","l":"ⲋ","k":3} +{"g":"single","s":"Ⲍ","l":"ⲍ","k":3} +{"g":"single","s":"Ⲏ","l":"ⲏ","k":3} +{"g":"single","s":"Ⲑ","l":"ⲑ","k":3} +{"g":"single","s":"Ⲓ","l":"ⲓ","k":3} +{"g":"single","s":"Ⲕ","l":"ⲕ","k":3} +{"g":"single","s":"Ⲗ","l":"ⲗ","k":3} +{"g":"single","s":"Ⲙ","l":"ⲙ","k":3} +{"g":"single","s":"Ⲛ","l":"ⲛ","k":3} +{"g":"single","s":"Ⲝ","l":"ⲝ","k":3} +{"g":"single","s":"Ⲟ","l":"ⲟ","k":3} +{"g":"single","s":"Ⲡ","l":"ⲡ","k":3} +{"g":"single","s":"Ⲣ","l":"ⲣ","k":3} +{"g":"single","s":"Ⲥ","l":"ⲥ","k":3} +{"g":"single","s":"Ⲧ","l":"ⲧ","k":3} +{"g":"single","s":"Ⲩ","l":"ⲩ","k":3} +{"g":"single","s":"Ⲫ","l":"ⲫ","k":3} +{"g":"single","s":"Ⲭ","l":"ⲭ","k":3} +{"g":"single","s":"Ⲯ","l":"ⲯ","k":3} +{"g":"single","s":"Ⲱ","l":"ⲱ","k":3} +{"g":"single","s":"Ⲳ","l":"ⲳ","k":3} +{"g":"single","s":"Ⲵ","l":"ⲵ","k":3} +{"g":"single","s":"Ⲷ","l":"ⲷ","k":3} +{"g":"single","s":"Ⲹ","l":"ⲹ","k":3} +{"g":"single","s":"Ⲻ","l":"ⲻ","k":3} +{"g":"single","s":"Ⲽ","l":"ⲽ","k":3} +{"g":"single","s":"Ⲿ","l":"ⲿ","k":3} +{"g":"single","s":"Ⳁ","l":"ⳁ","k":3} +{"g":"single","s":"Ⳃ","l":"ⳃ","k":3} +{"g":"single","s":"Ⳅ","l":"ⳅ","k":3} +{"g":"single","s":"Ⳇ","l":"ⳇ","k":3} +{"g":"single","s":"Ⳉ","l":"ⳉ","k":3} +{"g":"single","s":"Ⳋ","l":"ⳋ","k":3} +{"g":"single","s":"Ⳍ","l":"ⳍ","k":3} +{"g":"single","s":"Ⳏ","l":"ⳏ","k":3} +{"g":"single","s":"Ⳑ","l":"ⳑ","k":3} +{"g":"single","s":"Ⳓ","l":"ⳓ","k":3} +{"g":"single","s":"Ⳕ","l":"ⳕ","k":3} +{"g":"single","s":"Ⳗ","l":"ⳗ","k":3} +{"g":"single","s":"Ⳙ","l":"ⳙ","k":3} +{"g":"single","s":"Ⳛ","l":"ⳛ","k":3} +{"g":"single","s":"Ⳝ","l":"ⳝ","k":3} +{"g":"single","s":"Ⳟ","l":"ⳟ","k":3} +{"g":"single","s":"Ⳡ","l":"ⳡ","k":3} +{"g":"single","s":"Ⳣ","l":"ⳣ","k":3} +{"g":"single","s":"ⳤ","k":1} +{"g":"single","s":"Ⳬ","l":"ⳬ","k":3} +{"g":"single","s":"Ⳮ","l":"ⳮ","k":3} +{"g":"single","s":"ⳮ","k":1} +{"g":"single","s":"⳯","k":0} +{"g":"single","s":"⳱","k":0} +{"g":"single","s":"Ⳳ","l":"ⳳ","k":3} +{"g":"single","s":"ⳳ","k":1} +{"g":"single","s":"ⴀ","k":1} +{"g":"single","s":"ⴥ","k":1} +{"g":"single","s":"ⴧ","k":1} +{"g":"single","s":"ⴭ","k":1} +{"g":"single","s":"ⴰ","k":1} +{"g":"single","s":"ⵧ","k":1} +{"g":"single","s":"ⵯ","k":1} +{"g":"single","s":"⵿","k":0} +{"g":"single","s":"ⶀ","k":1} +{"g":"single","s":"ⶖ","k":1} +{"g":"single","s":"ⶠ","k":1} +{"g":"single","s":"ⶦ","k":1} +{"g":"single","s":"ⶨ","k":1} +{"g":"single","s":"ⶮ","k":1} +{"g":"single","s":"ⶰ","k":1} +{"g":"single","s":"ⶶ","k":1} +{"g":"single","s":"ⶸ","k":1} +{"g":"single","s":"ⶾ","k":1} +{"g":"single","s":"ⷀ","k":1} +{"g":"single","s":"ⷆ","k":1} +{"g":"single","s":"ⷈ","k":1} +{"g":"single","s":"ⷎ","k":1} +{"g":"single","s":"ⷐ","k":1} +{"g":"single","s":"ⷖ","k":1} +{"g":"single","s":"ⷘ","k":1} +{"g":"single","s":"ⷞ","k":1} +{"g":"single","s":"ⷠ","k":0} +{"g":"single","s":"ⷣ","k":0} +{"g":"single","s":"ⷫ","k":0} +{"g":"single","s":"ⷳ","k":0} +{"g":"single","s":"ⷻ","k":0} +{"g":"single","s":"ⷿ","k":0} +{"g":"single","s":"ⸯ","k":1} +{"g":"single","s":"々","k":1} +{"g":"single","s":"〆","k":1} +{"g":"single","s":"〪","k":0} +{"g":"single","s":"〭","k":0} +{"g":"single","s":"〱","k":1} +{"g":"single","s":"〵","k":1} +{"g":"single","s":"〻","k":1} +{"g":"single","s":"〼","k":1} +{"g":"single","s":"ぁ","k":1} +{"g":"single","s":"げ","d":"げ","k":1} +{"g":"single","s":"ぢ","d":"ぢ","k":1} +{"g":"single","s":"ぶ","d":"ぶ","k":1} +{"g":"single","s":"ゖ","k":1} +{"g":"single","s":"゙","k":0} +{"g":"single","s":"゚","k":0} +{"g":"single","s":"ゝ","k":1} +{"g":"single","s":"ゞ","d":"ゞ","k":1} +{"g":"single","s":"ゟ","k":1} +{"g":"single","s":"ァ","k":1} +{"g":"single","s":"ガ","d":"ガ","k":1} +{"g":"single","s":"ゼ","d":"ゼ","k":1} +{"g":"single","s":"パ","d":"パ","k":1} +{"g":"single","s":"ポ","d":"ポ","k":1} +{"g":"single","s":"ヺ","d":"ヺ","k":1} +{"g":"single","s":"ー","k":1} +{"g":"single","s":"ヾ","d":"ヾ","k":1} +{"g":"single","s":"ヿ","k":1} +{"g":"single","s":"ㄅ","k":1} +{"g":"single","s":"ㄯ","k":1} +{"g":"single","s":"ㄱ","k":1} +{"g":"single","s":"ㆎ","k":1} +{"g":"single","s":"ㆠ","k":1} +{"g":"single","s":"ㆿ","k":1} +{"g":"single","s":"ㇰ","k":1} +{"g":"single","s":"ㇿ","k":1} +{"g":"single","s":"㐀","k":1} +{"g":"single","s":"㪕","k":1} +{"g":"single","s":"䶿","k":1} +{"g":"single","s":"一","k":1} +{"g":"single","s":"东","k":1} +{"g":"single","s":"憣","k":1} +{"g":"single","s":"甪","k":1} +{"g":"single","s":"袱","k":1} +{"g":"single","s":"鰸","k":1} +{"g":"single","s":"ꀕ","k":1} +{"g":"single","s":"ꒌ","k":1} +{"g":"single","s":"ꓐ","k":1} +{"g":"single","s":"ꓸ","k":1} +{"g":"single","s":"ꓽ","k":1} +{"g":"single","s":"ꔀ","k":1} +{"g":"single","s":"ꘌ","k":1} +{"g":"single","s":"ꘐ","k":1} +{"g":"single","s":"ꘟ","k":1} +{"g":"single","s":"ꘪ","k":1} +{"g":"single","s":"ꘫ","k":1} +{"g":"single","s":"Ꙁ","l":"ꙁ","k":3} +{"g":"single","s":"Ꙃ","l":"ꙃ","k":3} +{"g":"single","s":"Ꙅ","l":"ꙅ","k":3} +{"g":"single","s":"Ꙇ","l":"ꙇ","k":3} +{"g":"single","s":"Ꙉ","l":"ꙉ","k":3} +{"g":"single","s":"Ꙋ","l":"ꙋ","k":3} +{"g":"single","s":"Ꙍ","l":"ꙍ","k":3} +{"g":"single","s":"Ꙏ","l":"ꙏ","k":3} +{"g":"single","s":"Ꙑ","l":"ꙑ","k":3} +{"g":"single","s":"Ꙓ","l":"ꙓ","k":3} +{"g":"single","s":"Ꙕ","l":"ꙕ","k":3} +{"g":"single","s":"Ꙗ","l":"ꙗ","k":3} +{"g":"single","s":"Ꙙ","l":"ꙙ","k":3} +{"g":"single","s":"Ꙛ","l":"ꙛ","k":3} +{"g":"single","s":"Ꙝ","l":"ꙝ","k":3} +{"g":"single","s":"Ꙟ","l":"ꙟ","k":3} +{"g":"single","s":"Ꙡ","l":"ꙡ","k":3} +{"g":"single","s":"Ꙣ","l":"ꙣ","k":3} +{"g":"single","s":"Ꙥ","l":"ꙥ","k":3} +{"g":"single","s":"Ꙧ","l":"ꙧ","k":3} +{"g":"single","s":"Ꙩ","l":"ꙩ","k":3} +{"g":"single","s":"Ꙫ","l":"ꙫ","k":3} +{"g":"single","s":"Ꙭ","l":"ꙭ","k":3} +{"g":"single","s":"ꙭ","k":1} +{"g":"single","s":"ꙮ","k":1} +{"g":"single","s":"꙯","k":0} +{"g":"single","s":"꙲","k":0} +{"g":"single","s":"ꙴ","k":0} +{"g":"single","s":"ꙶ","k":0} +{"g":"single","s":"꙽","k":0} +{"g":"single","s":"ꙿ","k":1} +{"g":"single","s":"Ꚁ","l":"ꚁ","k":3} +{"g":"single","s":"Ꚃ","l":"ꚃ","k":3} +{"g":"single","s":"Ꚅ","l":"ꚅ","k":3} +{"g":"single","s":"Ꚇ","l":"ꚇ","k":3} +{"g":"single","s":"Ꚉ","l":"ꚉ","k":3} +{"g":"single","s":"Ꚋ","l":"ꚋ","k":3} +{"g":"single","s":"Ꚍ","l":"ꚍ","k":3} +{"g":"single","s":"Ꚏ","l":"ꚏ","k":3} +{"g":"single","s":"Ꚑ","l":"ꚑ","k":3} +{"g":"single","s":"Ꚓ","l":"ꚓ","k":3} +{"g":"single","s":"Ꚕ","l":"ꚕ","k":3} +{"g":"single","s":"Ꚗ","l":"ꚗ","k":3} +{"g":"single","s":"Ꚙ","l":"ꚙ","k":3} +{"g":"single","s":"Ꚛ","l":"ꚛ","k":3} +{"g":"single","s":"ꚜ","k":1} +{"g":"single","s":"ꚝ","k":1} +{"g":"single","s":"ꚞ","k":0} +{"g":"single","s":"ꚟ","k":0} +{"g":"single","s":"ꚠ","k":1} +{"g":"single","s":"ꛥ","k":1} +{"g":"single","s":"꛰","k":0} +{"g":"single","s":"꛱","k":0} +{"g":"single","s":"꜀","k":0} +{"g":"single","s":"ꜗ","k":1} +{"g":"single","s":"ꜟ","k":1} +{"g":"single","s":"꜡","k":0} +{"g":"single","s":"Ꜣ","l":"ꜣ","k":3} +{"g":"single","s":"Ꜥ","l":"ꜥ","k":3} +{"g":"single","s":"Ꜧ","l":"ꜧ","k":3} +{"g":"single","s":"Ꜩ","l":"ꜩ","k":3} +{"g":"single","s":"Ꜫ","l":"ꜫ","k":3} +{"g":"single","s":"Ꜭ","l":"ꜭ","k":3} +{"g":"single","s":"Ꜯ","l":"ꜯ","k":3} +{"g":"single","s":"Ꜳ","l":"ꜳ","k":3} +{"g":"single","s":"Ꜵ","l":"ꜵ","k":3} +{"g":"single","s":"Ꜷ","l":"ꜷ","k":3} +{"g":"single","s":"Ꜹ","l":"ꜹ","k":3} +{"g":"single","s":"Ꜻ","l":"ꜻ","k":3} +{"g":"single","s":"Ꜽ","l":"ꜽ","k":3} +{"g":"single","s":"Ꜿ","l":"ꜿ","k":3} +{"g":"single","s":"Ꝁ","l":"ꝁ","k":3} +{"g":"single","s":"Ꝃ","l":"ꝃ","k":3} +{"g":"single","s":"Ꝅ","l":"ꝅ","k":3} +{"g":"single","s":"Ꝇ","l":"ꝇ","k":3} +{"g":"single","s":"Ꝉ","l":"ꝉ","k":3} +{"g":"single","s":"Ꝋ","l":"ꝋ","k":3} +{"g":"single","s":"Ꝍ","l":"ꝍ","k":3} +{"g":"single","s":"Ꝏ","l":"ꝏ","k":3} +{"g":"single","s":"Ꝑ","l":"ꝑ","k":3} +{"g":"single","s":"Ꝓ","l":"ꝓ","k":3} +{"g":"single","s":"Ꝕ","l":"ꝕ","k":3} +{"g":"single","s":"Ꝗ","l":"ꝗ","k":3} +{"g":"single","s":"Ꝙ","l":"ꝙ","k":3} +{"g":"single","s":"Ꝛ","l":"ꝛ","k":3} +{"g":"single","s":"Ꝝ","l":"ꝝ","k":3} +{"g":"single","s":"Ꝟ","l":"ꝟ","k":3} +{"g":"single","s":"Ꝡ","l":"ꝡ","k":3} +{"g":"single","s":"Ꝣ","l":"ꝣ","k":3} +{"g":"single","s":"Ꝥ","l":"ꝥ","k":3} +{"g":"single","s":"Ꝧ","l":"ꝧ","k":3} +{"g":"single","s":"Ꝩ","l":"ꝩ","k":3} +{"g":"single","s":"Ꝫ","l":"ꝫ","k":3} +{"g":"single","s":"Ꝭ","l":"ꝭ","k":3} +{"g":"single","s":"Ꝯ","l":"ꝯ","k":3} +{"g":"single","s":"ꝰ","k":1} +{"g":"single","s":"Ꝺ","l":"ꝺ","k":3} +{"g":"single","s":"Ꝼ","l":"ꝼ","k":3} +{"g":"single","s":"Ᵹ","l":"ᵹ","k":3} +{"g":"single","s":"Ꝿ","l":"ꝿ","k":3} +{"g":"single","s":"Ꞁ","l":"ꞁ","k":3} +{"g":"single","s":"Ꞃ","l":"ꞃ","k":3} +{"g":"single","s":"Ꞅ","l":"ꞅ","k":3} +{"g":"single","s":"Ꞇ","l":"ꞇ","k":3} +{"g":"single","s":"ꞇ","k":1} +{"g":"single","s":"ꞈ","k":1} +{"g":"single","s":"꞊","k":0} +{"g":"single","s":"Ꞌ","l":"ꞌ","k":3} +{"g":"single","s":"Ɥ","l":"ɥ","k":3} +{"g":"single","s":"ꞎ","k":1} +{"g":"single","s":"Ꞑ","l":"ꞑ","k":3} +{"g":"single","s":"Ꞓ","l":"ꞓ","k":3} +{"g":"single","s":"Ꞗ","l":"ꞗ","k":3} +{"g":"single","s":"Ꞙ","l":"ꞙ","k":3} +{"g":"single","s":"Ꞛ","l":"ꞛ","k":3} +{"g":"single","s":"Ꞝ","l":"ꞝ","k":3} +{"g":"single","s":"Ꞟ","l":"ꞟ","k":3} +{"g":"single","s":"Ꞡ","l":"ꞡ","k":3} +{"g":"single","s":"Ꞣ","l":"ꞣ","k":3} +{"g":"single","s":"Ꞥ","l":"ꞥ","k":3} +{"g":"single","s":"Ꞧ","l":"ꞧ","k":3} +{"g":"single","s":"Ꞩ","l":"ꞩ","k":3} +{"g":"single","s":"Ɦ","l":"ɦ","k":3} +{"g":"single","s":"Ɡ","l":"ɡ","k":3} +{"g":"single","s":"Ɪ","l":"ɪ","k":3} +{"g":"single","s":"Ʞ","l":"ʞ","k":3} +{"g":"single","s":"Ʇ","l":"ʇ","k":3} +{"g":"single","s":"Ꞵ","l":"ꞵ","k":3} +{"g":"single","s":"Ꞷ","l":"ꞷ","k":3} +{"g":"single","s":"Ꞹ","l":"ꞹ","k":3} +{"g":"single","s":"Ꞻ","l":"ꞻ","k":3} +{"g":"single","s":"Ꞽ","l":"ꞽ","k":3} +{"g":"single","s":"Ꞿ","l":"ꞿ","k":3} +{"g":"single","s":"Ꟁ","l":"ꟁ","k":3} +{"g":"single","s":"Ꟃ","l":"ꟃ","k":3} +{"g":"single","s":"Ꞔ","l":"ꞔ","k":3} +{"g":"single","s":"Ꟈ","l":"ꟈ","k":3} +{"g":"single","s":"Ꟊ","l":"ꟊ","k":3} +{"g":"single","s":"Ɤ","l":"ɤ","k":3} +{"g":"single","s":"Ꟍ","l":"ꟍ","k":3} +{"g":"single","s":"꟎","l":"꟏","k":3} +{"g":"single","s":"Ꟑ","l":"ꟑ","k":3} +{"g":"single","s":"꟒","l":"ꟓ","k":3} +{"g":"single","s":"꟔","l":"ꟕ","k":3} +{"g":"single","s":"Ꟗ","l":"ꟗ","k":3} +{"g":"single","s":"Ꟙ","l":"ꟙ","k":3} +{"g":"single","s":"Ꟛ","l":"ꟛ","k":3} +{"g":"single","s":"Ƛ","l":"ƛ","k":3} +{"g":"single","s":"꟱","k":1} +{"g":"single","s":"ꟴ","k":1} +{"g":"single","s":"Ꟶ","l":"ꟶ","k":3} +{"g":"single","s":"ꟶ","k":1} +{"g":"single","s":"ꟸ","k":1} +{"g":"single","s":"ꟹ","k":1} +{"g":"single","s":"ꟺ","k":1} +{"g":"single","s":"ꠁ","k":1} +{"g":"single","s":"ꠂ","k":0} +{"g":"single","s":"ꠃ","k":1} +{"g":"single","s":"ꠅ","k":1} +{"g":"single","s":"꠆","k":0} +{"g":"single","s":"ꠇ","k":1} +{"g":"single","s":"ꠊ","k":1} +{"g":"single","s":"ꠋ","k":0} +{"g":"single","s":"ꠌ","k":1} +{"g":"single","s":"ꠢ","k":1} +{"g":"single","s":"ꠥ","k":0} +{"g":"single","s":"ꠦ","k":0} +{"g":"single","s":"꠬","k":0} +{"g":"single","s":"ꡀ","k":1} +{"g":"single","s":"ꡳ","k":1} +{"g":"single","s":"ꢂ","k":1} +{"g":"single","s":"ꢳ","k":1} +{"g":"single","s":"꣄","k":0} +{"g":"single","s":"ꣅ","k":0} +{"g":"single","s":"꣠","k":0} +{"g":"single","s":"꣡","k":0} +{"g":"single","s":"꣩","k":0} +{"g":"single","s":"꣱","k":0} +{"g":"single","s":"ꣲ","k":1} +{"g":"single","s":"ꣷ","k":1} +{"g":"single","s":"ꣻ","k":1} +{"g":"single","s":"ꣽ","k":1} +{"g":"single","s":"ꣾ","k":1} +{"g":"single","s":"ꣿ","k":0} +{"g":"single","s":"ꤊ","k":1} +{"g":"single","s":"ꤥ","k":1} +{"g":"single","s":"ꤦ","k":0} +{"g":"single","s":"꤭","k":0} +{"g":"single","s":"ꤰ","k":1} +{"g":"single","s":"ꥆ","k":1} +{"g":"single","s":"ꥇ","k":0} +{"g":"single","s":"ꥑ","k":0} +{"g":"single","s":"ꥠ","k":1} +{"g":"single","s":"ꥼ","k":1} +{"g":"single","s":"ꦀ","k":0} +{"g":"single","s":"ꦂ","k":0} +{"g":"single","s":"ꦄ","k":1} +{"g":"single","s":"ꦲ","k":1} +{"g":"single","s":"꦳","k":0} +{"g":"single","s":"ꦶ","k":0} +{"g":"single","s":"ꦹ","k":0} +{"g":"single","s":"ꦼ","k":0} +{"g":"single","s":"ꦽ","k":0} +{"g":"single","s":"ꧏ","k":1} +{"g":"single","s":"ꧠ","k":1} +{"g":"single","s":"ꧤ","k":1} +{"g":"single","s":"ꧥ","k":0} +{"g":"single","s":"ꧦ","k":1} +{"g":"single","s":"ꧯ","k":1} +{"g":"single","s":"ꧺ","k":1} +{"g":"single","s":"ꧾ","k":1} +{"g":"single","s":"ꨀ","k":1} +{"g":"single","s":"ꨨ","k":1} +{"g":"single","s":"ꨩ","k":0} +{"g":"single","s":"ꨮ","k":0} +{"g":"single","s":"ꨱ","k":0} +{"g":"single","s":"ꨲ","k":0} +{"g":"single","s":"ꨵ","k":0} +{"g":"single","s":"ꨶ","k":0} +{"g":"single","s":"ꩀ","k":1} +{"g":"single","s":"ꩂ","k":1} +{"g":"single","s":"ꩃ","k":0} +{"g":"single","s":"ꩄ","k":1} +{"g":"single","s":"ꩋ","k":1} +{"g":"single","s":"ꩌ","k":0} +{"g":"single","s":"ꩠ","k":1} +{"g":"single","s":"ꩰ","k":1} +{"g":"single","s":"ꩶ","k":1} +{"g":"single","s":"ꩺ","k":1} +{"g":"single","s":"ꩼ","k":0} +{"g":"single","s":"ꩾ","k":1} +{"g":"single","s":"ꪯ","k":1} +{"g":"single","s":"ꪰ","k":0} +{"g":"single","s":"ꪱ","k":1} +{"g":"single","s":"ꪲ","k":0} +{"g":"single","s":"ꪴ","k":0} +{"g":"single","s":"ꪵ","k":1} +{"g":"single","s":"ꪶ","k":1} +{"g":"single","s":"ꪷ","k":0} +{"g":"single","s":"ꪸ","k":0} +{"g":"single","s":"ꪹ","k":1} +{"g":"single","s":"ꪽ","k":1} +{"g":"single","s":"ꪾ","k":0} +{"g":"single","s":"꪿","k":0} +{"g":"single","s":"ꫀ","k":1} +{"g":"single","s":"꫁","k":0} +{"g":"single","s":"ꫂ","k":1} +{"g":"single","s":"ꫛ","k":1} +{"g":"single","s":"ꫝ","k":1} +{"g":"single","s":"ꫠ","k":1} +{"g":"single","s":"ꫪ","k":1} +{"g":"single","s":"ꫬ","k":0} +{"g":"single","s":"ꫭ","k":0} +{"g":"single","s":"ꫲ","k":1} +{"g":"single","s":"ꫳ","k":1} +{"g":"single","s":"ꫴ","k":1} +{"g":"single","s":"꫶","k":0} +{"g":"single","s":"ꬁ","k":1} +{"g":"single","s":"ꬆ","k":1} +{"g":"single","s":"ꬉ","k":1} +{"g":"single","s":"ꬎ","k":1} +{"g":"single","s":"ꬑ","k":1} +{"g":"single","s":"ꬖ","k":1} +{"g":"single","s":"ꬠ","k":1} +{"g":"single","s":"ꬦ","k":1} +{"g":"single","s":"ꬨ","k":1} +{"g":"single","s":"ꬮ","k":1} +{"g":"single","s":"ꬰ","k":1} +{"g":"single","s":"ꭚ","k":1} +{"g":"single","s":"꭛","k":0} +{"g":"single","s":"ꭜ","k":1} +{"g":"single","s":"ꭟ","k":1} +{"g":"single","s":"ꭩ","k":1} +{"g":"single","s":"꭫","k":0} +{"g":"single","s":"ꭰ","k":1} +{"g":"single","s":"ꮿ","k":1} +{"g":"single","s":"ꯢ","k":1} +{"g":"single","s":"ꯥ","k":0} +{"g":"single","s":"ꯨ","k":0} +{"g":"single","s":"꯭","k":0} +{"g":"single","s":"가","d":"가","k":1} +{"g":"single","s":"꾿","d":"꾿","k":1} +{"g":"single","s":"꿥","d":"꿥","k":1} +{"g":"single","s":"돊","d":"돊","k":1} +{"g":"single","s":"랯","d":"랯","k":1} +{"g":"single","s":"뮔","d":"뮔","k":1} +{"g":"single","s":"뽹","d":"뽹","k":1} +{"g":"single","s":"썆","d":"썆","k":1} +{"g":"single","s":"썞","d":"썞","k":1} +{"g":"single","s":"읃","d":"읃","k":1} +{"g":"single","s":"쬨","d":"쬨","k":1} +{"g":"single","s":"켍","d":"켍","k":1} +{"g":"single","s":"틲","d":"틲","k":1} +{"g":"single","s":"훍","d":"훍","k":1} +{"g":"single","s":"훗","d":"훗","k":1} +{"g":"single","s":"힣","d":"힣","k":1} +{"g":"single","s":"ힰ","k":1} +{"g":"single","s":"ퟆ","k":1} +{"g":"single","s":"ퟋ","k":1} +{"g":"single","s":"ퟻ","k":1} +{"g":"single","s":"","k":0} +{"g":"single","s":"豈","c":"豈","d":"豈","k":1} +{"g":"single","s":"更","c":"更","d":"更","k":1} +{"g":"single","s":"契","c":"契","d":"契","k":1} +{"g":"single","s":"螺","c":"螺","d":"螺","k":1} +{"g":"single","s":"酪","c":"酪","d":"酪","k":1} +{"g":"single","s":"嵐","c":"嵐","d":"嵐","k":1} +{"g":"single","s":"朗","c":"朗","d":"朗","k":1} +{"g":"single","s":"櫓","c":"櫓","d":"櫓","k":1} +{"g":"single","s":"魯","c":"魯","d":"魯","k":1} +{"g":"single","s":"論","c":"論","d":"論","k":1} +{"g":"single","s":"雷","c":"雷","d":"雷","k":1} +{"g":"single","s":"陋","c":"陋","d":"陋","k":1} +{"g":"single","s":"陵","c":"陵","d":"陵","k":1} +{"g":"single","s":"率","c":"率","d":"率","k":1} +{"g":"single","s":"數","c":"數","d":"數","k":1} +{"g":"single","s":"辰","c":"辰","d":"辰","k":1} +{"g":"single","s":"凉","c":"凉","d":"凉","k":1} +{"g":"single","s":"女","c":"女","d":"女","k":1} +{"g":"single","s":"黎","c":"黎","d":"黎","k":1} +{"g":"single","s":"撚","c":"撚","d":"撚","k":1} +{"g":"single","s":"蓮","c":"蓮","d":"蓮","k":1} +{"g":"single","s":"說","c":"說","d":"說","k":1} +{"g":"single","s":"囹","c":"囹","d":"囹","k":1} +{"g":"single","s":"鈴","c":"鈴","d":"鈴","k":1} +{"g":"single","s":"惡","c":"惡","d":"惡","k":1} +{"g":"single","s":"療","c":"療","d":"療","k":1} +{"g":"single","s":"柳","c":"柳","d":"柳","k":1} +{"g":"single","s":"六","c":"六","d":"六","k":1} +{"g":"single","s":"慄","c":"慄","d":"慄","k":1} +{"g":"single","s":"李","c":"李","d":"李","k":1} +{"g":"single","s":"里","c":"里","d":"里","k":1} +{"g":"single","s":"隣","c":"隣","d":"隣","k":1} +{"g":"single","s":"粒","c":"粒","d":"粒","k":1} +{"g":"single","s":"度","c":"度","d":"度","k":1} +{"g":"single","s":"降","c":"降","d":"降","k":1} +{"g":"single","s":"嗀","c":"嗀","d":"嗀","k":1} +{"g":"single","s":"塚","c":"塚","d":"塚","k":1} +{"g":"single","s":"晴","c":"晴","d":"晴","k":1} +{"g":"single","s":"凞","c":"凞","d":"凞","k":1} +{"g":"single","s":"猪","c":"猪","d":"猪","k":1} +{"g":"single","s":"羽","c":"羽","d":"羽","k":1} +{"g":"single","s":"蘒","c":"蘒","d":"蘒","k":1} +{"g":"single","s":"諸","c":"諸","d":"諸","k":1} +{"g":"single","s":"逸","c":"逸","d":"逸","k":1} +{"g":"single","s":"都","c":"都","d":"都","k":1} +{"g":"single","s":"飯","c":"飯","d":"飯","k":1} +{"g":"single","s":"鶴","c":"鶴","d":"鶴","k":1} +{"g":"single","s":"卑","c":"卑","d":"卑","k":1} +{"g":"single","s":"悔","c":"悔","d":"悔","k":1} +{"g":"single","s":"海","c":"海","d":"海","k":1} +{"g":"single","s":"祉","c":"祉","d":"祉","k":1} +{"g":"single","s":"突","c":"突","d":"突","k":1} +{"g":"single","s":"艹","c":"艹","d":"艹","k":1} +{"g":"single","s":"贈","c":"贈","d":"贈","k":1} +{"g":"single","s":"舘","c":"舘","d":"舘","k":1} +{"g":"single","s":"並","c":"並","d":"並","k":1} +{"g":"single","s":"勺","c":"勺","d":"勺","k":1} +{"g":"single","s":"奔","c":"奔","d":"奔","k":1} +{"g":"single","s":"慎","c":"慎","d":"慎","k":1} +{"g":"single","s":"摒","c":"摒","d":"摒","k":1} +{"g":"single","s":"流","c":"流","d":"流","k":1} +{"g":"single","s":"犯","c":"犯","d":"犯","k":1} +{"g":"single","s":"盛","c":"盛","d":"盛","k":1} +{"g":"single","s":"絛","c":"絛","d":"絛","k":1} +{"g":"single","s":"覆","c":"覆","d":"覆","k":1} +{"g":"single","s":"謹","c":"謹","d":"謹","k":1} +{"g":"single","s":"難","c":"難","d":"難","k":1} +{"g":"single","s":"𢡊","c":"𢡊","d":"𢡊","k":1} +{"g":"single","s":"𧻓","c":"𧻓","d":"𧻓","k":1} +{"g":"single","s":"龎","c":"龎","d":"龎","k":1} +{"g":"single","s":"ff","k":1} +{"g":"single","s":"st","k":1} +{"g":"single","s":"ﬓ","k":1} +{"g":"single","s":"ﬗ","k":1} +{"g":"single","s":"יִ","c":"יִ","d":"יִ","k":1} +{"g":"single","s":"ﬞ","k":0} +{"g":"single","s":"ײַ","c":"ײַ","d":"ײַ","k":1} +{"g":"single","s":"ﬨ","k":1} +{"g":"single","s":"שׁ","c":"שׁ","d":"שׁ","k":1} +{"g":"single","s":"שּׂ","c":"שּׂ","d":"שּׂ","k":1} +{"g":"single","s":"וּ","c":"וּ","d":"וּ","k":1} +{"g":"single","s":"זּ","c":"זּ","d":"זּ","k":1} +{"g":"single","s":"טּ","c":"טּ","d":"טּ","k":1} +{"g":"single","s":"לּ","c":"לּ","d":"לּ","k":1} +{"g":"single","s":"מּ","c":"מּ","d":"מּ","k":1} +{"g":"single","s":"נּ","c":"נּ","d":"נּ","k":1} +{"g":"single","s":"סּ","c":"סּ","d":"סּ","k":1} +{"g":"single","s":"ףּ","c":"ףּ","d":"ףּ","k":1} +{"g":"single","s":"פּ","c":"פּ","d":"פּ","k":1} +{"g":"single","s":"צּ","c":"צּ","d":"צּ","k":1} +{"g":"single","s":"תּ","c":"תּ","d":"תּ","k":1} +{"g":"single","s":"פֿ","c":"פֿ","d":"פֿ","k":1} +{"g":"single","s":"ﮱ","k":1} +{"g":"single","s":"﮲","k":0} +{"g":"single","s":"﯂","k":0} +{"g":"single","s":"ﯓ","k":1} +{"g":"single","s":"ﴽ","k":1} +{"g":"single","s":"ﵐ","k":1} +{"g":"single","s":"ﶏ","k":1} +{"g":"single","s":"ﶒ","k":1} +{"g":"single","s":"ﷇ","k":1} +{"g":"single","s":"﷛","k":0} +{"g":"single","s":"ﷰ","k":1} +{"g":"single","s":"ﷻ","k":1} +{"g":"single","s":"︀","k":0} +{"g":"single","s":"️","k":0} +{"g":"single","s":"︓","k":0} +{"g":"single","s":"︠","k":0} +{"g":"single","s":"︥","k":0} +{"g":"single","s":"︭","k":0} +{"g":"single","s":"︯","k":0} +{"g":"single","s":"﹒","k":0} +{"g":"single","s":"﹕","k":0} +{"g":"single","s":"ﹰ","k":1} +{"g":"single","s":"ﹴ","k":1} +{"g":"single","s":"ﹶ","k":1} +{"g":"single","s":"ﻼ","k":1} +{"g":"single","s":"","k":0} +{"g":"single","s":"'","k":0} +{"g":"single","s":".","k":0} +{"g":"single","s":":","k":0} +{"g":"single","s":"A","l":"a","k":3} +{"g":"single","s":"Z","l":"z","k":3} +{"g":"single","s":"^","k":0} +{"g":"single","s":"`","k":0} +{"g":"single","s":"a","k":1} +{"g":"single","s":"z","k":1} +{"g":"single","s":"ヲ","k":1} +{"g":"single","s":"ー","k":1} +{"g":"single","s":"゙","k":1} +{"g":"single","s":"゚","k":1} +{"g":"single","s":"ᄒ","k":1} +{"g":"single","s":"ᅡ","k":1} +{"g":"single","s":"ᅦ","k":1} +{"g":"single","s":"ᅧ","k":1} +{"g":"single","s":"ᅬ","k":1} +{"g":"single","s":"ᅭ","k":1} +{"g":"single","s":"ᅲ","k":1} +{"g":"single","s":"ᅳ","k":1} +{"g":"single","s":"ᅵ","k":1} +{"g":"single","s":" ̄","k":0} +{"g":"single","s":"","k":0} +{"g":"single","s":"","k":0} +{"g":"single","s":"𐀀","k":1} +{"g":"single","s":"𐀋","k":1} +{"g":"single","s":"𐀍","k":1} +{"g":"single","s":"𐀦","k":1} +{"g":"single","s":"𐀨","k":1} +{"g":"single","s":"𐀺","k":1} +{"g":"single","s":"𐀼","k":1} +{"g":"single","s":"𐀽","k":1} +{"g":"single","s":"𐀿","k":1} +{"g":"single","s":"𐁍","k":1} +{"g":"single","s":"𐁐","k":1} +{"g":"single","s":"𐁝","k":1} +{"g":"single","s":"𐂀","k":1} +{"g":"single","s":"𐃺","k":1} +{"g":"single","s":"𐇽","k":0} +{"g":"single","s":"𐊀","k":1} +{"g":"single","s":"𐊜","k":1} +{"g":"single","s":"𐊠","k":1} +{"g":"single","s":"𐋐","k":1} +{"g":"single","s":"𐋠","k":0} +{"g":"single","s":"𐌀","k":1} +{"g":"single","s":"𐌟","k":1} +{"g":"single","s":"𐌭","k":1} +{"g":"single","s":"𐍀","k":1} +{"g":"single","s":"𐍂","k":1} +{"g":"single","s":"𐍉","k":1} +{"g":"single","s":"𐍐","k":1} +{"g":"single","s":"𐍵","k":1} +{"g":"single","s":"𐍶","k":0} +{"g":"single","s":"𐍹","k":0} +{"g":"single","s":"𐍺","k":0} +{"g":"single","s":"𐎀","k":1} +{"g":"single","s":"𐎝","k":1} +{"g":"single","s":"𐎠","k":1} +{"g":"single","s":"𐏃","k":1} +{"g":"single","s":"𐏈","k":1} +{"g":"single","s":"𐏏","k":1} +{"g":"single","s":"𐐀","l":"𐐨","k":3} +{"g":"single","s":"𐐧","l":"𐑏","k":3} +{"g":"single","s":"𐑏","k":1} +{"g":"single","s":"𐒝","k":1} +{"g":"single","s":"𐒰","l":"𐓘","k":3} +{"g":"single","s":"𐓓","l":"𐓻","k":3} +{"g":"single","s":"𐓘","k":1} +{"g":"single","s":"𐓻","k":1} +{"g":"single","s":"𐔀","k":1} +{"g":"single","s":"𐔧","k":1} +{"g":"single","s":"𐔰","k":1} +{"g":"single","s":"𐕣","k":1} +{"g":"single","s":"𐕰","l":"𐖗","k":3} +{"g":"single","s":"𐕺","l":"𐖡","k":3} +{"g":"single","s":"𐕼","l":"𐖣","k":3} +{"g":"single","s":"𐖊","l":"𐖱","k":3} +{"g":"single","s":"𐖌","l":"𐖳","k":3} +{"g":"single","s":"𐖒","l":"𐖹","k":3} +{"g":"single","s":"𐖔","l":"𐖻","k":3} +{"g":"single","s":"𐖕","l":"𐖼","k":3} +{"g":"single","s":"𐖗","k":1} +{"g":"single","s":"𐖡","k":1} +{"g":"single","s":"𐖣","k":1} +{"g":"single","s":"𐖱","k":1} +{"g":"single","s":"𐖳","k":1} +{"g":"single","s":"𐖹","k":1} +{"g":"single","s":"𐖻","k":1} +{"g":"single","s":"𐖼","k":1} +{"g":"single","s":"𐗀","k":1} +{"g":"single","s":"𐗳","k":1} +{"g":"single","s":"𐘀","k":1} +{"g":"single","s":"𐜶","k":1} +{"g":"single","s":"𐝀","k":1} +{"g":"single","s":"𐝕","k":1} +{"g":"single","s":"𐝠","k":1} +{"g":"single","s":"𐝧","k":1} +{"g":"single","s":"𐞀","k":1} +{"g":"single","s":"𐞃","k":1} +{"g":"single","s":"𐞅","k":1} +{"g":"single","s":"𐞇","k":1} +{"g":"single","s":"𐞰","k":1} +{"g":"single","s":"𐞲","k":1} +{"g":"single","s":"𐞺","k":1} +{"g":"single","s":"𐠀","k":1} +{"g":"single","s":"𐠅","k":1} +{"g":"single","s":"𐠈","k":1} +{"g":"single","s":"𐠊","k":1} +{"g":"single","s":"𐠵","k":1} +{"g":"single","s":"𐠷","k":1} +{"g":"single","s":"𐠸","k":1} +{"g":"single","s":"𐠼","k":1} +{"g":"single","s":"𐠿","k":1} +{"g":"single","s":"𐡕","k":1} +{"g":"single","s":"𐡠","k":1} +{"g":"single","s":"𐡶","k":1} +{"g":"single","s":"𐢀","k":1} +{"g":"single","s":"𐢞","k":1} +{"g":"single","s":"𐣠","k":1} +{"g":"single","s":"𐣲","k":1} +{"g":"single","s":"𐣴","k":1} +{"g":"single","s":"𐣵","k":1} +{"g":"single","s":"𐤀","k":1} +{"g":"single","s":"𐤕","k":1} +{"g":"single","s":"𐤠","k":1} +{"g":"single","s":"𐤹","k":1} +{"g":"single","s":"𐥀","k":1} +{"g":"single","s":"𐥙","k":1} +{"g":"single","s":"𐦀","k":1} +{"g":"single","s":"𐦷","k":1} +{"g":"single","s":"𐦾","k":1} +{"g":"single","s":"𐦿","k":1} +{"g":"single","s":"𐨀","k":1} +{"g":"single","s":"𐨁","k":0} +{"g":"single","s":"𐨃","k":0} +{"g":"single","s":"𐨅","k":0} +{"g":"single","s":"𐨆","k":0} +{"g":"single","s":"𐨌","k":0} +{"g":"single","s":"𐨏","k":0} +{"g":"single","s":"𐨐","k":1} +{"g":"single","s":"𐨓","k":1} +{"g":"single","s":"𐨕","k":1} +{"g":"single","s":"𐨗","k":1} +{"g":"single","s":"𐨙","k":1} +{"g":"single","s":"𐨵","k":1} +{"g":"single","s":"𐨸","k":0} +{"g":"single","s":"𐨺","k":0} +{"g":"single","s":"𐨿","k":0} +{"g":"single","s":"𐩠","k":1} +{"g":"single","s":"𐩼","k":1} +{"g":"single","s":"𐪀","k":1} +{"g":"single","s":"𐪜","k":1} +{"g":"single","s":"𐫀","k":1} +{"g":"single","s":"𐫇","k":1} +{"g":"single","s":"𐫉","k":1} +{"g":"single","s":"𐫤","k":1} +{"g":"single","s":"𐫥","k":0} +{"g":"single","s":"𐫦","k":0} +{"g":"single","s":"𐬀","k":1} +{"g":"single","s":"𐬵","k":1} +{"g":"single","s":"𐭀","k":1} +{"g":"single","s":"𐭕","k":1} +{"g":"single","s":"𐭠","k":1} +{"g":"single","s":"𐭲","k":1} +{"g":"single","s":"𐮀","k":1} +{"g":"single","s":"𐮑","k":1} +{"g":"single","s":"𐰀","k":1} +{"g":"single","s":"𐱈","k":1} +{"g":"single","s":"𐲀","l":"𐳀","k":3} +{"g":"single","s":"𐲲","l":"𐳲","k":3} +{"g":"single","s":"𐳀","k":1} +{"g":"single","s":"𐳲","k":1} +{"g":"single","s":"𐴀","k":1} +{"g":"single","s":"𐴣","k":1} +{"g":"single","s":"𐴤","k":0} +{"g":"single","s":"𐴧","k":0} +{"g":"single","s":"𐵊","k":1} +{"g":"single","s":"𐵎","k":1} +{"g":"single","s":"𐵐","l":"𐵰","k":3} +{"g":"single","s":"𐵥","l":"𐶅","k":3} +{"g":"single","s":"𐵩","k":0} +{"g":"single","s":"𐵫","k":0} +{"g":"single","s":"𐵭","k":0} +{"g":"single","s":"𐵯","k":1} +{"g":"single","s":"𐵰","k":1} +{"g":"single","s":"𐶅","k":1} +{"g":"single","s":"𐺀","k":1} +{"g":"single","s":"𐺩","k":1} +{"g":"single","s":"𐺫","k":0} +{"g":"single","s":"𐺬","k":0} +{"g":"single","s":"𐺰","k":1} +{"g":"single","s":"𐺱","k":1} +{"g":"single","s":"𐻂","k":1} +{"g":"single","s":"𐻅","k":1} +{"g":"single","s":"𐻇","k":1} +{"g":"single","s":"𐻺","k":0} +{"g":"single","s":"𐻾","k":0} +{"g":"single","s":"𐻿","k":0} +{"g":"single","s":"𐼀","k":1} +{"g":"single","s":"𐼜","k":1} +{"g":"single","s":"𐼧","k":1} +{"g":"single","s":"𐼰","k":1} +{"g":"single","s":"𐽅","k":1} +{"g":"single","s":"𐽆","k":0} +{"g":"single","s":"𐽌","k":0} +{"g":"single","s":"𐽐","k":0} +{"g":"single","s":"𐽰","k":1} +{"g":"single","s":"𐾁","k":1} +{"g":"single","s":"𐾂","k":0} +{"g":"single","s":"𐾅","k":0} +{"g":"single","s":"𐾰","k":1} +{"g":"single","s":"𐿄","k":1} +{"g":"single","s":"𐿠","k":1} +{"g":"single","s":"𐿶","k":1} +{"g":"single","s":"𑀁","k":0} +{"g":"single","s":"𑀃","k":1} +{"g":"single","s":"𑀷","k":1} +{"g":"single","s":"𑀸","k":0} +{"g":"single","s":"𑁆","k":0} +{"g":"single","s":"𑁰","k":0} +{"g":"single","s":"𑁱","k":1} +{"g":"single","s":"𑁲","k":1} +{"g":"single","s":"𑁳","k":0} +{"g":"single","s":"𑁴","k":0} +{"g":"single","s":"𑁵","k":1} +{"g":"single","s":"𑁿","k":0} +{"g":"single","s":"𑂁","k":0} +{"g":"single","s":"𑂃","k":1} +{"g":"single","s":"𑂜","d":"𑂜","k":1} +{"g":"single","s":"𑂯","k":1} +{"g":"single","s":"𑂳","k":0} +{"g":"single","s":"𑂶","k":0} +{"g":"single","s":"𑂹","k":0} +{"g":"single","s":"𑂺","k":0} +{"g":"single","s":"𑂽","k":0} +{"g":"single","s":"𑃂","k":0} +{"g":"single","s":"𑃍","k":0} +{"g":"single","s":"𑃐","k":1} +{"g":"single","s":"𑃨","k":1} +{"g":"single","s":"𑄀","k":0} +{"g":"single","s":"𑄂","k":0} +{"g":"single","s":"𑄃","k":1} +{"g":"single","s":"𑄦","k":1} +{"g":"single","s":"𑄧","k":0} +{"g":"single","s":"𑄫","k":0} +{"g":"single","s":"𑄭","k":0} +{"g":"single","s":"𑄴","k":0} +{"g":"single","s":"𑅄","k":1} +{"g":"single","s":"𑅇","k":1} +{"g":"single","s":"𑅐","k":1} +{"g":"single","s":"𑅢","k":1} +{"g":"single","s":"𑅲","k":1} +{"g":"single","s":"𑅳","k":0} +{"g":"single","s":"𑅶","k":1} +{"g":"single","s":"𑆀","k":0} +{"g":"single","s":"𑆁","k":0} +{"g":"single","s":"𑆃","k":1} +{"g":"single","s":"𑆲","k":1} +{"g":"single","s":"𑆶","k":0} +{"g":"single","s":"𑆾","k":0} +{"g":"single","s":"𑇁","k":1} +{"g":"single","s":"𑇄","k":1} +{"g":"single","s":"𑇉","k":0} +{"g":"single","s":"𑇌","k":0} +{"g":"single","s":"𑇏","k":0} +{"g":"single","s":"𑇚","k":1} +{"g":"single","s":"𑇜","k":1} +{"g":"single","s":"𑈀","k":1} +{"g":"single","s":"𑈑","k":1} +{"g":"single","s":"𑈓","k":1} +{"g":"single","s":"𑈫","k":1} +{"g":"single","s":"𑈯","k":0} +{"g":"single","s":"𑈱","k":0} +{"g":"single","s":"𑈴","k":0} +{"g":"single","s":"𑈶","k":0} +{"g":"single","s":"𑈷","k":0} +{"g":"single","s":"𑈾","k":0} +{"g":"single","s":"𑈿","k":1} +{"g":"single","s":"𑉀","k":1} +{"g":"single","s":"𑉁","k":0} +{"g":"single","s":"𑊀","k":1} +{"g":"single","s":"𑊆","k":1} +{"g":"single","s":"𑊈","k":1} +{"g":"single","s":"𑊊","k":1} +{"g":"single","s":"𑊍","k":1} +{"g":"single","s":"𑊏","k":1} +{"g":"single","s":"𑊝","k":1} +{"g":"single","s":"𑊟","k":1} +{"g":"single","s":"𑊨","k":1} +{"g":"single","s":"𑊰","k":1} +{"g":"single","s":"𑋞","k":1} +{"g":"single","s":"𑋟","k":0} +{"g":"single","s":"𑋣","k":0} +{"g":"single","s":"𑋩","k":0} +{"g":"single","s":"𑋪","k":0} +{"g":"single","s":"𑌀","k":0} +{"g":"single","s":"𑌁","k":0} +{"g":"single","s":"𑌅","k":1} +{"g":"single","s":"𑌌","k":1} +{"g":"single","s":"𑌏","k":1} +{"g":"single","s":"𑌐","k":1} +{"g":"single","s":"𑌓","k":1} +{"g":"single","s":"𑌨","k":1} +{"g":"single","s":"𑌪","k":1} +{"g":"single","s":"𑌰","k":1} +{"g":"single","s":"𑌲","k":1} +{"g":"single","s":"𑌳","k":1} +{"g":"single","s":"𑌵","k":1} +{"g":"single","s":"𑌹","k":1} +{"g":"single","s":"𑌻","k":0} +{"g":"single","s":"𑌼","k":0} +{"g":"single","s":"𑌽","k":1} +{"g":"single","s":"𑍀","k":0} +{"g":"single","s":"𑍐","k":1} +{"g":"single","s":"𑍗","k":0} +{"g":"single","s":"𑍝","k":1} +{"g":"single","s":"𑍡","k":1} +{"g":"single","s":"𑍦","k":0} +{"g":"single","s":"𑍩","k":0} +{"g":"single","s":"𑍬","k":0} +{"g":"single","s":"𑍰","k":0} +{"g":"single","s":"𑍴","k":0} +{"g":"single","s":"𑎀","k":1} +{"g":"single","s":"𑎉","k":1} +{"g":"single","s":"𑎋","k":1} +{"g":"single","s":"𑎎","d":"𑎎","k":1} +{"g":"single","s":"𑎐","k":1} +{"g":"single","s":"𑎵","k":1} +{"g":"single","s":"𑎷","k":1} +{"g":"single","s":"𑎻","k":0} +{"g":"single","s":"𑏀","k":0} +{"g":"single","s":"𑏎","k":0} +{"g":"single","s":"𑏐","k":0} +{"g":"single","s":"𑏑","k":1} +{"g":"single","s":"𑏒","k":0} +{"g":"single","s":"𑏓","k":1} +{"g":"single","s":"𑏡","k":0} +{"g":"single","s":"𑏢","k":0} +{"g":"single","s":"𑐀","k":1} +{"g":"single","s":"𑐴","k":1} +{"g":"single","s":"𑐸","k":0} +{"g":"single","s":"𑐿","k":0} +{"g":"single","s":"𑑂","k":0} +{"g":"single","s":"𑑄","k":0} +{"g":"single","s":"𑑆","k":0} +{"g":"single","s":"𑑇","k":1} +{"g":"single","s":"𑑊","k":1} +{"g":"single","s":"𑑞","k":0} +{"g":"single","s":"𑑟","k":1} +{"g":"single","s":"𑑡","k":1} +{"g":"single","s":"𑒀","k":1} +{"g":"single","s":"𑒯","k":1} +{"g":"single","s":"𑒰","k":0} +{"g":"single","s":"𑒳","k":0} +{"g":"single","s":"𑒸","k":0} +{"g":"single","s":"𑒺","k":0} +{"g":"single","s":"𑒿","k":0} +{"g":"single","s":"𑓀","k":0} +{"g":"single","s":"𑓂","k":0} +{"g":"single","s":"𑓃","k":0} +{"g":"single","s":"𑓄","k":1} +{"g":"single","s":"𑓅","k":1} +{"g":"single","s":"𑓇","k":1} +{"g":"single","s":"𑖀","k":1} +{"g":"single","s":"𑖮","k":1} +{"g":"single","s":"𑖲","k":0} +{"g":"single","s":"𑖵","k":0} +{"g":"single","s":"𑖺","d":"𑖺","k":0} +{"g":"single","s":"𑖼","k":0} +{"g":"single","s":"𑖽","k":0} +{"g":"single","s":"𑖿","k":0} +{"g":"single","s":"𑗀","k":0} +{"g":"single","s":"𑗘","k":1} +{"g":"single","s":"𑗛","k":1} +{"g":"single","s":"𑗜","k":0} +{"g":"single","s":"𑗝","k":0} +{"g":"single","s":"𑘀","k":1} +{"g":"single","s":"𑘯","k":1} +{"g":"single","s":"𑘳","k":0} +{"g":"single","s":"𑘺","k":0} +{"g":"single","s":"𑘽","k":0} +{"g":"single","s":"𑘿","k":0} +{"g":"single","s":"𑙀","k":0} +{"g":"single","s":"𑙄","k":1} +{"g":"single","s":"𑚀","k":1} +{"g":"single","s":"𑚪","k":1} +{"g":"single","s":"𑚫","k":0} +{"g":"single","s":"𑚭","k":0} +{"g":"single","s":"𑚰","k":0} +{"g":"single","s":"𑚵","k":0} +{"g":"single","s":"𑚷","k":0} +{"g":"single","s":"𑚸","k":1} +{"g":"single","s":"𑜀","k":1} +{"g":"single","s":"𑜚","k":1} +{"g":"single","s":"𑜝","k":0} +{"g":"single","s":"𑜟","k":0} +{"g":"single","s":"𑜢","k":0} +{"g":"single","s":"𑜥","k":0} +{"g":"single","s":"𑜧","k":0} +{"g":"single","s":"𑜫","k":0} +{"g":"single","s":"𑝀","k":1} +{"g":"single","s":"𑝆","k":1} +{"g":"single","s":"𑠀","k":1} +{"g":"single","s":"𑠫","k":1} +{"g":"single","s":"𑠯","k":0} +{"g":"single","s":"𑠷","k":0} +{"g":"single","s":"𑠹","k":0} +{"g":"single","s":"𑠺","k":0} +{"g":"single","s":"𑢠","l":"𑣀","k":3} +{"g":"single","s":"𑢿","l":"𑣟","k":3} +{"g":"single","s":"𑣟","k":1} +{"g":"single","s":"𑣿","k":1} +{"g":"single","s":"𑤆","k":1} +{"g":"single","s":"𑤉","k":1} +{"g":"single","s":"𑤌","k":1} +{"g":"single","s":"𑤓","k":1} +{"g":"single","s":"𑤕","k":1} +{"g":"single","s":"𑤖","k":1} +{"g":"single","s":"𑤘","k":1} +{"g":"single","s":"𑤯","k":1} +{"g":"single","s":"𑤻","k":0} +{"g":"single","s":"𑤼","k":0} +{"g":"single","s":"𑤾","k":0} +{"g":"single","s":"𑤿","k":1} +{"g":"single","s":"𑥁","k":1} +{"g":"single","s":"𑥃","k":0} +{"g":"single","s":"𑦠","k":1} +{"g":"single","s":"𑦧","k":1} +{"g":"single","s":"𑦪","k":1} +{"g":"single","s":"𑧐","k":1} +{"g":"single","s":"𑧔","k":0} +{"g":"single","s":"𑧗","k":0} +{"g":"single","s":"𑧚","k":0} +{"g":"single","s":"𑧛","k":0} +{"g":"single","s":"𑧠","k":0} +{"g":"single","s":"𑧡","k":1} +{"g":"single","s":"𑧣","k":1} +{"g":"single","s":"𑨀","k":1} +{"g":"single","s":"𑨁","k":0} +{"g":"single","s":"𑨊","k":0} +{"g":"single","s":"𑨋","k":1} +{"g":"single","s":"𑨲","k":1} +{"g":"single","s":"𑨳","k":0} +{"g":"single","s":"𑨸","k":0} +{"g":"single","s":"𑨺","k":1} +{"g":"single","s":"𑨻","k":0} +{"g":"single","s":"𑨾","k":0} +{"g":"single","s":"𑩇","k":0} +{"g":"single","s":"𑩐","k":1} +{"g":"single","s":"𑩑","k":0} +{"g":"single","s":"𑩖","k":0} +{"g":"single","s":"𑩙","k":0} +{"g":"single","s":"𑩛","k":0} +{"g":"single","s":"𑩜","k":1} +{"g":"single","s":"𑪉","k":1} +{"g":"single","s":"𑪊","k":0} +{"g":"single","s":"𑪖","k":0} +{"g":"single","s":"𑪘","k":0} +{"g":"single","s":"𑪙","k":0} +{"g":"single","s":"𑪝","k":1} +{"g":"single","s":"𑪰","k":1} +{"g":"single","s":"𑫸","k":1} +{"g":"single","s":"𑭠","k":0} +{"g":"single","s":"𑭢","k":0} +{"g":"single","s":"𑭤","k":0} +{"g":"single","s":"𑭦","k":0} +{"g":"single","s":"𑯀","k":1} +{"g":"single","s":"𑯠","k":1} +{"g":"single","s":"𑰀","k":1} +{"g":"single","s":"𑰈","k":1} +{"g":"single","s":"𑰊","k":1} +{"g":"single","s":"𑰮","k":1} +{"g":"single","s":"𑰰","k":0} +{"g":"single","s":"𑰶","k":0} +{"g":"single","s":"𑰸","k":0} +{"g":"single","s":"𑰽","k":0} +{"g":"single","s":"𑰿","k":0} +{"g":"single","s":"𑱀","k":1} +{"g":"single","s":"𑱲","k":1} +{"g":"single","s":"𑲏","k":1} +{"g":"single","s":"𑲒","k":0} +{"g":"single","s":"𑲧","k":0} +{"g":"single","s":"𑲪","k":0} +{"g":"single","s":"𑲰","k":0} +{"g":"single","s":"𑲲","k":0} +{"g":"single","s":"𑲳","k":0} +{"g":"single","s":"𑲵","k":0} +{"g":"single","s":"𑲶","k":0} +{"g":"single","s":"𑴀","k":1} +{"g":"single","s":"𑴆","k":1} +{"g":"single","s":"𑴈","k":1} +{"g":"single","s":"𑴉","k":1} +{"g":"single","s":"𑴋","k":1} +{"g":"single","s":"𑴰","k":1} +{"g":"single","s":"𑴱","k":0} +{"g":"single","s":"𑴶","k":0} +{"g":"single","s":"𑴺","k":0} +{"g":"single","s":"𑴼","k":0} +{"g":"single","s":"𑴽","k":0} +{"g":"single","s":"𑴿","k":0} +{"g":"single","s":"𑵅","k":0} +{"g":"single","s":"𑵆","k":1} +{"g":"single","s":"𑵇","k":0} +{"g":"single","s":"𑵠","k":1} +{"g":"single","s":"𑵥","k":1} +{"g":"single","s":"𑵧","k":1} +{"g":"single","s":"𑵨","k":1} +{"g":"single","s":"𑵪","k":1} +{"g":"single","s":"𑶉","k":1} +{"g":"single","s":"𑶐","k":0} +{"g":"single","s":"𑶑","k":0} +{"g":"single","s":"𑶕","k":0} +{"g":"single","s":"𑶗","k":0} +{"g":"single","s":"𑶘","k":1} +{"g":"single","s":"𑶰","k":1} +{"g":"single","s":"𑷙","k":1} +{"g":"single","s":"𑷛","k":1} +{"g":"single","s":"𑻠","k":1} +{"g":"single","s":"𑻲","k":1} +{"g":"single","s":"𑻳","k":0} +{"g":"single","s":"𑻴","k":0} +{"g":"single","s":"𑼀","k":0} +{"g":"single","s":"𑼁","k":0} +{"g":"single","s":"𑼂","k":1} +{"g":"single","s":"𑼄","k":1} +{"g":"single","s":"𑼐","k":1} +{"g":"single","s":"𑼒","k":1} +{"g":"single","s":"𑼳","k":1} +{"g":"single","s":"𑼶","k":0} +{"g":"single","s":"𑼺","k":0} +{"g":"single","s":"𑽀","k":0} +{"g":"single","s":"𑽂","k":0} +{"g":"single","s":"𑽚","k":0} +{"g":"single","s":"𑾰","k":1} +{"g":"single","s":"𒀀","k":1} +{"g":"single","s":"𒎙","k":1} +{"g":"single","s":"𒒀","k":1} +{"g":"single","s":"𒓩","k":1} +{"g":"single","s":"𒕃","k":1} +{"g":"single","s":"𒾐","k":1} +{"g":"single","s":"𒿰","k":1} +{"g":"single","s":"𓀀","k":1} +{"g":"single","s":"𓐯","k":1} +{"g":"single","s":"𓐰","k":0} +{"g":"single","s":"𓑀","k":0} +{"g":"single","s":"𓑁","k":1} +{"g":"single","s":"𓑆","k":1} +{"g":"single","s":"𓑇","k":0} +{"g":"single","s":"𓑕","k":0} +{"g":"single","s":"𓑠","k":1} +{"g":"single","s":"𓡰","k":1} +{"g":"single","s":"𔏺","k":1} +{"g":"single","s":"𔐀","k":1} +{"g":"single","s":"𔙆","k":1} +{"g":"single","s":"𔯷","k":0} +{"g":"single","s":"𕽾","k":0} +{"g":"single","s":"𖄀","k":1} +{"g":"single","s":"𖄝","k":1} +{"g":"single","s":"𖄞","k":0} +{"g":"single","s":"𖄠","k":0} +{"g":"single","s":"𖄦","d":"𖄦","k":0} +{"g":"single","s":"𖄩","k":0} +{"g":"single","s":"𖄭","k":0} +{"g":"single","s":"𖄯","k":0} +{"g":"single","s":"𖠀","k":1} +{"g":"single","s":"𖨸","k":1} +{"g":"single","s":"𖩀","k":1} +{"g":"single","s":"𖩞","k":1} +{"g":"single","s":"𖩰","k":1} +{"g":"single","s":"𖪾","k":1} +{"g":"single","s":"𖫐","k":1} +{"g":"single","s":"𖫭","k":1} +{"g":"single","s":"𖫰","k":0} +{"g":"single","s":"𖫴","k":0} +{"g":"single","s":"𖬀","k":1} +{"g":"single","s":"𖬯","k":1} +{"g":"single","s":"𖬰","k":0} +{"g":"single","s":"𖬳","k":0} +{"g":"single","s":"𖬶","k":0} +{"g":"single","s":"𖭀","k":1} +{"g":"single","s":"𖭃","k":1} +{"g":"single","s":"𖭣","k":1} +{"g":"single","s":"𖭷","k":1} +{"g":"single","s":"𖭽","k":1} +{"g":"single","s":"𖮏","k":1} +{"g":"single","s":"𖵀","k":1} +{"g":"single","s":"𖵂","k":1} +{"g":"single","s":"𖵧","k":1} +{"g":"single","s":"𖵫","k":1} +{"g":"single","s":"𖵬","k":1} +{"g":"single","s":"𖹀","l":"𖹠","k":3} +{"g":"single","s":"𖹟","l":"𖹿","k":3} +{"g":"single","s":"𖹿","k":1} +{"g":"single","s":"𖺠","l":"𖺻","k":3} +{"g":"single","s":"𖺸","l":"𖻓","k":3} +{"g":"single","s":"𖺻","k":1} +{"g":"single","s":"𖻓","k":1} +{"g":"single","s":"𖼀","k":1} +{"g":"single","s":"𖽊","k":1} +{"g":"single","s":"𖽏","k":0} +{"g":"single","s":"𖽐","k":1} +{"g":"single","s":"𖾏","k":0} +{"g":"single","s":"𖾓","k":1} +{"g":"single","s":"𖾟","k":1} +{"g":"single","s":"𖿠","k":1} +{"g":"single","s":"𖿡","k":1} +{"g":"single","s":"𖿣","k":1} +{"g":"single","s":"𖿤","k":0} +{"g":"single","s":"𖿲","k":1} +{"g":"single","s":"𖿳","k":1} +{"g":"single","s":"𗀀","k":1} +{"g":"single","s":"𗌅","k":1} +{"g":"single","s":"𘚌","k":1} +{"g":"single","s":"𘳕","k":1} +{"g":"single","s":"𘳿","k":1} +{"g":"single","s":"𘴞","k":1} +{"g":"single","s":"𘶀","k":1} +{"g":"single","s":"𘷲","k":1} +{"g":"single","s":"𙨓","k":0} +{"g":"single","s":"𚶚","k":0} +{"g":"single","s":"𚿰","k":1} +{"g":"single","s":"𚿳","k":1} +{"g":"single","s":"𚿵","k":1} +{"g":"single","s":"𚿻","k":1} +{"g":"single","s":"𚿽","k":1} +{"g":"single","s":"𚿾","k":1} +{"g":"single","s":"𛀀","k":1} +{"g":"single","s":"𛄢","k":1} +{"g":"single","s":"𛄲","k":1} +{"g":"single","s":"𛅐","k":1} +{"g":"single","s":"𛅒","k":1} +{"g":"single","s":"𛅕","k":1} +{"g":"single","s":"𛅤","k":1} +{"g":"single","s":"𛅧","k":1} +{"g":"single","s":"𛅰","k":1} +{"g":"single","s":"𛋻","k":1} +{"g":"single","s":"𛰀","k":1} +{"g":"single","s":"𛱪","k":1} +{"g":"single","s":"𛱰","k":1} +{"g":"single","s":"𛱼","k":1} +{"g":"single","s":"𛲀","k":1} +{"g":"single","s":"𛲈","k":1} +{"g":"single","s":"𛲐","k":1} +{"g":"single","s":"𛲙","k":1} +{"g":"single","s":"𛲝","k":0} +{"g":"single","s":"𛲞","k":0} +{"g":"single","s":"𛲠","k":0} +{"g":"single","s":"𛲣","k":0} +{"g":"single","s":"𜄡","k":0} +{"g":"single","s":"𜼀","k":0} +{"g":"single","s":"𜼭","k":0} +{"g":"single","s":"𜼰","k":0} +{"g":"single","s":"𜽆","k":0} +{"g":"single","s":"𝅗𝅥","c":"𝅗𝅥","d":"𝅗𝅥","k":0} +{"g":"single","s":"𝅘𝅥𝅮","c":"𝅘𝅥𝅮","d":"𝅘𝅥𝅮","k":0} +{"g":"single","s":"𝅘𝅥𝅲","c":"𝅘𝅥𝅲","d":"𝅘𝅥𝅲","k":0} +{"g":"single","s":"𝅦","k":0} +{"g":"single","s":"𝅧","k":0} +{"g":"single","s":"𝅩","k":0} +{"g":"single","s":"𝅱","k":0} +{"g":"single","s":"𝅳","k":0} +{"g":"single","s":"𝆁","k":0} +{"g":"single","s":"𝆂","k":0} +{"g":"single","s":"𝆅","k":0} +{"g":"single","s":"𝆋","k":0} +{"g":"single","s":"𝆪","k":0} +{"g":"single","s":"𝆭","k":0} +{"g":"single","s":"𝆹𝅥","c":"𝆹𝅥","d":"𝆹𝅥","k":0} +{"g":"single","s":"𝆺𝅥𝅮","c":"𝆺𝅥𝅮","d":"𝆺𝅥𝅮","k":0} +{"g":"single","s":"𝆺𝅥𝅯","c":"𝆺𝅥𝅯","d":"𝆺𝅥𝅯","k":0} +{"g":"single","s":"𝉂","k":0} +{"g":"single","s":"𝉄","k":0} +{"g":"single","s":"𝐀","k":3} +{"g":"single","s":"𝐙","k":3} +{"g":"single","s":"𝐴","k":3} +{"g":"single","s":"𝑍","k":3} +{"g":"single","s":"𝑔","k":1} +{"g":"single","s":"𝑖","k":1} +{"g":"single","s":"𝑨","k":3} +{"g":"single","s":"𝒁","k":3} +{"g":"single","s":"𝒜","k":3} +{"g":"single","s":"𝒞","k":3} +{"g":"single","s":"𝒟","k":3} +{"g":"single","s":"𝒢","k":3} +{"g":"single","s":"𝒥","k":3} +{"g":"single","s":"𝒦","k":3} +{"g":"single","s":"𝒨","k":0} +{"g":"single","s":"𝒩","k":3} +{"g":"single","s":"𝒬","k":3} +{"g":"single","s":"𝒮","k":3} +{"g":"single","s":"𝒵","k":3} +{"g":"single","s":"𝒹","k":1} +{"g":"single","s":"𝒻","k":1} +{"g":"single","s":"𝒽","k":1} +{"g":"single","s":"𝓃","k":1} +{"g":"single","s":"𝓅","k":1} +{"g":"single","s":"𝓐","k":3} +{"g":"single","s":"𝓩","k":3} +{"g":"single","s":"𝔄","k":3} +{"g":"single","s":"𝔅","k":3} +{"g":"single","s":"𝔇","k":3} +{"g":"single","s":"𝔊","k":3} +{"g":"single","s":"𝔍","k":3} +{"g":"single","s":"𝔔","k":3} +{"g":"single","s":"𝔖","k":3} +{"g":"single","s":"𝔜","k":3} +{"g":"single","s":"𝔞","k":1} +{"g":"single","s":"𝔸","k":3} +{"g":"single","s":"𝔹","k":3} +{"g":"single","s":"𝔻","k":3} +{"g":"single","s":"𝔾","k":3} +{"g":"single","s":"𝕀","k":3} +{"g":"single","s":"𝕄","k":3} +{"g":"single","s":"𝕆","k":3} +{"g":"single","s":"𝕊","k":3} +{"g":"single","s":"𝕐","k":3} +{"g":"single","s":"𝕒","k":1} +{"g":"single","s":"𝕬","k":3} +{"g":"single","s":"𝖅","k":3} +{"g":"single","s":"𝖠","k":3} +{"g":"single","s":"𝖹","k":3} +{"g":"single","s":"𝗔","k":3} +{"g":"single","s":"𝗭","k":3} +{"g":"single","s":"𝘈","k":3} +{"g":"single","s":"𝘡","k":3} +{"g":"single","s":"𝘼","k":3} +{"g":"single","s":"𝙕","k":3} +{"g":"single","s":"𝙰","k":3} +{"g":"single","s":"𝚉","k":3} +{"g":"single","s":"𝚥","k":1} +{"g":"single","s":"𝚨","k":3} +{"g":"single","s":"𝛀","k":3} +{"g":"single","s":"𝛂","k":1} +{"g":"single","s":"𝛚","k":1} +{"g":"single","s":"𝛜","k":1} +{"g":"single","s":"𝛢","k":3} +{"g":"single","s":"𝛺","k":3} +{"g":"single","s":"𝛼","k":1} +{"g":"single","s":"𝜔","k":1} +{"g":"single","s":"𝜖","k":1} +{"g":"single","s":"𝜜","k":3} +{"g":"single","s":"𝜴","k":3} +{"g":"single","s":"𝜶","k":1} +{"g":"single","s":"𝝎","k":1} +{"g":"single","s":"𝝐","k":1} +{"g":"single","s":"𝝖","k":3} +{"g":"single","s":"𝝮","k":3} +{"g":"single","s":"𝝰","k":1} +{"g":"single","s":"𝞈","k":1} +{"g":"single","s":"𝞊","k":1} +{"g":"single","s":"𝞐","k":3} +{"g":"single","s":"𝞨","k":3} +{"g":"single","s":"𝞪","k":1} +{"g":"single","s":"𝟂","k":1} +{"g":"single","s":"𝟄","k":1} +{"g":"single","s":"𝟊","k":3} +{"g":"single","s":"𝟋","k":1} +{"g":"single","s":"𝨀","k":0} +{"g":"single","s":"𝨶","k":0} +{"g":"single","s":"𝨻","k":0} +{"g":"single","s":"𝩬","k":0} +{"g":"single","s":"𝩵","k":0} +{"g":"single","s":"𝪄","k":0} +{"g":"single","s":"𝪛","k":0} +{"g":"single","s":"𝪟","k":0} +{"g":"single","s":"𝪡","k":0} +{"g":"single","s":"𝪯","k":0} +{"g":"single","s":"𝼀","k":1} +{"g":"single","s":"𝼉","k":1} +{"g":"single","s":"𝼋","k":1} +{"g":"single","s":"𝼞","k":1} +{"g":"single","s":"𝼥","k":1} +{"g":"single","s":"𝼪","k":1} +{"g":"single","s":"𞀀","k":0} +{"g":"single","s":"𞀆","k":0} +{"g":"single","s":"𞀈","k":0} +{"g":"single","s":"𞀉","k":0} +{"g":"single","s":"𞀑","k":0} +{"g":"single","s":"𞀘","k":0} +{"g":"single","s":"𞀛","k":0} +{"g":"single","s":"𞀡","k":0} +{"g":"single","s":"𞀣","k":0} +{"g":"single","s":"𞀤","k":0} +{"g":"single","s":"𞀦","k":0} +{"g":"single","s":"𞀪","k":0} +{"g":"single","s":"𞀰","k":1} +{"g":"single","s":"𞁭","k":1} +{"g":"single","s":"𞂏","k":0} +{"g":"single","s":"𞄀","k":1} +{"g":"single","s":"𞄬","k":1} +{"g":"single","s":"𞄰","k":0} +{"g":"single","s":"𞄱","k":0} +{"g":"single","s":"𞄷","k":1} +{"g":"single","s":"𞄽","k":1} +{"g":"single","s":"𞅎","k":1} +{"g":"single","s":"𞊐","k":1} +{"g":"single","s":"𞊭","k":1} +{"g":"single","s":"𞊮","k":0} +{"g":"single","s":"𞋀","k":1} +{"g":"single","s":"𞋫","k":1} +{"g":"single","s":"𞋬","k":0} +{"g":"single","s":"𞋭","k":0} +{"g":"single","s":"𞋯","k":0} +{"g":"single","s":"𞓐","k":1} +{"g":"single","s":"𞓫","k":1} +{"g":"single","s":"𞓯","k":0} +{"g":"single","s":"𞗐","k":1} +{"g":"single","s":"𞗭","k":1} +{"g":"single","s":"𞗮","k":0} +{"g":"single","s":"𞗯","k":0} +{"g":"single","s":"𞗰","k":1} +{"g":"single","s":"𞛀","k":1} +{"g":"single","s":"𞛞","k":1} +{"g":"single","s":"𞛠","k":1} +{"g":"single","s":"𞛢","k":1} +{"g":"single","s":"𞛣","k":0} +{"g":"single","s":"𞛤","k":1} +{"g":"single","s":"𞛥","k":1} +{"g":"single","s":"𞛦","k":0} +{"g":"single","s":"𞛧","k":1} +{"g":"single","s":"𞛭","k":1} +{"g":"single","s":"𞛮","k":0} +{"g":"single","s":"𞛯","k":0} +{"g":"single","s":"𞛰","k":1} +{"g":"single","s":"𞛴","k":1} +{"g":"single","s":"𞛵","k":0} +{"g":"single","s":"𞛾","k":1} +{"g":"single","s":"𞛿","k":1} +{"g":"single","s":"𞟠","k":1} +{"g":"single","s":"𞟦","k":1} +{"g":"single","s":"𞟨","k":1} +{"g":"single","s":"𞟫","k":1} +{"g":"single","s":"𞟭","k":1} +{"g":"single","s":"𞟮","k":1} +{"g":"single","s":"𞟰","k":1} +{"g":"single","s":"𞟾","k":1} +{"g":"single","s":"𞠀","k":1} +{"g":"single","s":"𞠯","k":1} +{"g":"single","s":"𞣄","k":1} +{"g":"single","s":"𞣐","k":0} +{"g":"single","s":"𞣒","k":0} +{"g":"single","s":"𞣖","k":0} +{"g":"single","s":"𞤀","l":"𞤢","k":3} +{"g":"single","s":"𞤡","l":"𞥃","k":3} +{"g":"single","s":"𞥃","k":1} +{"g":"single","s":"𞥄","k":0} +{"g":"single","s":"𞥇","k":0} +{"g":"single","s":"𞥋","k":1} +{"g":"single","s":"𞸀","k":1} +{"g":"single","s":"𞸃","k":1} +{"g":"single","s":"𞸅","k":1} +{"g":"single","s":"𞸟","k":1} +{"g":"single","s":"𞸡","k":1} +{"g":"single","s":"𞸢","k":1} +{"g":"single","s":"𞸤","k":1} +{"g":"single","s":"𞸧","k":1} +{"g":"single","s":"𞸩","k":1} +{"g":"single","s":"𞸲","k":1} +{"g":"single","s":"𞸴","k":1} +{"g":"single","s":"𞸷","k":1} +{"g":"single","s":"𞸹","k":1} +{"g":"single","s":"𞸻","k":1} +{"g":"single","s":"𞹂","k":1} +{"g":"single","s":"𞹇","k":1} +{"g":"single","s":"𞹉","k":1} +{"g":"single","s":"𞹋","k":1} +{"g":"single","s":"𞹍","k":1} +{"g":"single","s":"𞹏","k":1} +{"g":"single","s":"𞹑","k":1} +{"g":"single","s":"𞹒","k":1} +{"g":"single","s":"𞹔","k":1} +{"g":"single","s":"𞹗","k":1} +{"g":"single","s":"𞹙","k":1} +{"g":"single","s":"𞹛","k":1} +{"g":"single","s":"𞹝","k":1} +{"g":"single","s":"𞹟","k":1} +{"g":"single","s":"𞹡","k":1} +{"g":"single","s":"𞹢","k":1} +{"g":"single","s":"𞹤","k":1} +{"g":"single","s":"𞹧","k":1} +{"g":"single","s":"𞹪","k":1} +{"g":"single","s":"𞹬","k":1} +{"g":"single","s":"𞹲","k":1} +{"g":"single","s":"𞹴","k":1} +{"g":"single","s":"𞹷","k":1} +{"g":"single","s":"𞹹","k":1} +{"g":"single","s":"𞹼","k":1} +{"g":"single","s":"𞹾","k":1} +{"g":"single","s":"𞺀","k":1} +{"g":"single","s":"𞺉","k":1} +{"g":"single","s":"𞺋","k":1} +{"g":"single","s":"𞺛","k":1} +{"g":"single","s":"𞺡","k":1} +{"g":"single","s":"𞺣","k":1} +{"g":"single","s":"𞺥","k":1} +{"g":"single","s":"𞺩","k":1} +{"g":"single","s":"𞺫","k":1} +{"g":"single","s":"𞺻","k":1} +{"g":"single","s":"🄰","k":0} +{"g":"single","s":"🅉","k":0} +{"g":"single","s":"🅐","k":0} +{"g":"single","s":"🅩","k":0} +{"g":"single","s":"🅰","k":0} +{"g":"single","s":"🆉","k":0} +{"g":"single","s":"🏻","k":0} +{"g":"single","s":"🏿","k":0} +{"g":"single","s":"🮶","k":0} +{"g":"single","s":"𠀀","k":1} +{"g":"single","s":"𠼽","k":1} +{"g":"single","s":"𢋄","k":1} +{"g":"single","s":"𣙋","k":1} +{"g":"single","s":"𤧒","k":1} +{"g":"single","s":"𥵙","k":1} +{"g":"single","s":"𧃠","k":1} +{"g":"single","s":"𨑧","k":1} +{"g":"single","s":"𩟮","k":1} +{"g":"single","s":"𪛟","k":1} +{"g":"single","s":"𪜀","k":1} +{"g":"single","s":"𪭵","k":1} +{"g":"single","s":"𫠝","k":1} +{"g":"single","s":"𫠠","k":1} +{"g":"single","s":"𫻼","k":1} +{"g":"single","s":"𬺭","k":1} +{"g":"single","s":"𬺰","k":1} +{"g":"single","s":"𭊃","k":1} +{"g":"single","s":"𮘊","k":1} +{"g":"single","s":"𮯠","k":1} +{"g":"single","s":"𮯰","k":1} +{"g":"single","s":"𮹝","k":1} +{"g":"single","s":"丽","c":"丽","d":"丽","k":1} +{"g":"single","s":"侮","c":"侮","d":"侮","k":1} +{"g":"single","s":"𠘺","c":"𠘺","d":"𠘺","k":1} +{"g":"single","s":"再","c":"再","d":"再","k":1} +{"g":"single","s":"凵","c":"凵","d":"凵","k":1} +{"g":"single","s":"勇","c":"勇","d":"勇","k":1} +{"g":"single","s":"卑","c":"卑","d":"卑","k":1} +{"g":"single","s":"灰","c":"灰","d":"灰","k":1} +{"g":"single","s":"吸","c":"吸","d":"吸","k":1} +{"g":"single","s":"善","c":"善","d":"善","k":1} +{"g":"single","s":"圗","c":"圗","d":"圗","k":1} +{"g":"single","s":"型","c":"型","d":"型","k":1} +{"g":"single","s":"多","c":"多","d":"多","k":1} +{"g":"single","s":"姘","c":"姘","d":"姘","k":1} +{"g":"single","s":"寃","c":"寃","d":"寃","k":1} +{"g":"single","s":"尢","c":"尢","d":"尢","k":1} +{"g":"single","s":"𡷦","c":"𡷦","d":"𡷦","k":1} +{"g":"single","s":"帨","c":"帨","d":"帨","k":1} +{"g":"single","s":"庶","c":"庶","d":"庶","k":1} +{"g":"single","s":"弢","c":"弢","d":"弢","k":1} +{"g":"single","s":"忍","c":"忍","d":"忍","k":1} +{"g":"single","s":"惇","c":"惇","d":"惇","k":1} +{"g":"single","s":"憤","c":"憤","d":"憤","k":1} +{"g":"single","s":"抱","c":"抱","d":"抱","k":1} +{"g":"single","s":"揤","c":"揤","d":"揤","k":1} +{"g":"single","s":"撝","c":"撝","d":"撝","k":1} +{"g":"single","s":"晉","c":"晉","d":"晉","k":1} +{"g":"single","s":"暜","c":"暜","d":"暜","k":1} +{"g":"single","s":"𣏃","c":"𣏃","d":"𣏃","k":1} +{"g":"single","s":"栟","c":"栟","d":"栟","k":1} +{"g":"single","s":"櫛","c":"櫛","d":"櫛","k":1} +{"g":"single","s":"殺","c":"殺","d":"殺","k":1} +{"g":"single","s":"泍","c":"泍","d":"泍","k":1} +{"g":"single","s":"涅","c":"涅","d":"涅","k":1} +{"g":"single","s":"𣻑","c":"𣻑","d":"𣻑","k":1} +{"g":"single","s":"瀛","c":"瀛","d":"瀛","k":1} +{"g":"single","s":"𤉣","c":"𤉣","d":"𤉣","k":1} +{"g":"single","s":"犕","c":"犕","d":"犕","k":1} +{"g":"single","s":"㺸","c":"㺸","d":"㺸","k":1} +{"g":"single","s":"𤰶","c":"𤰶","d":"𤰶","k":1} +{"g":"single","s":"𥁄","c":"𥁄","d":"𥁄","k":1} +{"g":"single","s":"眞","c":"眞","d":"眞","k":1} +{"g":"single","s":"𥐝","c":"𥐝","d":"𥐝","k":1} +{"g":"single","s":"𥛅","c":"𥛅","d":"𥛅","k":1} +{"g":"single","s":"𥪧","c":"𥪧","d":"𥪧","k":1} +{"g":"single","s":"𥲀","c":"𥲀","d":"𥲀","k":1} +{"g":"single","s":"䌁","c":"䌁","d":"䌁","k":1} +{"g":"single","s":"𦋙","c":"𦋙","d":"𦋙","k":1} +{"g":"single","s":"聠","c":"聠","d":"聠","k":1} +{"g":"single","s":"脾","c":"脾","d":"脾","k":1} +{"g":"single","s":"辞","c":"辞","d":"辞","k":1} +{"g":"single","s":"芝","c":"芝","d":"芝","k":1} +{"g":"single","s":"芽","c":"芽","d":"芽","k":1} +{"g":"single","s":"莽","c":"莽","d":"莽","k":1} +{"g":"single","s":"𦵫","c":"𦵫","d":"𦵫","k":1} +{"g":"single","s":"𦼬","c":"𦼬","d":"𦼬","k":1} +{"g":"single","s":"虧","c":"虧","d":"虧","k":1} +{"g":"single","s":"蝫","c":"蝫","d":"蝫","k":1} +{"g":"single","s":"𧙧","c":"𧙧","d":"𧙧","k":1} +{"g":"single","s":"䚾","c":"䚾","d":"䚾","k":1} +{"g":"single","s":"賁","c":"賁","d":"賁","k":1} +{"g":"single","s":"𠣞","c":"𠣞","d":"𠣞","k":1} +{"g":"single","s":"𨜮","c":"𨜮","d":"𨜮","k":1} +{"g":"single","s":"𨯺","c":"𨯺","d":"𨯺","k":1} +{"g":"single","s":"霣","c":"霣","d":"霣","k":1} +{"g":"single","s":"𩒖","c":"𩒖","d":"𩒖","k":1} +{"g":"single","s":"馧","c":"馧","d":"馧","k":1} +{"g":"single","s":"䳎","c":"䳎","d":"䳎","k":1} +{"g":"single","s":"麻","c":"麻","d":"麻","k":1} +{"g":"single","s":"𪘀","c":"𪘀","d":"𪘀","k":1} +{"g":"single","s":"𰀀","k":1} +{"g":"single","s":"𰴘","k":1} +{"g":"single","s":"𱍊","k":1} +{"g":"single","s":"𱍐","k":1} +{"g":"single","s":"𲂟","k":1} +{"g":"single","s":"𳐦","k":1} +{"g":"single","s":"𳑹","k":1} +{"g":"single","s":"𴞭","k":0} +{"g":"single","s":"𵬴","k":0} +{"g":"single","s":"𶺻","k":0} +{"g":"single","s":"𸉂","k":0} +{"g":"single","s":"𹗉","k":0} +{"g":"single","s":"𺥐","k":0} +{"g":"single","s":"𻳗","k":0} +{"g":"single","s":"𽁞","k":0} +{"g":"single","s":"𾏥","k":0} +{"g":"single","s":"𿝬","k":0} +{"g":"single","s":"񀫳","k":0} +{"g":"single","s":"񁹺","k":0} +{"g":"single","s":"񃈁","k":0} +{"g":"single","s":"񄖈","k":0} +{"g":"single","s":"񅤏","k":0} +{"g":"single","s":"񆲖","k":0} +{"g":"single","s":"񈀝","k":0} +{"g":"single","s":"񉎤","k":0} +{"g":"single","s":"񊜫","k":0} +{"g":"single","s":"񋪲","k":0} +{"g":"single","s":"񌸹","k":0} +{"g":"single","s":"񎇀","k":0} +{"g":"single","s":"񏕇","k":0} +{"g":"single","s":"񐣎","k":0} +{"g":"single","s":"񑱕","k":0} +{"g":"single","s":"񒿜","k":0} +{"g":"single","s":"񔍣","k":0} +{"g":"single","s":"񕛪","k":0} +{"g":"single","s":"񖩱","k":0} +{"g":"single","s":"񗷸","k":0} +{"g":"single","s":"񙅿","k":0} +{"g":"single","s":"񚔆","k":0} +{"g":"single","s":"񛢍","k":0} +{"g":"single","s":"񜰔","k":0} +{"g":"single","s":"񝾛","k":0} +{"g":"single","s":"񟌢","k":0} +{"g":"single","s":"񠚩","k":0} +{"g":"single","s":"񡨰","k":0} +{"g":"single","s":"񢶷","k":0} +{"g":"single","s":"񤄾","k":0} +{"g":"single","s":"񥓅","k":0} +{"g":"single","s":"񦡌","k":0} +{"g":"single","s":"񧯓","k":0} +{"g":"single","s":"񨽚","k":0} +{"g":"single","s":"񪋡","k":0} +{"g":"single","s":"񫙨","k":0} +{"g":"single","s":"񬧯","k":0} +{"g":"single","s":"񭵶","k":0} +{"g":"single","s":"񯃽","k":0} +{"g":"single","s":"񰒄","k":0} +{"g":"single","s":"񱠋","k":0} +{"g":"single","s":"񲮒","k":0} +{"g":"single","s":"񳼙","k":0} +{"g":"single","s":"񵊠","k":0} +{"g":"single","s":"񶘧","k":0} +{"g":"single","s":"񷦮","k":0} +{"g":"single","s":"񸴵","k":0} +{"g":"single","s":"񺂼","k":0} +{"g":"single","s":"񻑃","k":0} +{"g":"single","s":"񼟊","k":0} +{"g":"single","s":"񽭑","k":0} +{"g":"single","s":"񾻘","k":0} +{"g":"single","s":"򀉟","k":0} +{"g":"single","s":"򁗦","k":0} +{"g":"single","s":"򂥭","k":0} +{"g":"single","s":"򃳴","k":0} +{"g":"single","s":"򅁻","k":0} +{"g":"single","s":"򆐂","k":0} +{"g":"single","s":"򇞉","k":0} +{"g":"single","s":"򈬐","k":0} +{"g":"single","s":"򉺗","k":0} +{"g":"single","s":"򋈞","k":0} +{"g":"single","s":"򌖥","k":0} +{"g":"single","s":"򍤬","k":0} +{"g":"single","s":"򎲳","k":0} +{"g":"single","s":"򐀺","k":0} +{"g":"single","s":"򑏁","k":0} +{"g":"single","s":"򒝈","k":0} +{"g":"single","s":"򓫏","k":0} +{"g":"single","s":"򔹖","k":0} +{"g":"single","s":"򖇝","k":0} +{"g":"single","s":"򗕤","k":0} +{"g":"single","s":"򘣫","k":0} +{"g":"single","s":"򙱲","k":0} +{"g":"single","s":"򚿹","k":0} +{"g":"single","s":"򜎀","k":0} +{"g":"single","s":"򝜇","k":0} +{"g":"single","s":"򞪎","k":0} +{"g":"single","s":"򟸕","k":0} +{"g":"single","s":"򡆜","k":0} +{"g":"single","s":"򢔣","k":0} +{"g":"single","s":"򣢪","k":0} +{"g":"single","s":"򤰱","k":0} +{"g":"single","s":"򥾸","k":0} +{"g":"single","s":"򧌿","k":0} +{"g":"single","s":"򨛆","k":0} +{"g":"single","s":"򩩍","k":0} +{"g":"single","s":"򪷔","k":0} +{"g":"single","s":"򬅛","k":0} +{"g":"single","s":"򭓢","k":0} +{"g":"single","s":"򮡩","k":0} +{"g":"single","s":"򯯰","k":0} +{"g":"single","s":"򰽷","k":0} +{"g":"single","s":"򲋾","k":0} +{"g":"single","s":"򳚅","k":0} +{"g":"single","s":"򴨌","k":0} +{"g":"single","s":"򵶓","k":0} +{"g":"single","s":"򷄚","k":0} +{"g":"single","s":"򸒡","k":0} +{"g":"single","s":"򹠨","k":0} +{"g":"single","s":"򺮯","k":0} +{"g":"single","s":"򻼶","k":0} +{"g":"single","s":"򽊽","k":0} +{"g":"single","s":"򾙄","k":0} +{"g":"single","s":"򿧋","k":0} +{"g":"single","s":"󀵒","k":0} +{"g":"single","s":"󂃙","k":0} +{"g":"single","s":"󃑠","k":0} +{"g":"single","s":"󄟧","k":0} +{"g":"single","s":"󅭮","k":0} +{"g":"single","s":"󆻵","k":0} +{"g":"single","s":"󈉼","k":0} +{"g":"single","s":"󉘃","k":0} +{"g":"single","s":"󊦊","k":0} +{"g":"single","s":"󋴑","k":0} +{"g":"single","s":"󍂘","k":0} +{"g":"single","s":"󎐟","k":0} +{"g":"single","s":"󏞦","k":0} +{"g":"single","s":"󐬭","k":0} +{"g":"single","s":"󑺴","k":0} +{"g":"single","s":"󓈻","k":0} +{"g":"single","s":"󔗂","k":0} +{"g":"single","s":"󕥉","k":0} +{"g":"single","s":"󖳐","k":0} +{"g":"single","s":"󘁗","k":0} +{"g":"single","s":"󙏞","k":0} +{"g":"single","s":"󚝥","k":0} +{"g":"single","s":"󛫬","k":0} +{"g":"single","s":"󜹳","k":0} +{"g":"single","s":"󞇺","k":0} +{"g":"single","s":"󟖁","k":0} +{"g":"single","s":"󠀁","k":0} +{"g":"single","s":"󠀠","k":0} +{"g":"single","s":"󠁿","k":0} +{"g":"single","s":"󠄀","k":0} +{"g":"single","s":"󠇯","k":0} +{"g":"single","s":"󠤈","k":0} +{"g":"single","s":"󡲏","k":0} +{"g":"single","s":"󣀖","k":0} +{"g":"single","s":"󤎝","k":0} +{"g":"single","s":"󥜤","k":0} +{"g":"single","s":"󦪫","k":0} +{"g":"single","s":"󧸲","k":0} +{"g":"single","s":"󩆹","k":0} +{"g":"single","s":"󪕀","k":0} +{"g":"single","s":"󫣇","k":0} +{"g":"single","s":"󬱎","k":0} +{"g":"single","s":"󭿕","k":0} +{"g":"single","s":"󯍜","k":0} +{"g":"single","s":"󰛣","k":0} +{"g":"single","s":"󱩪","k":0} +{"g":"single","s":"󲷱","k":0} +{"g":"single","s":"󴅸","k":0} +{"g":"single","s":"󵓿","k":0} +{"g":"single","s":"󶢆","k":0} +{"g":"single","s":"󷰍","k":0} +{"g":"single","s":"󸾔","k":0} +{"g":"single","s":"󺌛","k":0} +{"g":"single","s":"󻚢","k":0} +{"g":"single","s":"󼨩","k":0} +{"g":"single","s":"󽶰","k":0} +{"g":"single","s":"󿄷","k":0} +{"g":"single","s":"􀒾","k":0} +{"g":"single","s":"􁡅","k":0} +{"g":"single","s":"􂯌","k":0} +{"g":"single","s":"􃽓","k":0} +{"g":"single","s":"􅋚","k":0} +{"g":"single","s":"􆙡","k":0} +{"g":"single","s":"􇧨","k":0} +{"g":"single","s":"􈵯","k":0} +{"g":"single","s":"􊃶","k":0} +{"g":"single","s":"􋑽","k":0} +{"g":"single","s":"􌠄","k":0} +{"g":"single","s":"􍮋","k":0} +{"g":"single","s":"􎼒","k":0} +{"g":"pair+base","s":"ωۨ𞄱"} +{"g":"pair+base","s":"A꙽︢","l":"a꙽︢"} +{"g":"pair+base","s":"ا᷎࿆","c":"ا᷎࿆","d":"ا᷎࿆"} +{"g":"pair+base","s":"α഼࢘"} +{"g":"pair+base","s":"A𖫴ࣖ","l":"a𖫴ࣖ"} +{"g":"pair+base","s":"ω̳̄"} +{"g":"pair+base","s":"и゙𞥅"} +{"g":"pair+base","s":"oⷦ𞀧"} +{"g":"pair+base","s":"eִ྇","c":"eִ྇","d":"eִ྇"} +{"g":"pair+base","s":"uֲ᪵","c":"uֲ᪵","d":"uֲ᪵"} +{"g":"pair+base","s":"и݂͟"} +{"g":"pair+base","s":"и᳦𐽎","c":"и᳦𐽎","d":"и᳦𐽎"} +{"g":"pair+base","s":"ωܴࠬ","c":"ωܴࠬ","d":"ωܴࠬ"} +{"g":"pair+base","s":"゙᷺᷏","c":"゙᷺᷏","d":"゙᷺᷏"} +{"g":"pair+base","s":"اᷤ꣧"} +{"g":"pair+base","s":"u֪݉"} +{"g":"pair+base","s":"u𑚷۬"} +{"g":"pair+base","s":"ا͎ᷓ"} +{"g":"pair+base","s":"u༵𞀈","c":"u༵𞀈","d":"u༵𞀈"} +{"g":"pair+base","s":"ω𑄳ۧ"} +{"g":"pair+base","s":"א᯦᪺"} +{"g":"pair+base","s":"ω຺ۚ","c":"ω຺ۚ","d":"ω຺ۚ"} +{"g":"pair+base","s":"A𑏏ౖ","l":"a𑏏ౖ"} +{"g":"pair+base","s":"uᷪ𞄰"} +{"g":"pair+base","s":"u్꣠","c":"u్꣠","d":"u్꣠"} +{"g":"pair+base","s":"α߬॔"} +{"g":"pair+base","s":"α়ᷧ","c":"α়ᷧ","d":"α়ᷧ"} +{"g":"pair+base","s":"A᳭⃰","c":"A᳭⃰","d":"A᳭⃰","l":"a᳭⃰"} +{"g":"pair+base","s":"и̶̐","c":"и̶̐","d":"и̶̐"} +{"g":"pair+base","s":"α𖫴ꙺ"} +{"g":"pair+base","s":"eࠠ᩻"} +{"g":"pair+base","s":"e᭮ⷫ"} +{"g":"pair+base","s":"и಼֩"} +{"g":"pair+base","s":"େ⃥𑄳"} +{"g":"pair+base","s":"ȍ𑍪","c":"ȍ𑍪"} +{"g":"pair+base","s":"゙̭᭫"} +{"g":"pair+base","s":"o𑁿֧","c":"o𑁿֧","d":"o𑁿֧"} +{"g":"pair+base","s":"oࠣ᷶"} +{"g":"pair+base","s":"и݁ؕ"} +{"g":"pair+base","s":"𐨹゙͉","c":"𐨹゙͉","d":"𐨹゙͉"} +{"g":"pair+base","s":"a𑍍̳","c":"a𑍍̳","d":"a𑍍̳"} +{"g":"pair+base","s":"א᫚ⷩ"} +{"g":"pair+base","s":"αོ̽","c":"αོ̽","d":"αོ̽"} +{"g":"pair+base","s":"ω࣎ꪰ"} +{"g":"pair+base","s":"ω᮫𞀈","c":"ω᮫𞀈","d":"ω᮫𞀈"} +{"g":"pair+base","s":"a຺𞗮"} +{"g":"pair+base","s":"ᄀࣣࣤ"} +{"g":"pair+base","s":"e࢞࣎"} +{"g":"pair+base","s":"אࣰ᭰"} +{"g":"pair+base","s":"ᄀุ࣡","c":"ᄀุ࣡","d":"ᄀุ࣡"} +{"g":"pair+base","s":"α𑏎ۖ"} +{"g":"pair+base","s":"a̓𝆫"} +{"g":"pair+base","s":"e̮ͦ"} +{"g":"pair+base","s":"A᯳ᷞ","l":"a᯳ᷞ"} +{"g":"pair+base","s":"ωᷔ᫡"} +{"g":"pair+base","s":"א꯭𖬲"} +{"g":"pair+base","s":"A̸॒","c":"A̸॒","d":"A̸॒","l":"a̸॒"} +{"g":"pair+base","s":"u࣏࣋","c":"u࣏࣋","d":"u࣏࣋"} +{"g":"pair+base","s":"u̼ᷧ"} +{"g":"pair+base","s":"Aֻࣘ","l":"aֻࣘ"} +{"g":"pair+base","s":"େ꣮͑"} +{"g":"pair+base","s":"ا𑏐ࣱ"} +{"g":"pair+base","s":"Aֺ𞀡","c":"Aֺ𞀡","d":"Aֺ𞀡","l":"aֺ𞀡"} +{"g":"pair+base","s":"େ𑶗ࠠ"} +{"g":"pair+base","s":"Aꙻ᤺","l":"aꙻ᤺"} +{"g":"pair+base","s":"Aᫍ̉","l":"aᫍ̉"} +{"g":"pair+base","s":"Aۣᷓ","c":"Aۣᷓ","d":"Aۣᷓ","l":"aۣᷓ"} +{"g":"pair+base","s":"ω𝆆𑑞"} +{"g":"pair+base","s":"େ꣩᷇"} +{"g":"pair+base","s":"ω𑵄ᷢ","c":"ω𑵄ᷢ","d":"ω𑵄ᷢ"} +{"g":"pair+base","s":"اܻ𞀝","c":"اܻ𞀝","d":"اܻ𞀝"} +{"g":"pair+base","s":"o⃦𐍷"} +{"g":"pair+base","s":"A𖬱𞓬","l":"a𖬱𞓬"} +{"g":"pair+base","s":"େ̷ܰ","c":"େ̷ܰ","d":"େ̷ܰ"} +{"g":"pair+base","s":"u࣐ᷨ"} +{"g":"pair+base","s":"αꙷⷦ"} +{"g":"pair+base","s":"A̺ࣩ","l":"a̺ࣩ"} +{"g":"pair+base","s":"A࡛᪲","c":"A࡛᪲","d":"A࡛᪲","l":"a࡛᪲"} +{"g":"pair+base","s":"αܱ֧"} +{"g":"pair+base","s":"и꥓𞀔","c":"и꥓𞀔","d":"и꥓𞀔"} +{"g":"pair+base","s":"и๊̡"} +{"g":"pair+base","s":"א্ⷰ"} +{"g":"pair+base","s":"a𐻾࢚"} +{"g":"pair+base","s":"u꤬᫈","c":"u꤬᫈","d":"u꤬᫈"} +{"g":"pair+base","s":"a𑍴𑍲"} +{"g":"pair+base","s":"ا॒ۙ"} +{"g":"pair+base","s":"α𐨿᷐","c":"α𐨿᷐","d":"α𐨿᷐"} +{"g":"pair+base","s":"ωࣙ᫔"} +{"g":"pair+base","s":"aⷾ۠"} +{"g":"pair+base","s":"a৾ٙ"} +{"g":"pair+base","s":"e᷋࣋"} +{"g":"pair+base","s":"α𞛮֑","c":"α֑𞛮","d":"α֑𞛮"} +{"g":"pair+base","s":"u͉𞀋"} +{"g":"pair+base","s":"့゙ᷩ","c":"့゙ᷩ","d":"့゙ᷩ"} +{"g":"pair+base","s":"o𑤽้","c":"o𑤽้","d":"o𑤽้"} +{"g":"pair+base","s":"ωﬞ𞓭","c":"ωﬞ𞓭","d":"ωﬞ𞓭"} +{"g":"pair+base","s":"и᫝𞀒"} +{"g":"pair+base","s":"o𐻻࣏"} +{"g":"pair+base","s":"ᄀ̰̅"} +{"g":"pair+base","s":"a𝆊̓"} +{"g":"pair+base","s":"ą𞀛","c":"ą𞀛","d":"ą𞀛"} +{"g":"pair+base","s":"ᄀౖ᳑","c":"ᄀౖ᳑","d":"ᄀౖ᳑"} +{"g":"pair+base","s":"ᄀⷧ̅"} +{"g":"pair+base","s":"e᳚͟"} +{"g":"pair+base","s":"ᄀ𞣕ⷺ"} +{"g":"pair+base","s":"o̖𞋮","c":"o̖𞋮","d":"o̖𞋮"} +{"g":"pair+base","s":"и𝆊ⷬ","c":"и𝆊ⷬ","d":"и𝆊ⷬ"} +{"g":"pair+base","s":"α्ׂ","c":"α्ׂ","d":"α्ׂ"} +{"g":"pair+base","s":"େ̄̄"} +{"g":"pair+base","s":"େ꣩︮"} +{"g":"pair+base","s":"େ݅ࣕ"} +{"g":"pair+base","s":"ωࠠ॓"} +{"g":"pair+base","s":"ا᷺ࣵ"} +{"g":"pair+base","s":"Aۛ᩹","l":"aۛ᩹"} +{"g":"pair+base","s":"ω᪻𞥉"} +{"g":"pair+base","s":"A𐽉𞀘","l":"a𐽉𞀘"} +{"g":"pair+base","s":"א𑁰𑍳"} +{"g":"pair+base","s":"u𖫴𐇽","c":"u𖫴𐇽","d":"u𖫴𐇽"} +{"g":"pair+base","s":"и𖿰𐴦","c":"и𖿰𐴦","d":"и𖿰𐴦"} +{"g":"pair+base","s":"u໊ࣘ"} +{"g":"pair+base","s":"α᳭𞀦"} +{"g":"pair+base","s":"αٕ꣬"} +{"g":"pair+base","s":"α᰷𑽂","c":"α᰷𑽂","d":"α᰷𑽂"} +{"g":"pair+base","s":"α᷻𝆇"} +{"g":"pair+base","s":"اﬞ̎","c":"اﬞ̎","d":"اﬞ̎"} +{"g":"pair+base","s":"ω𑤾᫨"} +{"g":"pair+base","s":"и̖꣮","c":"и̖꣮","d":"и̖꣮"} +{"g":"pair+base","s":"őࣘ","c":"őࣘ"} +{"g":"pair+base","s":"େ᫙߬"} +{"g":"pair+base","s":"u᫐֭","c":"u֭᫐","d":"u֭᫐"} +{"g":"pair+base","s":"א𐽎᫁","c":"א𐽎᫁","d":"א𐽎᫁"} +{"g":"pair+base","s":"a఼္","c":"a఼္","d":"a఼္"} +{"g":"pair+base","s":"א𖬶𖬳"} +{"g":"pair+base","s":"u᪺̒"} +{"g":"pair+base","s":"α֚᫫"} +{"g":"pair+base","s":"ا᳟֕"} +{"g":"pair+base","s":"ا๋᷐","c":"ا๋᷐","d":"ا๋᷐"} +{"g":"pair+base","s":"ا꠆်"} +{"g":"pair+base","s":"e͋𐺫"} +{"g":"pair+base","s":"u͒ꪷ"} +{"g":"pair+base","s":"α᫤᬴","c":"α᬴᫤","d":"α᬴᫤"} +{"g":"pair+base","s":"eֳ͒","c":"eֳ͒","d":"eֳ͒"} +{"g":"pair+base","s":"ᄀ̝҄","c":"ᄀ̝҄","d":"ᄀ̝҄"} +{"g":"pair+base","s":"o𝆊𝆬"} +{"g":"pair+base","s":"eֽ֝"} +{"g":"pair+base","s":"α𑗀⵿"} +{"g":"pair+base","s":"и𝅾᫕"} +{"g":"pair+base","s":"ả̃","c":"ả̃"} +{"g":"pair+base","s":"αࣚ𞛮"} +{"g":"pair+base","s":"゙᳭ⷬ"} +{"g":"pair+base","s":"א𐻽֜","c":"א𐻽֜","d":"א𐻽֜"} +{"g":"pair+base","s":"ᄀ᪷⃧","c":"ᄀ᪷⃧","d":"ᄀ᪷⃧"} +{"g":"pair+base","s":"ᄀ𞀧𖬵"} +{"g":"pair+base","s":"o𑑂̦"} +{"g":"pair+base","s":"u᮪︧"} +{"g":"pair+base","s":"a᳞᷑","c":"a᳞᷑","d":"a᳞᷑"} +{"g":"pair+base","s":"େ⃫𞀞","c":"େ⃫𞀞","d":"େ⃫𞀞"} +{"g":"pair+base","s":"и𑥃̝"} +{"g":"pair+base","s":"A࠙॑","l":"a࠙॑"} +{"g":"pair+base","s":"ᄀࣼ𞀟"} +{"g":"pair+base","s":"゙𐴦͝","c":"゙𐴦͝","d":"゙𐴦͝"} +{"g":"pair+base","s":"e᳑͌"} +{"g":"pair+base","s":"oᨘᷢ","c":"oᨘᷢ","d":"oᨘᷢ"} +{"g":"pair+base","s":"o𞥆ꪲ"} +{"g":"pair+base","s":"ᄀ𝆊࣎"} +{"g":"pair+base","s":"゙᭭ᷕ"} +{"g":"pair+base","s":"eֲ̔"} +{"g":"pair+base","s":"и𞣒۪"} +{"g":"pair+base","s":"a𑍍̦"} +{"g":"pair+base","s":"и𞄵ᷖ"} +{"g":"pair+base","s":"ᄀͯ𞀤"} +{"g":"pair+base","s":"゙݈ᷟ"} +{"g":"pair+base","s":"ا֭︮","c":"ا֭︮","d":"ا֭︮"} +{"g":"pair+base","s":"א𞀃𑄂"} +{"g":"pair+base","s":"େ᪶ᫍ"} +{"g":"pair+base","s":"େ̆᭳"} +{"g":"pair+base","s":"゙່᫄","c":"゙່᫄","d":"゙່᫄"} +{"g":"pair+base","s":"ωູ⃑"} +{"g":"pair+base","s":"ω⃨᷆","c":"ω⃨᷆","d":"ω⃨᷆"} +{"g":"pair+base","s":"ᄀ̉ࣳ"} +{"g":"pair+base","s":"o𑪙࠭","c":"o𑪙࠭","d":"o𑪙࠭"} +{"g":"pair+base","s":"e꫁࣬"} +{"g":"pair+base","s":"и༹ܽ","c":"и༹ܽ","d":"и༹ܽ"} +{"g":"pair+base","s":"αꚞ́"} +{"g":"pair+base","s":"ا᫊ࠫ"} +{"g":"pair+base","s":"ا𑧠ࣶ","c":"ا𑧠ࣶ","d":"ا𑧠ࣶ"} +{"g":"pair+base","s":"ا𑠹ࢗ"} +{"g":"pair+base","s":"e𑧠֘"} +{"g":"pair+base","s":"A𝅯᩻","l":"a𝅯᩻"} +{"g":"pair+base","s":"゙̯𐵩","c":"゙̯𐵩","d":"゙̯𐵩"} +{"g":"pair+base","s":"ω᫝᳸"} +{"g":"pair+base","s":"ا𞣒ᷠ","c":"ا𞣒ᷠ","d":"ا𞣒ᷠ"} +{"g":"pair+base","s":"α࣏〫"} +{"g":"pair+base","s":"ᄀ᪴᫪"} +{"g":"pair+base","s":"u︨ⷩ"} +{"g":"pair+base","s":"א𐻺ⷤ"} +{"g":"pair+base","s":"и̝ⷱ","c":"и̝ⷱ","d":"и̝ⷱ"} +{"g":"pair+base","s":"e𖬲͐"} +{"g":"pair+base","s":"u𝆂֝","c":"u𝆂֝","d":"u𝆂֝"} +{"g":"pair+base","s":"ᄀ𖫳𑑆"} +{"g":"pair+base","s":"ᄀܺ᫚"} +{"g":"pair+base","s":"A𝅲᫫","l":"a𝅲᫫"} +{"g":"pair+base","s":"ω᪲͌"} +{"g":"pair+base","s":"α𑠹̯","c":"α𑠹̯","d":"α𑠹̯"} +{"g":"pair+base","s":"a᪸ࣣ"} +{"g":"pair+base","s":"ا྄𐽎"} +{"g":"pair+base","s":"ü҆","c":"ü҆"} +{"g":"pair+base","s":"゙𑇀̲","c":"゙𑇀̲","d":"゙𑇀̲"} +{"g":"pair+base","s":"େ᯳𞥄","c":"େ᯳𞥄","d":"େ᯳𞥄"} +{"g":"pair+base","s":"u᯲𞄵","c":"u᯲𞄵","d":"u᯲𞄵"} +{"g":"pair+base","s":"א༙𐾄","c":"א༙𐾄","d":"א༙𐾄"} +{"g":"pair+base","s":"e᫝᫚"} +{"g":"pair+base","s":"и֢҆","c":"и֢҆","d":"и֢҆"} +{"g":"pair+base","s":"e𑑞᩺"} +{"g":"pair+base","s":"aࣚͥ"} +{"g":"pair+base","s":"゙္ַ"} +{"g":"pair+base","s":"eཻᫀ","c":"eཻᫀ","d":"eཻᫀ"} +{"g":"pair+base","s":"אؘؒ","c":"אؘؒ","d":"אؘؒ"} +{"g":"pair+base","s":"e𝅨᮪","c":"e𝅨᮪","d":"e𝅨᮪"} +{"g":"pair+base","s":"א᫤𑚶","c":"א𑚶᫤","d":"א𑚶᫤"} +{"g":"pair+base","s":"eٝ᩻"} +{"g":"pair+base","s":"ا𑂹𐾄"} +{"g":"pair+base","s":"uࠬ𞀨"} +{"g":"pair+base","s":"A͈꣪","c":"A͈꣪","d":"A͈꣪","l":"a͈꣪"} +{"g":"pair+base","s":"େ꣰𞄱"} +{"g":"pair+base","s":"゙𝉂᷄"} +{"g":"pair+base","s":"α𞀘ᷣ"} +{"g":"pair+base","s":"א𝅱᫅","c":"א𝅱᫅","d":"א𝅱᫅"} +{"g":"pair+base","s":"ωܼ꣥"} +{"g":"pair+base","s":"େ𐽐𑍩"} +{"g":"pair+base","s":"େ᫖𝅨","c":"େ𝅨᫖","d":"େ𝅨᫖"} +{"g":"pair+base","s":"ا𑇊ཱ"} +{"g":"pair+base","s":"o⃚͇"} +{"g":"pair+base","s":"αᷲ𞀧"} +{"g":"pair+base","s":"ᄀࣱ𐾄","c":"ᄀࣱ𐾄","d":"ᄀࣱ𐾄"} +{"g":"pair+base","s":"ᄀ᭳𞥉"} +{"g":"pair+base","s":"o︪𐍺"} +{"g":"pair+base","s":"Aྀ︭","l":"aྀ︭"} +{"g":"pair+base","s":"a⃜𞀐"} +{"g":"pair+base","s":"゙໊ᷦ","c":"゙໊ᷦ","d":"゙໊ᷦ"} +{"g":"pair+base","s":"u॒𑍨","c":"u॒𑍨","d":"u॒𑍨"} +{"g":"pair+base","s":"α֛𝆈"} +{"g":"pair+base","s":"и्̟"} +{"g":"pair+base","s":"o᳧𑨴","c":"o᳧𑨴","d":"o᳧𑨴"} +{"g":"pair+base","s":"αᫀⷭ","c":"αᫀⷭ","d":"αᫀⷭ"} +{"g":"pair+base","s":"େ֭ᷲ","c":"େ֭ᷲ","d":"େ֭ᷲ"} +{"g":"pair+base","s":"ωͯࣛ"} +{"g":"pair+base","s":"ω֧𐨺"} +{"g":"pair+base","s":"େ⃓ᷬ","c":"େ⃓ᷬ","d":"େ⃓ᷬ"} +{"g":"pair+base","s":"eⷦ᷋"} +{"g":"pair+base","s":"A̯͆","c":"A̯͆","d":"A̯͆","l":"a̯͆"} +{"g":"pair+base","s":"u್࣭","c":"u್࣭","d":"u್࣭"} +{"g":"pair+base","s":"иི྇"} +{"g":"pair+base","s":"e᰷᷸"} +{"g":"pair+base","s":"ᄀ𖿰᳕"} +{"g":"pair+base","s":"େࠦ𞀖"} +{"g":"pair+base","s":"େ𑄁᳚"} +{"g":"pair+base","s":"゙̛֚"} +{"g":"pair+base","s":"A𞀏ͫ","l":"a𞀏ͫ"} +{"g":"pair+base","s":"αࠧ𑄂"} +{"g":"pair+base","s":"ω࣏𖬲"} +{"g":"pair+base","s":"ا֠𑄂"} +{"g":"pair+base","s":"u𑍍𝅱"} +{"g":"pair+base","s":"eؚⷵ","c":"eؚⷵ","d":"eؚⷵ"} +{"g":"pair+base","s":"α֝᫫"} +{"g":"pair+base","s":"uࣻ⃐"} +{"g":"pair+base","s":"اܸ፞","c":"اܸ፞","d":"اܸ፞"} +{"g":"pair+base","s":"א᭄⃭"} +{"g":"pair+base","s":"א࢚֚","c":"א࢚֚","d":"א࢚֚"} +{"g":"pair+base","s":"א𞀪ܲ"} +{"g":"pair+base","s":"и𑇀̑"} +{"g":"pair+base","s":"uྀ᳑"} +{"g":"pair+base","s":"ا್ᷭ"} +{"g":"pair+base","s":"େⷸ᫦","c":"େ᫦ⷸ","d":"େ᫦ⷸ"} +{"g":"pair+base","s":"゙ࠧ᪰"} +{"g":"pair+base","s":"a̠ࣔ","c":"a̠ࣔ","d":"a̠ࣔ"} +{"g":"pair+base","s":"اܴ̋"} +{"g":"pair+base","s":"ω̒᩻"} +{"g":"pair+base","s":"େ֪ۨ","c":"େ֪ۨ","d":"େ֪ۨ"} +{"g":"pair+base","s":"u்꣦","c":"u்꣦","d":"u்꣦"} +{"g":"pair+base","s":"゙໊ࠬ","c":"゙໊ࠬ","d":"゙໊ࠬ"} +{"g":"pair+base","s":"゙𐵬𝆪"} +{"g":"pair+base","s":"゙⃭ࠫ"} +{"g":"pair+base","s":"゙𐴧𞀔"} +{"g":"pair+base","s":"a𑠺𞛵"} +{"g":"pair+base","s":"ᄀ𑵅ࠢ","c":"ᄀ𑵅ࠢ","d":"ᄀ𑵅ࠢ"} +{"g":"pair+base","s":"e𖫴ꙹ","c":"e𖫴ꙹ","d":"e𖫴ꙹ"} +{"g":"pair+base","s":"゙𑓂᷋","c":"゙𑓂᷋","d":"゙𑓂᷋"} +{"g":"pair+base","s":"A࣍𐍶","l":"a࣍𐍶"} +{"g":"pair+base","s":"и֭᭯"} +{"g":"pair+base","s":"a𖫴ᷨ","c":"a𖫴ᷨ","d":"a𖫴ᷨ"} +{"g":"pair+base","s":"иི࢝"} +{"g":"pair+base","s":"u︬֡","c":"u︬֡","d":"u︬֡"} +{"g":"pair+base","s":"u𐾅𞄳","c":"u𐾅𞄳","d":"u𐾅𞄳"} +{"g":"pair+base","s":"゙᳘ܲ"} +{"g":"pair+base","s":"aܷ꣢","c":"aܷ꣢","d":"aܷ꣢"} +{"g":"pair+base","s":"o༹𑍨","c":"o༹𑍨","d":"o༹𑍨"} +{"g":"pair+base","s":"ا᩿֗","c":"ا᩿֗","d":"ا᩿֗"} +{"g":"pair+base","s":"α̵𖄯","c":"α̵𖄯","d":"α̵𖄯"} +{"g":"pair+base","s":"ω॒ۜ","c":"ω॒ۜ","d":"ω॒ۜ"} +{"g":"pair+base","s":"и︬፞"} +{"g":"pair+base","s":"゙𞀁᫖"} +{"g":"pair+base","s":"ا𑇊ܶ"} +{"g":"pair+base","s":"ᄀ𑂹̠","c":"ᄀ𑂹̠","d":"ᄀ𑂹̠"} +{"g":"pair+base","s":"゙ؚ𝆫","c":"゙ؚ𝆫","d":"゙ؚ𝆫"} +{"g":"pair+base","s":"𝅨゙͡","c":"𝅨゙͡","d":"𝅨゙͡"} +{"g":"pair+base","s":"eཱᷪ"} +{"g":"pair+base","s":"oฺ݅","c":"oฺ݅","d":"oฺ݅"} +{"g":"pair+base","s":"и̛𐽌","c":"и̛𐽌","d":"и̛𐽌"} +{"g":"pair+base","s":"ω𞀕𞊮"} +{"g":"pair+base","s":"ᄀ᳴𞗮"} +{"g":"pair+base","s":"u᩵ࠪ"} +{"g":"pair+base","s":"a𝉄᩷"} +{"g":"pair+base","s":"и𑈶͎"} +{"g":"pair+base","s":"e𞥅𝆫"} +{"g":"pair+base","s":"େ᪰ᷩ"} +{"g":"pair+base","s":"େ𞀛᫅"} +{"g":"pair+base","s":"ᄀຸ፟","c":"ᄀຸ፟","d":"ᄀຸ፟"} +{"g":"pair+base","s":"א𝅧𐍶","c":"א𝅧𐍶","d":"א𝅧𐍶"} +{"g":"pair+base","s":"ا᯳̲"} +{"g":"pair+base","s":"ᄀ𑧠ۙ"} +{"g":"pair+base","s":"א֔҇"} +{"g":"pair+base","s":"Ă֯","c":"Ă֯","l":"ă֯"} +{"g":"pair+base","s":"اࣶ𞀟","c":"اࣶ𞀟","d":"اࣶ𞀟"} +{"g":"pair+base","s":"େ᪽᳗"} +{"g":"pair+base","s":"ωؘࠜ"} +{"g":"pair+base","s":"א߮꣬"} +{"g":"pair+base","s":"א֮𖬱"} +{"g":"pair+base","s":"α᳞𖬲"} +{"g":"pair+base","s":"o᷐ׅ","c":"o᷐ׅ","d":"o᷐ׅ"} +{"g":"pair+base","s":"ᄀ⃚̩"} +{"g":"pair+base","s":"א𑗀̝"} +{"g":"pair+base","s":"e⃐̐"} +{"g":"pair+base","s":"A⃪⃨","l":"a⃪⃨"} +{"g":"pair+base","s":"େ𐾄ؐ"} +{"g":"pair+base","s":"uⷱ꙼"} +{"g":"pair+base","s":"o𞥈ܵ"} +{"g":"pair+base","s":"゙ۖࣔ"} +{"g":"pair+base","s":"u᫗𞛣"} +{"g":"pair+base","s":"א𝅾ࠬ"} +{"g":"pair+base","s":"a᫢𑑂","c":"a𑑂᫢","d":"a𑑂᫢"} +{"g":"pair+base","s":"o𞣖ࠥ"} +{"g":"pair+base","s":"α߯᫢"} +{"g":"pair+base","s":"ω𑏐ࣺ","c":"ω𑏐ࣺ","d":"ω𑏐ࣺ"} +{"g":"pair+base","s":"αࠡ𐍸"} +{"g":"pair+base","s":"א᫒𞀛"} +{"g":"pair+base","s":"α᫁֞"} +{"g":"pair+base","s":"ا𑏐֤","c":"ا𑏐֤","d":"ا𑏐֤"} +{"g":"pair+base","s":"େַ𐴤"} +{"g":"pair+base","s":"A఼ᷱ","c":"A఼ᷱ","d":"A఼ᷱ","l":"a఼ᷱ"} +{"g":"pair+base","s":"e᤻ٖ"} +{"g":"pair+base","s":"ω𑏏̝","c":"ω𑏏̝","d":"ω𑏏̝"} +{"g":"pair+base","s":"u𝅲⃬"} +{"g":"pair+base","s":"u𐽇𞀆"} +{"g":"pair+base","s":"A਼࠭","c":"A਼࠭","d":"A਼࠭","l":"a਼࠭"} +{"g":"pair+base","s":"uࠩ᪼"} +{"g":"pair+base","s":"ᄀ𑩇ͯ","c":"ᄀ𑩇ͯ","d":"ᄀ𑩇ͯ"} +{"g":"pair+base","s":"ا֣⃐"} +{"g":"pair+base","s":"a̹ࠛ"} +{"g":"pair+base","s":"ᄀ︦͢"} +{"g":"pair+base","s":"a᯦࢙"} +{"g":"pair+base","s":"α𑁰༹"} +{"g":"pair+base","s":"େ︭̟"} +{"g":"pair+base","s":"ᄀⷽ𐽌"} +{"g":"pair+base","s":"o͈᪲","c":"o͈᪲","d":"o͈᪲"} +{"g":"pair+base","s":"Aͫ॓","l":"aͫ॓"} +{"g":"pair+base","s":"uꪴ𝆉"} +{"g":"pair+base","s":"ᄀ꤬𑍫"} +{"g":"pair+base","s":"اྀ⳰","c":"اྀ⳰","d":"اྀ⳰"} +{"g":"pair+base","s":"ا࣮ᷟ","c":"ا࣮ᷟ","d":"ا࣮ᷟ"} +{"g":"pair+base","s":"α𝆁꣫","c":"α𝆁꣫","d":"α𝆁꣫"} +{"g":"pair+base","s":"e֭ⷣ"} +{"g":"pair+base","s":"ωᷲ𖬰"} +{"g":"pair+base","s":"אⷻͅ","c":"אⷻͅ","d":"אⷻͅ"} +{"g":"pair+base","s":"ا𝅲ࣼ"} +{"g":"pair+base","s":"o᫥𞀦"} +{"g":"pair+base","s":"ω᷏᭯"} +{"g":"pair+base","s":"e̖ࣽ"} +{"g":"pair+base","s":"e़߰","c":"e़߰","d":"e़߰"} +{"g":"pair+base","s":"ا̗ׄ","c":"ا̗ׄ","d":"ا̗ׄ"} +{"g":"pair+base","s":"A༙֖","l":"a༙֖"} +{"g":"pair+base","s":"α᳜ⷺ","c":"α᳜ⷺ","d":"α᳜ⷺ"} +{"g":"pair+base","s":"ω꯭𑄴"} +{"g":"pair+base","s":"ا𐍹ᷣ"} +{"g":"pair+base","s":"o𝆁᪼"} +{"g":"pair+base","s":"େ𖬳𞀣"} +{"g":"pair+base","s":"א𐨹̩","c":"א𐨹̩","d":"א𐨹̩"} +{"g":"pair+base","s":"и𑈵ܷ","c":"и𑈵ܷ","d":"и𑈵ܷ"} +{"g":"pair+base","s":"A𑋪︧","l":"a𑋪︧"} +{"g":"pair+base","s":"ω᳣۪","c":"ω᳣۪","d":"ω᳣۪"} +{"g":"pair+base","s":"и⃓ⷧ","c":"и⃓ⷧ","d":"и⃓ⷧ"} +{"g":"pair+base","s":"ᄀ๋ٗ"} +{"g":"pair+base","s":"aᷥꙸ"} +{"g":"pair+base","s":"اᷢ͛"} +{"g":"pair+base","s":"اཱꙴ"} +{"g":"pair+base","s":"o⃬𐵫","c":"o⃬𐵫","d":"o⃬𐵫"} +{"g":"pair+base","s":"o͇ⷧ"} +{"g":"pair+base","s":"ا𐨺٘","c":"ا𐨺٘","d":"ا𐨺٘"} +{"g":"pair+base","s":"ᄀ֑᳴","c":"ᄀ֑᳴","d":"ᄀ֑᳴"} +{"g":"pair+base","s":"େ̊ࣻ"} +{"g":"pair+base","s":"ᄀܹ𖬱","c":"ᄀܹ𖬱","d":"ᄀܹ𖬱"} +{"g":"pair+base","s":"゙︬ⷪ","c":"゙︬ⷪ","d":"゙︬ⷪ"} +{"g":"pair+base","s":"ا̢᳞"} +{"g":"pair+base","s":"α᳨᫑"} +{"g":"pair+base","s":"и𐨺𞀈"} +{"g":"pair+base","s":"αᷥ᷻"} +{"g":"pair+base","s":"u゚⃨","c":"u゚⃨","d":"u゚⃨"} +{"g":"pair+base","s":"ơࣜ","c":"ơࣜ"} +{"g":"pair+base","s":"ω်̝","c":"ω်̝","d":"ω်̝"} +{"g":"pair+base","s":"uོ᷷"} +{"g":"pair+base","s":"ωࠛ᷼"} +{"g":"pair+base","s":"A𑥃𑏎","l":"a𑥃𑏎"} +{"g":"pair+base","s":"и𑵂̍"} +{"g":"pair+base","s":"a઼𖬳"} +{"g":"pair+base","s":"e᳝᩻"} +{"g":"pair+base","s":"αؘ꣨","c":"αؘ꣨","d":"αؘ꣨"} +{"g":"pair+base","s":"େ᫝݃"} +{"g":"pair+base","s":"и𞀡⳯"} +{"g":"pair+base","s":"ᄀۢࣼ"} +{"g":"pair+base","s":"ω᭱ࠡ"} +{"g":"pair+base","s":"େ⃫᩼"} +{"g":"pair+base","s":"иͪ𐨸"} +{"g":"pair+base","s":"Aͪ𑍫","l":"aͪ𑍫"} +{"g":"pair+base","s":"א𞣐ۨ","c":"א𞣐ۨ","d":"א𞣐ۨ"} +{"g":"pair+base","s":"α͊᪼"} +{"g":"pair+base","s":"א𑍲𞋬"} +{"g":"pair+base","s":"ω᳢਼"} +{"g":"pair+base","s":"a𐵩ͮ"} +{"g":"pair+base","s":"A𑵄ⷰ","l":"a𑵄ⷰ"} +{"g":"pair+base","s":"u𑘿𑽂"} +{"g":"pair+base","s":"α߮ࣴ"} +{"g":"pair+base","s":"A𐨏᪴","l":"a𐨏᪴"} +{"g":"pair+base","s":"oⷰ͆"} +{"g":"pair+base","s":"a𑓂ܳ","c":"a𑓂ܳ","d":"a𑓂ܳ"} +{"g":"pair+base","s":"eͮ꣪"} +{"g":"pair+base","s":"゙𖄯︧","c":"゙𖄯︧","d":"゙𖄯︧"} +{"g":"pair+base","s":"иຸ͎"} +{"g":"pair+base","s":"и༷𝆪"} +{"g":"pair+base","s":"αꙸ𝉂"} +{"g":"pair+base","s":"א༷꣣","c":"א༷꣣","d":"א༷꣣"} +{"g":"pair+base","s":"ωᷛࣟ"} +{"g":"pair+base","s":"ᄀ᪱࣡"} +{"g":"pair+base","s":"oٟ࣮"} +{"g":"pair+base","s":"ا᳢߽"} +{"g":"pair+base","s":"o̊࣪"} +{"g":"pair+base","s":"e఼𝅰"} +{"g":"pair+base","s":"א⃭࣫","c":"א⃭࣫","d":"א⃭࣫"} +{"g":"pair+base","s":"uۚ𞀖"} +{"g":"pair+base","s":"ᄀ᳢̆"} +{"g":"pair+base","s":"א𑜫⃛","c":"א𑜫⃛","d":"א𑜫⃛"} +{"g":"pair+base","s":"אؙ֞"} +{"g":"pair+base","s":"େฺٓ"} +{"g":"pair+base","s":"u𑁿֧"} +{"g":"pair+base","s":"и̡𞀩"} +{"g":"pair+base","s":"א𖫳𝆀","c":"א𖫳𝆀","d":"א𖫳𝆀"} +{"g":"pair+base","s":"ᄀꪴ᩹"} +{"g":"pair+base","s":"a𞀓𞀅"} +{"g":"pair+base","s":"ᄀ̵𞛮"} +{"g":"pair+base","s":"e҇ͧ"} +{"g":"pair+base","s":"и̍֗"} +{"g":"pair+base","s":"゙𝆂݇","c":"゙𝆂݇","d":"゙𝆂݇"} +{"g":"pair+base","s":"A֗𞀉","l":"a֗𞀉"} +{"g":"pair+base","s":"א᩺ࣘ"} +{"g":"pair+base","s":"A𑇀𝆪","c":"A𑇀𝆪","d":"A𑇀𝆪","l":"a𑇀𝆪"} +{"g":"pair+base","s":"u֮᫔"} +{"g":"pair+base","s":"a𐨍ࠗ"} +{"g":"pair+base","s":"и〭ⷾ"} +{"g":"pair+base","s":"א๋̘"} +{"g":"pair+base","s":"u𞛵᭰"} +{"g":"pair+base","s":"゙ًٓ"} +{"g":"pair+base","s":"אٟ𐨸"} +{"g":"pair+base","s":"o𑠹𞀊","c":"o𑠹𞀊","d":"o𑠹𞀊"} +{"g":"pair+base","s":"A𖬱𝆉","l":"a𖬱𝆉"} +{"g":"pair+base","s":"ᄀᷘ̔"} +{"g":"pair+base","s":"א𑗀࣊"} +{"g":"pair+base","s":"aׇ̯","c":"aׇ̯","d":"aׇ̯"} +{"g":"pair+base","s":"゙ؘᷙ","c":"゙ؘᷙ","d":"゙ؘᷙ"} +{"g":"pair+base","s":"ا࣊᳹"} +{"g":"pair+base","s":"ا꣤ᷙ"} +{"g":"pair+base","s":"ᄀ𑑂ᷙ"} +{"g":"pair+base","s":"ᄀ꣮𞀓"} +{"g":"pair+base","s":"aⷳ𐵬"} +{"g":"pair+base","s":"uׅ𞀘"} +{"g":"pair+base","s":"゙͑᷀"} +{"g":"pair+base","s":"א᷎ܰ"} +{"g":"pair+base","s":"ω𝅩٘"} +{"g":"pair+base","s":"e𞀍፞"} +{"g":"pair+base","s":"ω𝆀𝆉","c":"ω𝆀𝆉","d":"ω𝆀𝆉"} +{"g":"pair+base","s":"αⷶ҇"} +{"g":"pair+base","s":"A⃙݇","l":"a⃙݇"} +{"g":"pair+base","s":"ω𑏎᷄"} +{"g":"pair+base","s":"uᪿ𑍳","c":"uᪿ𑍳","d":"uᪿ𑍳"} +{"g":"pair+base","s":"α᷊ᫎ"} +{"g":"pair+base","s":"𑚷゙̓","c":"𑚷゙̓","d":"𑚷゙̓"} +{"g":"pair+base","s":"a࣏ᷳ","c":"a࣏ᷳ","d":"a࣏ᷳ"} +{"g":"pair+base","s":"ᄀ͍֡"} +{"g":"pair+base","s":"େ𑍍ᷛ","c":"େ𑍍ᷛ","d":"େ𑍍ᷛ"} +{"g":"pair+base","s":"e᩠ͯ"} +{"g":"pair+base","s":"େ𞀞꣥"} +{"g":"pair+base","s":"иꪲ͋"} +{"g":"compose","s":"≮","c":"≮"} +{"g":"compose","s":"≠ⷥ","c":"≠ⷥ","d":"≠ⷥ"} +{"g":"compose","s":"≯𞀌","d":"≯𞀌"} +{"g":"compose","s":"À","c":"À","l":"à"} +{"g":"compose","s":"A𞀕́","l":"a𞀕́"} +{"g":"compose","s":"Â֪","d":"Â֪","l":"â֪"} +{"g":"compose","s":"Ã","c":"Ã","l":"ã"} +{"g":"compose","s":"A𞀂̄","l":"a𞀂̄"} +{"g":"compose","s":"Ăฺ","d":"Ăฺ","l":"ăฺ"} +{"g":"compose","s":"Ȧ","c":"Ȧ","l":"ȧ"} +{"g":"compose","s":"Aͣ̈","l":"aͣ̈"} +{"g":"compose","s":"Ả𑄳","d":"Ả𑄳","l":"ả𑄳"} +{"g":"compose","s":"Å","c":"Å","l":"å"} +{"g":"compose","s":"Ǎְ","c":"Ǎְ","l":"ǎְ"} +{"g":"compose","s":"Ȁ݉","d":"Ȁ݉","l":"ȁ݉"} +{"g":"compose","s":"Ȃ","c":"Ȃ","l":"ȃ"} +{"g":"compose","s":"A֛̣","l":"a֛̣"} +{"g":"compose","s":"Ḁ᳠","d":"Ḁ᳠","l":"ḁ᳠"} +{"g":"compose","s":"Ą","c":"Ą","l":"ą"} +{"g":"compose","s":"Ḃ༙","c":"Ḃ༙","l":"ḃ༙"} +{"g":"compose","s":"Ḅ࣒","d":"Ḅ࣒","l":"ḅ࣒"} +{"g":"compose","s":"Ḇ","c":"Ḇ","l":"ḇ"} +{"g":"compose","s":"Ć꠬","c":"Ć꠬","l":"ć꠬"} +{"g":"compose","s":"Ĉ꣫","d":"Ĉ꣫","l":"ĉ꣫"} +{"g":"compose","s":"Ċ","c":"Ċ","l":"ċ"} +{"g":"compose","s":"Č֛","c":"Č֛","l":"č֛"} +{"g":"compose","s":"Ç҄","d":"Ç҄","l":"ç҄"} +{"g":"compose","s":"Ḋ","c":"Ḋ","l":"ḋ"} +{"g":"compose","s":"D̄̌","l":"d̄̌"} +{"g":"compose","s":"Ḍ࣋","d":"Ḍ࣋","l":"ḍ࣋"} +{"g":"compose","s":"Ḑ","c":"Ḑ","l":"ḑ"} +{"g":"compose","s":"Ḓ⃡","c":"Ḓ⃡","d":"Ḓ⃡","l":"ḓ⃡"} +{"g":"compose","s":"Ḏູ","d":"Ḏູ","l":"ḏູ"} +{"g":"compose","s":"È","c":"È","l":"è"} +{"g":"compose","s":"E࣠́","l":"e࣠́"} +{"g":"compose","s":"Êؒ","d":"Êؒ","l":"êؒ"} +{"g":"compose","s":"Ẽ","c":"Ẽ","l":"ẽ"} +{"g":"compose","s":"E𞀆̄","l":"e𞀆̄"} +{"g":"compose","s":"Ĕ߮","d":"Ĕ߮","l":"ĕ߮"} +{"g":"compose","s":"Ė","c":"Ė","l":"ė"} +{"g":"compose","s":"Ëׁ","c":"Ëׁ","l":"ëׁ"} +{"g":"compose","s":"Ẻ̽","d":"Ẻ̽","l":"ẻ̽"} +{"g":"compose","s":"Ě","c":"Ě","l":"ě"} +{"g":"compose","s":"Ȅﬞ","c":"Ȅﬞ","l":"ȅﬞ"} +{"g":"compose","s":"Ȇ᫙","d":"Ȇ᫙","l":"ȇ᫙"} +{"g":"compose","s":"Ẹ","c":"Ẹ","l":"ẹ"} +{"g":"compose","s":"Ȩ︯","c":"Ȩ︯","d":"Ȩ︯","l":"ȩ︯"} +{"g":"compose","s":"Ę֓","d":"Ę֓","l":"ę֓"} +{"g":"compose","s":"Ḙ","c":"Ḙ","l":"ḙ"} +{"g":"compose","s":"Eࣹ̰","l":"eࣹ̰"} +{"g":"compose","s":"Ḟؗ","d":"Ḟؗ","l":"ḟؗ"} +{"g":"compose","s":"Ǵ","c":"Ǵ","l":"ǵ"} +{"g":"compose","s":"Gᫍ̂","l":"gᫍ̂"} +{"g":"compose","s":"Ḡᷫ","d":"Ḡᷫ","l":"ḡᷫ"} +{"g":"compose","s":"Ğ","c":"Ğ","l":"ğ"} +{"g":"compose","s":"G࣍̇","l":"g࣍̇"} +{"g":"compose","s":"Ǧྀ","d":"Ǧྀ","l":"ǧྀ"} +{"g":"compose","s":"Ģ","c":"Ģ","l":"ģ"} +{"g":"compose","s":"Hͭ̂","l":"hͭ̂"} +{"g":"compose","s":"Ḣٜ","d":"Ḣٜ","l":"ḣٜ"} +{"g":"compose","s":"Ḧ","c":"Ḧ","l":"ḧ"} +{"g":"compose","s":"H𑍫̌","l":"h𑍫̌"} +{"g":"compose","s":"Ḥ្","d":"Ḥ្","l":"ḥ្"} +{"g":"compose","s":"Ḩ","c":"Ḩ","l":"ḩ"} +{"g":"compose","s":"Ḫͮ","c":"Ḫͮ","d":"Ḫͮ","l":"ḫͮ"} +{"g":"compose","s":"Ìꙻ","d":"Ìꙻ","l":"ìꙻ"} +{"g":"compose","s":"Í","c":"Í","l":"í"} +{"g":"compose","s":"I︣̂","l":"i︣̂"} +{"g":"compose","s":"Ĩⷦ","d":"Ĩⷦ","l":"ĩⷦ"} +{"g":"compose","s":"Ī","c":"Ī","l":"ī"} +{"g":"compose","s":"I𞓯̆","l":"i𞓯̆"} +{"g":"compose","s":"İ࣓","d":"İ࣓","l":"i࣓̇"} +{"g":"compose","s":"Ï","c":"Ï","l":"ï"} +{"g":"compose","s":"I֞̉","l":"i֞̉"} +{"g":"compose","s":"Ǐ֡","d":"Ǐ֡","l":"ǐ֡"} +{"g":"compose","s":"Ȉ","c":"Ȉ","l":"ȉ"} +{"g":"compose","s":"Iۡ̑","l":"iۡ̑"} +{"g":"compose","s":"Ị͠","d":"Ị͠","l":"ị͠"} +{"g":"compose","s":"Į","c":"Į","l":"į"} +{"g":"compose","s":"Ḭ𝅨","c":"Ḭ𝅨","l":"ḭ𝅨"} +{"g":"compose","s":"Ĵ᩼","d":"Ĵ᩼","l":"ĵ᩼"} +{"g":"compose","s":"Ḱ","c":"Ḱ","l":"ḱ"} +{"g":"compose","s":"Ǩࣶ","c":"Ǩࣶ","l":"ǩࣶ"} +{"g":"compose","s":"Ḳ꣭","d":"Ḳ꣭","l":"ḳ꣭"} +{"g":"compose","s":"Ķ","c":"Ķ","l":"ķ"} +{"g":"compose","s":"Ḵ้","c":"Ḵ้","l":"ḵ้"} +{"g":"compose","s":"Ĺ่","d":"Ĺ่","l":"ĺ่"} +{"g":"compose","s":"Ľ","c":"Ľ","l":"ľ"} +{"g":"compose","s":"Ḷ𐵩","c":"Ḷ𐵩","d":"Ḷ𐵩","l":"ḷ𐵩"} +{"g":"compose","s":"Ļ𐺫","d":"Ļ𐺫","l":"ļ𐺫"} +{"g":"compose","s":"Ḽ","c":"Ḽ","l":"ḽ"} +{"g":"compose","s":"Ḻ͜","c":"Ḻ͜","d":"Ḻ͜","l":"ḻ͜"} +{"g":"compose","s":"Ḿ᭭","d":"Ḿ᭭","l":"ḿ᭭"} +{"g":"compose","s":"Ṁ","c":"Ṁ","l":"ṁ"} +{"g":"compose","s":"Ṃᷭ","c":"Ṃᷭ","d":"Ṃᷭ","l":"ṃᷭ"} +{"g":"compose","s":"Ǹ𖫴","d":"Ǹ𖫴","l":"ǹ𖫴"} +{"g":"compose","s":"Ń","c":"Ń","l":"ń"} +{"g":"compose","s":"Ñ⃚","c":"Ñ⃚","l":"ñ⃚"} +{"g":"compose","s":"Ṅ᫚","d":"Ṅ᫚","l":"ṅ᫚"} +{"g":"compose","s":"Ň","c":"Ň","l":"ň"} +{"g":"compose","s":"Nܷ̣","l":"nܷ̣"} +{"g":"compose","s":"Ņ᭯","d":"Ņ᭯","l":"ņ᭯"} +{"g":"compose","s":"Ṋ","c":"Ṋ","l":"ṋ"} +{"g":"compose","s":"Ṉ᳐","c":"Ṉ᳐","d":"Ṉ᳐","l":"ṉ᳐"} +{"g":"compose","s":"Ò̸","d":"Ò̸","l":"ò̸"} +{"g":"compose","s":"Ó","c":"Ó","l":"ó"} +{"g":"compose","s":"Ôֱ","c":"Ôֱ","l":"ôֱ"} +{"g":"compose","s":"Õི","d":"Õི","l":"õི"} +{"g":"compose","s":"Ō","c":"Ō","l":"ō"} +{"g":"compose","s":"Oٝ̆","l":"oٝ̆"} +{"g":"compose","s":"Ȯ̱","d":"Ȯ̱","l":"ȯ̱"} +{"g":"compose","s":"Ö","c":"Ö","l":"ö"} +{"g":"compose","s":"Ỏ๊","c":"Ỏ๊","l":"ỏ๊"} +{"g":"compose","s":"Őᨗ","d":"Őᨗ","l":"őᨗ"} +{"g":"compose","s":"Ǒ","c":"Ǒ","l":"ǒ"} +{"g":"compose","s":"Ȍ꤬","c":"Ȍ꤬","l":"ȍ꤬"} +{"g":"compose","s":"Ȏ𞀨","d":"Ȏ𞀨","l":"ȏ𞀨"} +{"g":"compose","s":"Ơ","c":"Ơ","l":"ơ"} +{"g":"compose","s":"Ọ᪰","c":"Ọ᪰","d":"Ọ᪰","l":"ọ᪰"} +{"g":"compose","s":"Ǫ҃","d":"Ǫ҃","l":"ǫ҃"} +{"g":"compose","s":"Ṕ","c":"Ṕ","l":"ṕ"} +{"g":"compose","s":"Ṗ್","c":"Ṗ್","l":"ṗ್"} +{"g":"compose","s":"Ŕ⃭","d":"Ŕ⃭","l":"ŕ⃭"} +{"g":"compose","s":"Ṙ","c":"Ṙ","l":"ṙ"} +{"g":"compose","s":"R᫁̌","l":"r᫁̌"} +{"g":"compose","s":"Ȑ𑖿","d":"Ȑ𑖿","l":"ȑ𑖿"} +{"g":"compose","s":"Ȓ","c":"Ȓ","l":"ȓ"} +{"g":"compose","s":"R᫢̣","c":"Ṛ᫢","d":"Ṛ᫢","l":"r᫢̣"} +{"g":"compose","s":"Ŗ߱","d":"Ŗ߱","l":"ŗ߱"} +{"g":"compose","s":"Ṟ","c":"Ṟ","l":"ṟ"} +{"g":"compose","s":"Sܰ́","l":"sܰ́"} +{"g":"compose","s":"Ŝⷤ","d":"Ŝⷤ","l":"ŝⷤ"} +{"g":"compose","s":"Ṡ","c":"Ṡ","l":"ṡ"} +{"g":"compose","s":"Š𝅩","c":"Š𝅩","l":"š𝅩"} +{"g":"compose","s":"Ṣ͠","d":"Ṣ͠","l":"ṣ͠"} +{"g":"compose","s":"Ș","c":"Ș","l":"ș"} +{"g":"compose","s":"Ş݂","c":"Ş݂","d":"Ş݂","l":"ş݂"} +{"g":"compose","s":"Ṫ͠","d":"Ṫ͠","l":"ṫ͠"} +{"g":"compose","s":"Ť","c":"Ť","l":"ť"} +{"g":"compose","s":"Ṭ𝆪","c":"Ṭ𝆪","d":"Ṭ𝆪","l":"ṭ𝆪"} +{"g":"compose","s":"Ț͜","d":"Ț͜","l":"ț͜"} +{"g":"compose","s":"Ţ","c":"Ţ","l":"ţ"} +{"g":"compose","s":"Ṱ𝉄","c":"Ṱ𝉄","d":"Ṱ𝉄","l":"ṱ𝉄"} +{"g":"compose","s":"Ṯ⃛","d":"Ṯ⃛","l":"ṯ⃛"} +{"g":"compose","s":"Ù","c":"Ù","l":"ù"} +{"g":"compose","s":"Úָ","c":"Úָ","l":"úָ"} +{"g":"compose","s":"Ûⷺ","d":"Ûⷺ","l":"ûⷺ"} +{"g":"compose","s":"Ũ","c":"Ũ","l":"ũ"} +{"g":"compose","s":"U᫗̄","l":"u᫗̄"} +{"g":"compose","s":"Ŭ⃛","d":"Ŭ⃛","l":"ŭ⃛"} +{"g":"compose","s":"Ü","c":"Ü","l":"ü"} +{"g":"compose","s":"U፟̉","l":"u፟̉"} +{"g":"compose","s":"Ů࣐","d":"Ů࣐","l":"ů࣐"} +{"g":"compose","s":"Ű","c":"Ű","l":"ű"} +{"g":"compose","s":"Uۘ̌","l":"uۘ̌"} +{"g":"compose","s":"Ȕ᫕","d":"Ȕ᫕","l":"ȕ᫕"} +{"g":"compose","s":"Ȗ","c":"Ȗ","l":"ȗ"} +{"g":"compose","s":"Ư𐫥","c":"Ư𐫥","d":"Ư𐫥","l":"ư𐫥"} +{"g":"compose","s":"Ụ᩿","d":"Ụ᩿","l":"ụ᩿"} +{"g":"compose","s":"Ṳ","c":"Ṳ","l":"ṳ"} +{"g":"compose","s":"U᫓̨","c":"Ų᫓","d":"Ų᫓","l":"u᫓̨"} +{"g":"compose","s":"Ṷ᷍","d":"Ṷ᷍","l":"ṷ᷍"} +{"g":"compose","s":"Ṵ","c":"Ṵ","l":"ṵ"} +{"g":"compose","s":"Ṽ֮","c":"Ṽ֮","l":"ṽ֮"} +{"g":"compose","s":"Ṿ꣄","d":"Ṿ꣄","l":"ṿ꣄"} +{"g":"compose","s":"Ẁ","c":"Ẁ","l":"ẁ"} +{"g":"compose","s":"Ẃ𑩇","c":"Ẃ𑩇","l":"ẃ𑩇"} +{"g":"compose","s":"Ŵ྄","d":"Ŵ྄","l":"ŵ྄"} +{"g":"compose","s":"Ẇ","c":"Ẇ","l":"ẇ"} +{"g":"compose","s":"Ẅ⃙","c":"Ẅ⃙","l":"ẅ⃙"} +{"g":"compose","s":"Ẉ࣪","d":"Ẉ࣪","l":"ẉ࣪"} +{"g":"compose","s":"Ẋ","c":"Ẋ","l":"ẋ"} +{"g":"compose","s":"X֨̈","l":"x֨̈"} +{"g":"compose","s":"Ỳ֑","d":"Ỳ֑","l":"ỳ֑"} +{"g":"compose","s":"Ý","c":"Ý","l":"ý"} +{"g":"compose","s":"Yࣟ̂","l":"yࣟ̂"} +{"g":"compose","s":"Ỹ߱","d":"Ỹ߱","l":"ỹ߱"} +{"g":"compose","s":"Ȳ","c":"Ȳ","l":"ȳ"} +{"g":"compose","s":"Ẏ्","c":"Ẏ्","l":"ẏ्"} +{"g":"compose","s":"Ÿ〬","d":"Ÿ〬","l":"ÿ〬"} +{"g":"compose","s":"Ỷ","c":"Ỷ","l":"ỷ"} +{"g":"compose","s":"Ỵ𑽂","c":"Ỵ𑽂","l":"ỵ𑽂"} +{"g":"compose","s":"Ź᫕","d":"Ź᫕","l":"ź᫕"} +{"g":"compose","s":"Ẑ","c":"Ẑ","l":"ẑ"} +{"g":"compose","s":"Zؑ̇","l":"zؑ̇"} +{"g":"compose","s":"Ž֣","d":"Ž֣","l":"ž֣"} +{"g":"compose","s":"Ẓ","c":"Ẓ","l":"ẓ"} +{"g":"compose","s":"Ẕ̍","c":"Ẕ̍","d":"Ẕ̍","l":"ẕ̍"} +{"g":"compose","s":"à᳝","d":"à᳝"} +{"g":"compose","s":"á","c":"á"} +{"g":"compose","s":"â᳞","c":"â᳞"} +{"g":"compose","s":"ã𞗯","d":"ã𞗯"} +{"g":"compose","s":"ā","c":"ā"} +{"g":"compose","s":"ă̖","c":"ă̖"} +{"g":"compose","s":"ȧ𑍳","d":"ȧ𑍳"} +{"g":"compose","s":"ä","c":"ä"} +{"g":"compose","s":"ả𐽆","c":"ả𐽆"} +{"g":"compose","s":"å︩","d":"å︩"} +{"g":"compose","s":"ǎ","c":"ǎ"} +{"g":"compose","s":"ȁ᰷","c":"ȁ᰷"} +{"g":"compose","s":"ȃ᯲","d":"ȃ᯲"} +{"g":"compose","s":"ạ","c":"ạ"} +{"g":"compose","s":"ḁ𞀂","c":"ḁ𞀂","d":"ḁ𞀂"} +{"g":"compose","s":"ą𝅱","d":"ą𝅱"} +{"g":"compose","s":"ḃ","c":"ḃ"} +{"g":"compose","s":"ḅۙ","c":"ḅۙ","d":"ḅۙ"} +{"g":"compose","s":"ḇ꣩","d":"ḇ꣩"} +{"g":"compose","s":"ć","c":"ć"} +{"g":"compose","s":"c𑍨̂"} +{"g":"compose","s":"ċࣨ","d":"ċࣨ"} +{"g":"compose","s":"č","c":"č"} +{"g":"compose","s":"ç𑍫","c":"ç𑍫","d":"ç𑍫"} +{"g":"compose","s":"ḋ᫔","d":"ḋ᫔"} +{"g":"compose","s":"ď","c":"ď"} +{"g":"compose","s":"ḍ𐾂","c":"ḍ𐾂","d":"ḍ𐾂"} +{"g":"compose","s":"ḑ𐵭","d":"ḑ𐵭"} +{"g":"compose","s":"ḓ","c":"ḓ"} +{"g":"compose","s":"d᫏̱","c":"ḏ᫏","d":"ḏ᫏"} +{"g":"compose","s":"è్","d":"è్"} +{"g":"compose","s":"é","c":"é"} +{"g":"compose","s":"e᳚̂"} +{"g":"compose","s":"ẽ𑇀","d":"ẽ𑇀"} +{"g":"compose","s":"ē","c":"ē"} +{"g":"compose","s":"e𐺫̆"} +{"g":"compose","s":"ė𐵪","d":"ė𐵪"} +{"g":"compose","s":"ë","c":"ë"} +{"g":"compose","s":"e⃧̉"} +{"g":"compose","s":"ě᳨","d":"ě᳨"} +{"g":"compose","s":"ȅ","c":"ȅ"} +{"g":"compose","s":"e݊̑"} +{"g":"compose","s":"ẹ͙","d":"ẹ͙"} +{"g":"compose","s":"ȩ","c":"ȩ"} +{"g":"compose","s":"ę࢛","c":"ę࢛","d":"ę࢛"} +{"g":"compose","s":"ḙ𑂹","d":"ḙ𑂹"} +{"g":"compose","s":"ḛ","c":"ḛ"} +{"g":"compose","s":"fᷲ̇"} +{"g":"compose","s":"ǵⷬ","d":"ǵⷬ"} +{"g":"compose","s":"ĝ","c":"ĝ"} +{"g":"compose","s":"g͌̄"} +{"g":"compose","s":"ğ݊","d":"ğ݊"} +{"g":"compose","s":"ġ","c":"ġ"} +{"g":"compose","s":"ǧ̻","c":"ǧ̻"} +{"g":"compose","s":"ģุ","d":"ģุ"} +{"g":"compose","s":"ĥ","c":"ĥ"} +{"g":"compose","s":"h᫖̇"} +{"g":"compose","s":"ḧ𖿰","d":"ḧ𖿰"} +{"g":"compose","s":"ȟ","c":"ȟ"} +{"g":"compose","s":"ḥ𝆅","c":"ḥ𝆅","d":"ḥ𝆅"} +{"g":"compose","s":"ḩᷗ","d":"ḩᷗ"} +{"g":"compose","s":"ḫ","c":"ḫ"} +{"g":"compose","s":"ẖ𞀗","c":"ẖ𞀗","d":"ẖ𞀗"} +{"g":"compose","s":"ì̸","d":"ì̸"} +{"g":"compose","s":"í","c":"í"} +{"g":"compose","s":"i҄̂"} +{"g":"compose","s":"ĩᷛ","d":"ĩᷛ"} +{"g":"compose","s":"ī","c":"ī"} +{"g":"compose","s":"ĭ͢","c":"ĭ͢","d":"ĭ͢"} +{"g":"compose","s":"ïٓ","d":"ïٓ"} +{"g":"compose","s":"ỉ","c":"ỉ"} +{"g":"compose","s":"ǐ̞","c":"ǐ̞"} +{"g":"compose","s":"ȉ᳖","d":"ȉ᳖"} +{"g":"compose","s":"ȋ","c":"ȋ"} +{"g":"compose","s":"ị߭","c":"ị߭","d":"ị߭"} +{"g":"compose","s":"į᷑","d":"į᷑"} +{"g":"compose","s":"ḭ","c":"ḭ"} +{"g":"compose","s":"ĵ𐻽","c":"ĵ𐻽"} +{"g":"compose","s":"ǰ᳦","d":"ǰ᳦"} +{"g":"compose","s":"ḱ","c":"ḱ"} +{"g":"compose","s":"kࣖ̌"} +{"g":"compose","s":"ḳͯ","d":"ḳͯ"} +{"g":"compose","s":"ķ","c":"ķ"} +{"g":"compose","s":"ḵ꙽","c":"ḵ꙽","d":"ḵ꙽"} +{"g":"compose","s":"ĺ𐻺","d":"l𐻺́"} +{"g":"compose","s":"ľ","c":"ľ"} +{"g":"compose","s":"l᫘̣","c":"ḷ᫘","d":"ḷ᫘"} +{"g":"compose","s":"ļ⃑","d":"ļ⃑"} +{"g":"compose","s":"ḽ","c":"ḽ"} +{"g":"compose","s":"ḻ𖫰","c":"ḻ𖫰"} +{"g":"compose","s":"ḿ่","d":"ḿ่"} +{"g":"compose","s":"ṁ","c":"ṁ"} +{"g":"compose","s":"ṃู","c":"ṃู"} +{"g":"compose","s":"ǹ𝆫","d":"ǹ𝆫"} +{"g":"compose","s":"ń","c":"ń"} +{"g":"compose","s":"ñ᷐","c":"ñ᷐"} +{"g":"compose","s":"ṅ᳭","d":"ṅ᳭"} +{"g":"compose","s":"ň","c":"ň"} +{"g":"compose","s":"ṇֵ","c":"ṇֵ"} +{"g":"compose","s":"ņྃ","d":"ņྃ"} +{"g":"compose","s":"ṋ","c":"ṋ"} +{"g":"compose","s":"ṉ𑄀","c":"ṉ𑄀","d":"ṉ𑄀"} +{"g":"compose","s":"ò⳰","d":"ò⳰"} +{"g":"compose","s":"ó","c":"ó"} +{"g":"compose","s":"ô֧","c":"ô֧"} +{"g":"compose","s":"õ𑜫","d":"õ𑜫"} +{"g":"compose","s":"ō","c":"ō"} +{"g":"compose","s":"ŏ𝆊","c":"ŏ𝆊"} +{"g":"compose","s":"ȯ𞀔","d":"ȯ𞀔"} +{"g":"compose","s":"ö","c":"ö"} +{"g":"compose","s":"o꣰̉"} +{"g":"compose","s":"ő๊","d":"ő๊"} +{"g":"compose","s":"ǒ","c":"ǒ"} +{"g":"compose","s":"ȍ᬴","c":"ȍ᬴"} +{"g":"compose","s":"ȏؔ","d":"ȏؔ"} +{"g":"compose","s":"ơ","c":"ơ"} +{"g":"compose","s":"ọ᳢","c":"ọ᳢"} +{"g":"compose","s":"ǫ𞀦","d":"ǫ𞀦"} +{"g":"compose","s":"ṕ","c":"ṕ"} +{"g":"compose","s":"ṗ᷽","c":"ṗ᷽"} +{"g":"compose","s":"ŕִ","d":"ŕִ"} +{"g":"compose","s":"ṙ","c":"ṙ"} +{"g":"compose","s":"r᪱̌"} +{"g":"compose","s":"ȑࣵ","d":"ȑࣵ"} +{"g":"compose","s":"ȓ","c":"ȓ"} +{"g":"compose","s":"ṛ𞀕","c":"ṛ𞀕","d":"ṛ𞀕"} +{"g":"compose","s":"ŗ̊","d":"ŗ̊"} +{"g":"compose","s":"ṟ","c":"ṟ"} +{"g":"compose","s":"sࣴ́"} +{"g":"compose","s":"ŝꙷ","d":"ŝꙷ"} +{"g":"compose","s":"ṡ","c":"ṡ"} +{"g":"compose","s":"š𑤾","c":"š𑤾"} +{"g":"compose","s":"ṣ్","d":"ṣ్"} +{"g":"compose","s":"ș","c":"ș"} +{"g":"compose","s":"ş਼","c":"ş਼"} +{"g":"compose","s":"ṫ᫚","d":"ṫ᫚"} +{"g":"compose","s":"ẗ","c":"ẗ"} +{"g":"compose","s":"tᷝ̌"} +{"g":"compose","s":"ṭ࢛","d":"ṭ࢛"} +{"g":"compose","s":"ț","c":"ț"} +{"g":"compose","s":"ţ𝆬","c":"ţ𝆬","d":"ţ𝆬"} +{"g":"compose","s":"ṱⷱ","d":"ṱⷱ"} +{"g":"compose","s":"ṯ","c":"ṯ"} +{"g":"compose","s":"ù𖫰","c":"ù𖫰"} +{"g":"compose","s":"ú𞀠","d":"ú𞀠"} +{"g":"compose","s":"û","c":"û"} +{"g":"compose","s":"uͬ̃"} +{"g":"compose","s":"ū᫫","d":"ū᫫"} +{"g":"compose","s":"ŭ","c":"ŭ"} +{"g":"compose","s":"u⃜̈"} +{"g":"compose","s":"ủ္","d":"ủ္"} +{"g":"compose","s":"ů","c":"ů"} +{"g":"compose","s":"u︤̋"} +{"g":"compose","s":"ǔ꣤","d":"ǔ꣤"} +{"g":"compose","s":"ȕ","c":"ȕ"} +{"g":"compose","s":"u࣠̑"} +{"g":"compose","s":"ư𐽌","d":"ư𐽌"} +{"g":"compose","s":"ụ","c":"ụ"} +{"g":"compose","s":"u𐽇̤"} +{"g":"compose","s":"ųܴ","d":"ųܴ"} +{"g":"compose","s":"ṷ","c":"ṷ"} +{"g":"compose","s":"ṵ𞀒","c":"ṵ𞀒","d":"ṵ𞀒"} +{"g":"compose","s":"ṿ̃","c":"ṿ̃","d":"ṿ̃"} +{"g":"compose","s":"ṿ","c":"ṿ"} +{"g":"compose","s":"ẁ༘","c":"ẁ༘"} +{"g":"compose","s":"ẃ࡙","d":"ẃ࡙"} +{"g":"compose","s":"ŵ","c":"ŵ"} +{"g":"compose","s":"ẇ᳗","c":"ẇ᳗"} +{"g":"compose","s":"ẅꙹ","d":"ẅꙹ"} +{"g":"compose","s":"ẘ","c":"ẘ"} +{"g":"compose","s":"ẉࣴ","c":"ẉࣴ","d":"ẉࣴ"} +{"g":"compose","s":"ẋ֥","d":"ẋ֥"} +{"g":"compose","s":"ẍ","c":"ẍ"} +{"g":"compose","s":"yؕ̀"} +{"g":"compose","s":"ýܿ","d":"ýܿ"} +{"g":"compose","s":"ŷ","c":"ŷ"} +{"g":"compose","s":"ỹ𑧠","c":"ỹ𑧠"} +{"g":"compose","s":"ȳ꣰","d":"ȳ꣰"} +{"g":"compose","s":"ẏ","c":"ẏ"} +{"g":"compose","s":"ÿ݂","c":"ÿ݂"} +{"g":"compose","s":"ỷ𝅮","d":"ỷ𝅮"} +{"g":"compose","s":"ẙ","c":"ẙ"} +{"g":"compose","s":"ỵ꣯","c":"ỵ꣯","d":"ỵ꣯"} +{"g":"compose","s":"ź𝅥","d":"ź𝅥"} +{"g":"compose","s":"ẑ","c":"ẑ"} +{"g":"compose","s":"zᷢ̇"} +{"g":"compose","s":"ž𑍦","d":"ž𑍦"} +{"g":"compose","s":"ẓ","c":"ẓ"} +{"g":"compose","s":"ẕ𐴥","c":"ẕ𐴥","d":"ẕ𐴥"} +{"g":"compose","s":"῭̝","d":"῭̝"} +{"g":"compose","s":"΅","c":"΅"} +{"g":"compose","s":"¨֓͂"} +{"g":"compose","s":"Ầ𐻿","d":"Ầ𐻿","l":"ầ𐻿"} +{"g":"compose","s":"Ấ","c":"Ấ","d":"Ấ","l":"ấ"} +{"g":"compose","s":"Â᪼̃","d":"Â᪼̃","l":"â᪼̃"} +{"g":"compose","s":"Ẩ᳕","d":"Ẩ᳕","l":"ẩ᳕"} +{"g":"compose","s":"Ǟ","c":"Ǟ","d":"Ǟ","l":"ǟ"} +{"g":"compose","s":"Ǻ᮫","c":"Ǻ᮫","d":"Ǻ᮫","l":"ǻ᮫"} +{"g":"compose","s":"Ǽ𝅭","d":"Ǽ𝅭","l":"ǽ𝅭"} +{"g":"compose","s":"Ǣ","c":"Ǣ","l":"ǣ"} +{"g":"compose","s":"Ḉّ","c":"Ḉّ","d":"Ḉّ","l":"ḉّ"} +{"g":"compose","s":"Ề𐍺","d":"Ề𐍺","l":"ề𐍺"} +{"g":"compose","s":"Ế","c":"Ế","d":"Ế","l":"ế"} +{"g":"compose","s":"Ễ𐨺","c":"Ễ𐨺","d":"Ễ𐨺","l":"ễ𐨺"} +{"g":"compose","s":"Ể꙯","d":"Ể꙯","l":"ể꙯"} +{"g":"compose","s":"Ḯ","c":"Ḯ","d":"Ḯ","l":"ḯ"} +{"g":"compose","s":"Ồ𝅱","c":"Ồ𝅱","d":"Ồ𝅱","l":"ồ𝅱"} +{"g":"compose","s":"Ố𞥄","d":"Ố𞥄","l":"ố𞥄"} +{"g":"compose","s":"Ỗ","c":"Ỗ","d":"Ỗ","l":"ỗ"} +{"g":"compose","s":"Ôꙺ̉","d":"Ôꙺ̉","l":"ôꙺ̉"} +{"g":"compose","s":"Ṍ𐺫","d":"Ṍ𐺫","l":"ṍ𐺫"} +{"g":"compose","s":"Ȭ","c":"Ȭ","d":"Ȭ","l":"ȭ"} +{"g":"compose","s":"Õ᫩̈","d":"Õ᫩̈","l":"õ᫩̈"} +{"g":"compose","s":"Ȫ𞀊","d":"Ȫ𞀊","l":"ȫ𞀊"} +{"g":"compose","s":"Ǿ","c":"Ǿ","l":"ǿ"} +{"g":"compose","s":"Ü꣫̀","d":"Ü꣫̀","l":"ü꣫̀"} +{"g":"compose","s":"Ǘ𐨺","d":"Ǘ𐨺","l":"ǘ𐨺"} +{"g":"compose","s":"Ǖ","c":"Ǖ","d":"Ǖ","l":"ǖ"} +{"g":"compose","s":"Ü᫙̌","d":"Ü᫙̌","l":"ü᫙̌"} +{"g":"compose","s":"ầ̃","d":"ầ̃"} +{"g":"compose","s":"ấ","c":"ấ","d":"ấ"} +{"g":"compose","s":"â᫦̃","c":"ẫ᫦","d":"a᫦̂̃"} +{"g":"compose","s":"ẩ᳗","d":"ẩ᳗"} +{"g":"compose","s":"ǟ","c":"ǟ","d":"ǟ"} +{"g":"compose","s":"ǻ𑏎","c":"ǻ𑏎","d":"ǻ𑏎"} +{"g":"compose","s":"ǽ⃗","d":"ǽ⃗"} +{"g":"compose","s":"ǣ","c":"ǣ"} +{"g":"compose","s":"ç𐺫́","d":"ç𐺫́"} +{"g":"compose","s":"ềⷳ","d":"ềⷳ"} +{"g":"compose","s":"ế","c":"ế","d":"ế"} +{"g":"compose","s":"ễ̷","c":"ễ̷","d":"ễ̷"} +{"g":"compose","s":"ể̓","d":"ể̓"} +{"g":"compose","s":"ḯ","c":"ḯ","d":"ḯ"} +{"g":"compose","s":"ồ𝅦","c":"ồ𝅦","d":"ồ𝅦"} +{"g":"compose","s":"ố𞗮","d":"ố𞗮"} +{"g":"compose","s":"ỗ","c":"ỗ","d":"ỗ"} +{"g":"compose","s":"ô︣̉","d":"ô︣̉"} +{"g":"compose","s":"ṍﬞ","d":"ṍﬞ"} +{"g":"compose","s":"ȭ","c":"ȭ","d":"ȭ"} +{"g":"compose","s":"õܳ̈","d":"õܳ̈"} +{"g":"compose","s":"ȫﬞ","d":"ȫﬞ"} +{"g":"compose","s":"ǿ","c":"ǿ"} +{"g":"compose","s":"ǜ͙","c":"ǜ͙","d":"ǜ͙"} +{"g":"compose","s":"ǘ⃰","d":"ǘ⃰"} +{"g":"compose","s":"ǖ","c":"ǖ","d":"ǖ"} +{"g":"compose","s":"ǚְ","c":"ǚְ","d":"ǚְ"} +{"g":"compose","s":"Ằ݄","d":"Ằ݄","l":"ằ݄"} +{"g":"compose","s":"Ắ","c":"Ắ","d":"Ắ","l":"ắ"} +{"g":"compose","s":"Ẵ᳕","c":"Ẵ᳕","d":"Ẵ᳕","l":"ẵ᳕"} +{"g":"compose","s":"Ẳ𐵭","d":"Ẳ𐵭","l":"ẳ𐵭"} +{"g":"compose","s":"ằ","c":"ằ","d":"ằ"} +{"g":"compose","s":"ă࢟́","d":"ă࢟́"} +{"g":"compose","s":"ẵ᷒","d":"ẵ᷒"} +{"g":"compose","s":"ẳ","c":"ẳ","d":"ẳ"} +{"g":"compose","s":"Ē𞋬̀","d":"Ē𞋬̀","l":"ē𞋬̀"} +{"g":"compose","s":"Ḗ᫈","d":"Ḗ᫈","l":"ḗ᫈"} +{"g":"compose","s":"ḕ","c":"ḕ","d":"ḕ"} +{"g":"compose","s":"ē᫙́","d":"ē᫙́"} +{"g":"compose","s":"Ṑ〪","d":"Ṑ〪","l":"ṑ〪"} +{"g":"compose","s":"Ṓ","c":"Ṓ","d":"Ṓ","l":"ṓ"} +{"g":"compose","s":"ṑ͍","c":"ṑ͍","d":"ṑ͍"} +{"g":"compose","s":"ṓ᷋","d":"ṓ᷋"} +{"g":"compose","s":"Ṥ","c":"Ṥ","d":"Ṥ","l":"ṥ"} +{"g":"compose","s":"ṥ𝆁","c":"ṥ𝆁","d":"ṥ𝆁"} +{"g":"compose","s":"Ṧࣩ","d":"Ṧࣩ","l":"ṧࣩ"} +{"g":"compose","s":"ṧ","c":"ṧ","d":"ṧ"} +{"g":"compose","s":"Ṹ゚","c":"Ṹ゚","d":"Ṹ゚","l":"ṹ゚"} +{"g":"compose","s":"ṹ𐴦","d":"ṹ𐴦"} +{"g":"compose","s":"Ṻ","c":"Ṻ","d":"Ṻ","l":"ṻ"} +{"g":"compose","s":"ū𝆪̈","d":"ū𝆪̈"} +{"g":"compose","s":"ẛࣵ","d":"ẛࣵ"} +{"g":"compose","s":"Ờ","c":"Ờ","d":"Ờ","l":"ờ"} +{"g":"compose","s":"Ơࠫ́","d":"Ơࠫ́","l":"ơࠫ́"} +{"g":"compose","s":"Ỡ᪵","d":"Ỡ᪵","l":"ỡ᪵"} +{"g":"compose","s":"Ở","c":"Ở","d":"Ở","l":"ở"} +{"g":"compose","s":"Ợ͗","c":"Ợ͗","d":"Ợ͗","l":"ợ͗"} +{"g":"compose","s":"ờⷵ","d":"ờⷵ"} +{"g":"compose","s":"ớ","c":"ớ","d":"ớ"} +{"g":"compose","s":"ỡ̙","c":"ỡ̙","d":"ỡ̙"} +{"g":"compose","s":"ở۟","d":"ở۟"} +{"g":"compose","s":"ợ","c":"ợ","d":"ợ"} +{"g":"compose","s":"Ưࠣ̀","d":"Ưࠣ̀","l":"ưࠣ̀"} +{"g":"compose","s":"Ứܲ","d":"Ứܲ","l":"ứܲ"} +{"g":"compose","s":"Ữ","c":"Ữ","d":"Ữ","l":"ữ"} +{"g":"compose","s":"Ưꚞ̉","d":"Ưꚞ̉","l":"ưꚞ̉"} +{"g":"compose","s":"Ự̅","d":"Ự̅","l":"ự̅"} +{"g":"compose","s":"ừ","c":"ừ","d":"ừ"} +{"g":"compose","s":"ứ𑌻","c":"ứ𑌻","d":"ứ𑌻"} +{"g":"compose","s":"ữ𞥄","d":"ữ𞥄"} +{"g":"compose","s":"ử","c":"ử","d":"ử"} +{"g":"compose","s":"ựࣧ","c":"ựࣧ","d":"ựࣧ"} +{"g":"compose","s":"Ǯ𐵩","d":"Ǯ𐵩","l":"ǯ𐵩"} +{"g":"compose","s":"Ǭ","c":"Ǭ","d":"Ǭ","l":"ǭ"} +{"g":"compose","s":"ǫ࣌̄","d":"ǫ࣌̄"} +{"g":"compose","s":"Ǡ𑇀","d":"Ǡ𑇀","l":"ǡ𑇀"} +{"g":"compose","s":"ǡ","c":"ǡ","d":"ǡ"} +{"g":"compose","s":"Ḝ𝅲","c":"Ḝ𝅲","d":"Ḝ𝅲","l":"ḝ𝅲"} +{"g":"compose","s":"ḝ𑽁","d":"ḝ𑽁"} +{"g":"compose","s":"Ȱ","c":"Ȱ","d":"Ȱ","l":"ȱ"} +{"g":"compose","s":"ȱ𞣒","c":"ȱ𞣒","d":"ȱ𞣒"} +{"g":"compose","s":"ǯْ","d":"ǯْ"} +{"g":"compose","s":"Ὰ","c":"Ὰ","l":"ὰ"} +{"g":"compose","s":"Αⷯ́","l":"αⷯ́"} +{"g":"compose","s":"Ᾱᷗ","d":"Ᾱᷗ","l":"ᾱᷗ"} +{"g":"compose","s":"Ᾰ","c":"Ᾰ","l":"ᾰ"} +{"g":"compose","s":"Α𞀗̓","l":"α𞀗̓"} +{"g":"compose","s":"Ἁ֣","d":"Ἁ֣","l":"ἁ֣"} +{"g":"compose","s":"ᾼ","c":"ᾼ","l":"ᾳ"} +{"g":"compose","s":"Ὲܴ","c":"Ὲܴ","l":"ὲܴ"} +{"g":"compose","s":"Έ̧","d":"Έ̧","l":"έ̧"} +{"g":"compose","s":"Ἐ","c":"Ἐ","l":"ἐ"} +{"g":"compose","s":"Ἑ̶","c":"Ἑ̶","l":"ἑ̶"} +{"g":"compose","s":"Ὴ࣓","d":"Ὴ࣓","l":"ὴ࣓"} +{"g":"compose","s":"Ή","c":"Ή","l":"ή"} +{"g":"compose","s":"Ἠ᫄","c":"Ἠ᫄","l":"ἠ᫄"} +{"g":"compose","s":"Ἡ᤻","d":"Ἡ᤻","l":"ἡ᤻"} +{"g":"compose","s":"ῌ","c":"ῌ","l":"ῃ"} +{"g":"compose","s":"Ι࢞̀","l":"ι࢞̀"} +{"g":"compose","s":"Ί𐽉","d":"Ί𐽉","l":"ί𐽉"} +{"g":"compose","s":"Ῑ","c":"Ῑ","l":"ῑ"} +{"g":"compose","s":"Ι̅̆","l":"ι̅̆"} +{"g":"compose","s":"Ϊ꣭","d":"Ϊ꣭","l":"ϊ꣭"} +{"g":"compose","s":"Ἰ","c":"Ἰ","l":"ἰ"} +{"g":"compose","s":"Ι𞀂̔","l":"ι𞀂̔"} +{"g":"compose","s":"Ὸ𐽇","d":"Ὸ𐽇","l":"ὸ𐽇"} +{"g":"compose","s":"Ό","c":"Ό","l":"ό"} +{"g":"compose","s":"Ὀ᬴","c":"Ὀ᬴","l":"ὀ᬴"} +{"g":"compose","s":"Ὁ꣬","d":"Ὁ꣬","l":"ὁ꣬"} +{"g":"compose","s":"Ῥ","c":"Ῥ","l":"ῥ"} +{"g":"compose","s":"Ὺ᷽","c":"Ὺ᷽","l":"ὺ᷽"} +{"g":"compose","s":"Ύ֩","d":"Ύ֩","l":"ύ֩"} +{"g":"compose","s":"Ῡ","c":"Ῡ","l":"ῡ"} +{"g":"compose","s":"Υ𞀘̆","l":"υ𞀘̆"} +{"g":"compose","s":"Ϋⷪ","d":"Ϋⷪ","l":"ϋⷪ"} +{"g":"compose","s":"Ὑ","c":"Ὑ","l":"ὑ"} +{"g":"compose","s":"Ω̋̀","l":"ω̋̀"} +{"g":"compose","s":"Ώ𞥇","d":"Ώ𞥇","l":"ώ𞥇"} +{"g":"compose","s":"Ὠ","c":"Ὠ","l":"ὠ"} +{"g":"compose","s":"Ὡﬞ","c":"Ὡﬞ","l":"ὡﬞ"} +{"g":"compose","s":"ῼ𞀔","d":"ῼ𞀔","l":"ῳ𞀔"} +{"g":"compose","s":"ᾴ","c":"ᾴ","d":"ᾴ"} +{"g":"compose","s":"ῄͣ","c":"ῄͣ","d":"ῄͣ"} +{"g":"compose","s":"ὰُ","d":"ὰُ"} +{"g":"compose","s":"ά","c":"ά"} +{"g":"compose","s":"α︮̄"} +{"g":"compose","s":"ᾰ〯","d":"ᾰ〯"} +{"g":"compose","s":"ἀ","c":"ἀ"} +{"g":"compose","s":"α𐵪̔"} +{"g":"compose","s":"ᾶ᫧","d":"ᾶ᫧"} +{"g":"compose","s":"ᾳ","c":"ᾳ"} +{"g":"compose","s":"ε𖬴̀"} +{"g":"compose","s":"έࠢ","d":"έࠢ"} +{"g":"compose","s":"ἐ","c":"ἐ"} +{"g":"compose","s":"ε߳̔"} +{"g":"compose","s":"ὴָ","d":"ὴָ"} +{"g":"compose","s":"ή","c":"ή"} +{"g":"compose","s":"η᷇̓"} +{"g":"compose","s":"ἡ᳧","d":"ἡ᳧"} +{"g":"compose","s":"ῆ","c":"ῆ"} +{"g":"compose","s":"ῃ𝅦","c":"ῃ𝅦"} +{"g":"compose","s":"ὶ݊","d":"ὶ݊"} +{"g":"compose","s":"ί","c":"ί"} +{"g":"compose","s":"ῑ༘","c":"ῑ༘"} +{"g":"compose","s":"ῐ𐍶","d":"ῐ𐍶"} +{"g":"compose","s":"ϊ","c":"ϊ"} +{"g":"compose","s":"ι᫈̓"} +{"g":"compose","s":"ἱ𞣕","d":"ἱ𞣕"} +{"g":"compose","s":"ῖ","c":"ῖ"} +{"g":"compose","s":"οࣥ̀"} +{"g":"compose","s":"όᷯ","d":"όᷯ"} +{"g":"compose","s":"ὀ","c":"ὀ"} +{"g":"compose","s":"ὁ𖫰","c":"ὁ𖫰"} +{"g":"compose","s":"ῤ꤬","d":"ῤ꤬"} +{"g":"compose","s":"ῥ","c":"ῥ"} +{"g":"compose","s":"υܰ̀"} +{"g":"compose","s":"ύ᪱","d":"ύ᪱"} +{"g":"compose","s":"ῡ","c":"ῡ"} +{"g":"compose","s":"ῠ⃬","c":"ῠ⃬"} +{"g":"compose","s":"ϋ𖬱","d":"ϋ𖬱"} +{"g":"compose","s":"ὐ","c":"ὐ"} +{"g":"compose","s":"υⷱ̔"} +{"g":"compose","s":"ῦ𑤽","d":"ῦ𑤽"} +{"g":"compose","s":"ὼ","c":"ὼ"} +{"g":"compose","s":"ω࢞́"} +{"g":"compose","s":"ὠ𑚷","d":"ὠ𑚷"} +{"g":"compose","s":"ὡ","c":"ὡ"} +{"g":"compose","s":"ῶ꯭","c":"ῶ꯭"} +{"g":"compose","s":"ῳࣶ","d":"ῳࣶ"} +{"g":"compose","s":"ῒ","c":"ῒ","d":"ῒ"} +{"g":"compose","s":"ϊ𞊮́","d":"ϊ𞊮́"} +{"g":"compose","s":"ῗ᳟","d":"ῗ᳟"} +{"g":"compose","s":"ῢ","c":"ῢ","d":"ῢ"} +{"g":"compose","s":"ϋ𐵪́","d":"ϋ𐵪́"} +{"g":"compose","s":"ῧܷ","d":"ῧܷ"} +{"g":"compose","s":"ῴ","c":"ῴ","d":"ῴ"} +{"g":"compose","s":"ϒ𞀔́"} +{"g":"compose","s":"ϔ𝆫","d":"ϔ𝆫"} +{"g":"compose","s":"Ї","c":"Ї","l":"ї"} +{"g":"compose","s":"Аܳ̆","l":"аܳ̆"} +{"g":"compose","s":"Ӓ᭄","d":"Ӓ᭄","l":"ӓ᭄"} +{"g":"compose","s":"Ѓ","c":"Ѓ","l":"ѓ"} +{"g":"compose","s":"Ѐ᷼","c":"Ѐ᷼","d":"Ѐ᷼","l":"ѐ᷼"} +{"g":"compose","s":"Ӗ𑅳","d":"Ӗ𑅳","l":"ӗ𑅳"} +{"g":"compose","s":"Ё","c":"Ё","l":"ё"} +{"g":"compose","s":"Жࣗ̆","l":"жࣗ̆"} +{"g":"compose","s":"Ӝ꣯","d":"Ӝ꣯","l":"ӝ꣯"} +{"g":"compose","s":"Ӟ","c":"Ӟ","l":"ӟ"} +{"g":"compose","s":"И̐̀","l":"и̐̀"} +{"g":"compose","s":"Ӣᷯ","d":"Ӣᷯ","l":"ӣᷯ"} +{"g":"compose","s":"Й","c":"Й","l":"й"} +{"g":"compose","s":"И𞥆̈","l":"и𞥆̈"} +{"g":"compose","s":"Ќᷥ","d":"Ќᷥ","l":"ќᷥ"} +{"g":"compose","s":"Ӧ","c":"Ӧ","l":"ӧ"} +{"g":"compose","s":"У𐽌̄","l":"у𐽌̄"} +{"g":"compose","s":"Ў͠","d":"Ў͠","l":"ў͠"} +{"g":"compose","s":"Ӱ","c":"Ӱ","l":"ӱ"} +{"g":"compose","s":"Ӳ່","c":"Ӳ່","l":"ӳ່"} +{"g":"compose","s":"Ӵٖ","d":"Ӵٖ","l":"ӵٖ"} +{"g":"compose","s":"Ӹ","c":"Ӹ","l":"ӹ"} +{"g":"compose","s":"Ӭ⃒","c":"Ӭ⃒","l":"ӭ⃒"} +{"g":"compose","s":"ӑ࢙","d":"ӑ࢙"} +{"g":"compose","s":"ӓ","c":"ӓ"} +{"g":"compose","s":"ѓ᷽","c":"ѓ᷽"} +{"g":"compose","s":"ѐͧ","d":"ѐͧ"} +{"g":"compose","s":"ӗ","c":"ӗ"} +{"g":"compose","s":"е߰̈"} +{"g":"compose","s":"ӂࣟ","d":"ӂࣟ"} +{"g":"compose","s":"ӝ","c":"ӝ"} +{"g":"compose","s":"ӟׇ","c":"ӟׇ"} +{"g":"compose","s":"ѝ𑍰","d":"ѝ𑍰"} +{"g":"compose","s":"ӣ","c":"ӣ"} +{"g":"compose","s":"й̺","c":"й̺"} +{"g":"compose","s":"ӥׂ","d":"ӥׂ"} +{"g":"compose","s":"ќ","c":"ќ"} +{"g":"compose","s":"о⃖̈"} +{"g":"compose","s":"ӯ᪶","d":"ӯ᪶"} +{"g":"compose","s":"ў","c":"ў"} +{"g":"compose","s":"уٗ̈"} +{"g":"compose","s":"ӳͩ","d":"ӳͩ"} +{"g":"compose","s":"ӵ","c":"ӵ"} +{"g":"compose","s":"ӹ𑧠","c":"ӹ𑧠"} +{"g":"compose","s":"ӭ𝆋","d":"ӭ𝆋"} +{"g":"compose","s":"ї","c":"ї"} +{"g":"compose","s":"Ѷ๊","c":"Ѷ๊","l":"ѷ๊"} +{"g":"compose","s":"ѷꪸ","d":"ѷꪸ"} +{"g":"compose","s":"Ӛ","c":"Ӛ","l":"ӛ"} +{"g":"compose","s":"әؗ̈"} +{"g":"compose","s":"Ӫ͢","d":"Ӫ͢","l":"ӫ͢"} +{"g":"compose","s":"ӫ","c":"ӫ"} +{"g":"compose","s":"ا𞀅ٓ"} +{"g":"compose","s":"أܽ","d":"أܽ"} +{"g":"compose","s":"إ","c":"إ"} +{"g":"compose","s":"وͪٔ"} +{"g":"compose","s":"ئ߰","d":"ئ߰"} +{"g":"compose","s":"ۂ","c":"ۂ"} +{"g":"compose","s":"ۓᢩ","c":"ۓᢩ"} +{"g":"compose","s":"ۀ᷑","d":"ۀ᷑"} +{"g":"compose","s":"ऩ","c":"ऩ"} +{"g":"compose","s":"ऱ̤","c":"ऱ̤","d":"ऱ̤"} +{"g":"compose","s":"ऴ𐵭","d":"ऴ𐵭"} +{"g":"compose","s":"ো","c":"ো"} +{"g":"compose","s":"ে𝅿ৗ"} +{"g":"compose","s":"ୋ𖫴","d":"ୋ𖫴"} +{"g":"compose","s":"ୈ","c":"ୈ"} +{"g":"compose","s":"େ𑄁ୗ"} +{"g":"compose","s":"ஔ̴","d":"ஔ̴"} +{"g":"compose","s":"ொ","c":"ொ"} +{"g":"compose","s":"ெ𑌻ௗ"} +{"g":"compose","s":"ோ᫜","d":"ோ᫜"} +{"g":"compose","s":"ై","c":"ై"} +{"g":"compose","s":"ಿ᪰ೕ"} +{"g":"compose","s":"ೊ͌","d":"ೊ͌"} +{"g":"compose","s":"ೇ","c":"ೇ"} +{"g":"compose","s":"ೆ𝅰ೖ"} +{"g":"compose","s":"ೋᷱ","d":"ೋᷱ"} +{"g":"compose","s":"ൊ","c":"ൊ"} +{"g":"compose","s":"െ᫝ൗ"} +{"g":"compose","s":"ോ᬴","d":"ോ᬴"} +{"g":"compose","s":"ේ","c":"ේ"} +{"g":"compose","s":"ෙ𑰿ා"} +{"g":"compose","s":"ෞ𝆭","d":"ෞ𝆭"} +{"g":"compose","s":"ෝ","c":"ෝ","d":"ෝ"} +{"g":"compose","s":"ဥ៝ီ"} +{"g":"compose","s":"ᬆ᫦","d":"ᬆ᫦"} +{"g":"compose","s":"ᬈ","c":"ᬈ"} +{"g":"compose","s":"ᬉ꪿ᬵ"} +{"g":"compose","s":"ᬌ𐨹","d":"ᬌ𐨹"} +{"g":"compose","s":"ᬎ","c":"ᬎ"} +{"g":"compose","s":"ᬑ഼ᬵ"} +{"g":"compose","s":"ᬻ𝆈","d":"ᬻ𝆈"} +{"g":"compose","s":"ᬽ","c":"ᬽ"} +{"g":"compose","s":"ᬾⷽᬵ"} +{"g":"compose","s":"ᭁࣕ","d":"ᭁࣕ"} +{"g":"compose","s":"ᭃ","c":"ᭃ"} +{"g":"compose","s":"Ḷ͗̄","d":"Ḷ͗̄","l":"ḷ͗̄"} +{"g":"compose","s":"ḹ᪳","d":"ḹ᪳"} +{"g":"compose","s":"Ṝ","c":"Ṝ","d":"Ṝ","l":"ṝ"} +{"g":"compose","s":"ṝ᪸","c":"ṝ᪸","d":"ṝ᪸"} +{"g":"compose","s":"Ṩ︬","d":"Ṩ︬","l":"ṩ︬"} +{"g":"compose","s":"ṩ","c":"ṩ","d":"ṩ"} +{"g":"compose","s":"Ạ͆̂","d":"Ạ͆̂","l":"ạ͆̂"} +{"g":"compose","s":"Ặܺ","d":"Ặܺ","l":"ặܺ"} +{"g":"compose","s":"ậ","c":"ậ","d":"ậ"} +{"g":"compose","s":"ạ𞋯̆","d":"ạ𞋯̆"} +{"g":"compose","s":"Ệⷨ","d":"Ệⷨ","l":"ệⷨ"} +{"g":"compose","s":"ệ","c":"ệ","d":"ệ"} +{"g":"compose","s":"Ọ𝆪̂","d":"Ọ𝆪̂","l":"ọ𝆪̂"} +{"g":"compose","s":"ộ𑋩","d":"ộ𑋩"} +{"g":"compose","s":"ἂ","c":"ἂ","d":"ἂ"} +{"g":"compose","s":"ἄ𑠺","c":"ἄ𑠺","d":"ἄ𑠺"} +{"g":"compose","s":"ἆֿ","d":"ἆֿ"} +{"g":"compose","s":"ᾀ","c":"ᾀ","d":"ᾀ"} +{"g":"compose","s":"ἁ̈̀","d":"ἁ̈̀"} +{"g":"compose","s":"ἅ𝅥","d":"ἅ𝅥"} +{"g":"compose","s":"ἇ","c":"ἇ","d":"ἇ"} +{"g":"compose","s":"ᾁ݇","c":"ᾁ݇","d":"ᾁ݇"} +{"g":"compose","s":"ᾂׂ","d":"ᾂׂ"} +{"g":"compose","s":"ᾃ","c":"ᾃ","d":"ᾃ"} +{"g":"compose","s":"ᾄ༹","c":"ᾄ༹","d":"ᾄ༹"} +{"g":"compose","s":"ᾅ͉","d":"ᾅ͉"} +{"g":"compose","s":"ᾆ","c":"ᾆ","d":"ᾆ"} +{"g":"compose","s":"ᾇ྄","c":"ᾇ྄","d":"ᾇ྄"} +{"g":"compose","s":"Ἂ𞄲","d":"Ἂ𞄲","l":"ἂ𞄲"} +{"g":"compose","s":"Ἄ","c":"Ἄ","d":"Ἄ","l":"ἄ"} +{"g":"compose","s":"Ἀᷨ͂","d":"Ἀᷨ͂","l":"ἀᷨ͂"} +{"g":"compose","s":"ᾈ͖","d":"ᾈ͖","l":"ᾀ͖"} +{"g":"compose","s":"Ἃ","c":"Ἃ","d":"Ἃ","l":"ἃ"} +{"g":"compose","s":"Ἅ𐻿","c":"Ἅ𐻿","d":"Ἅ𐻿","l":"ἅ𐻿"} +{"g":"compose","s":"Ἇܳ","d":"Ἇܳ","l":"ἇܳ"} +{"g":"compose","s":"ᾉ","c":"ᾉ","d":"ᾉ","l":"ᾁ"} +{"g":"compose","s":"ᾊ𑁿","c":"ᾊ𑁿","d":"ᾊ𑁿","l":"ᾂ𑁿"} +{"g":"compose","s":"ᾋ᫃","d":"ᾋ᫃","l":"ᾃ᫃"} +{"g":"compose","s":"ᾌ","c":"ᾌ","d":"ᾌ","l":"ᾄ"} +{"g":"compose","s":"ᾍ᰷","c":"ᾍ᰷","d":"ᾍ᰷","l":"ᾅ᰷"} +{"g":"compose","s":"ᾎ𝅼","d":"ᾎ𝅼","l":"ᾆ𝅼"} +{"g":"compose","s":"ᾏ","c":"ᾏ","d":"ᾏ","l":"ᾇ"} +{"g":"compose","s":"ἒ̪","c":"ἒ̪","d":"ἒ̪"} +{"g":"compose","s":"ἔ꪿","d":"ἔ꪿"} +{"g":"compose","s":"ἓ","c":"ἓ","d":"ἓ"} +{"g":"compose","s":"ἕ𐽎","c":"ἕ𐽎","d":"ἕ𐽎"} +{"g":"compose","s":"Ἒⷺ","d":"Ἒⷺ","l":"ἒⷺ"} +{"g":"compose","s":"Ἔ","c":"Ἔ","d":"Ἔ","l":"ἔ"} +{"g":"compose","s":"Ἓ゚","c":"Ἓ゚","d":"Ἓ゚","l":"ἓ゚"} +{"g":"compose","s":"Ἕ𑁿","d":"Ἕ𑁿","l":"ἕ𑁿"} +{"g":"compose","s":"ἢ","c":"ἢ","d":"ἢ"} +{"g":"compose","s":"ἠ᩷́","d":"ἠ᩷́"} +{"g":"compose","s":"ἦ𝆅","d":"ἦ𝆅"} +{"g":"compose","s":"ᾐ","c":"ᾐ","d":"ᾐ"} +{"g":"compose","s":"ἡ𐾄̀","d":"ἡ𐾄̀"} +{"g":"compose","s":"ἥ𐽊","d":"ἥ𐽊"} +{"g":"compose","s":"ἧ","c":"ἧ","d":"ἧ"} +{"g":"compose","s":"ᾑᷬ","c":"ᾑᷬ","d":"ᾑᷬ"} +{"g":"compose","s":"ᾒࠧ","d":"ᾒࠧ"} +{"g":"compose","s":"ᾓ","c":"ᾓ","d":"ᾓ"} +{"g":"compose","s":"ᾔ࡙","c":"ᾔ࡙","d":"ᾔ࡙"} +{"g":"compose","s":"ᾕ֖","d":"ᾕ֖"} +{"g":"compose","s":"ᾖ","c":"ᾖ","d":"ᾖ"} +{"g":"compose","s":"ᾗ࿆","c":"ᾗ࿆","d":"ᾗ࿆"} +{"g":"compose","s":"Ἢ᭄","d":"Ἢ᭄","l":"ἢ᭄"} +{"g":"compose","s":"Ἤ","c":"Ἤ","d":"Ἤ","l":"ἤ"} +{"g":"compose","s":"Ἠࣞ͂","d":"Ἠࣞ͂","l":"ἠࣞ͂"} +{"g":"compose","s":"ᾘ᭫","d":"ᾘ᭫","l":"ᾐ᭫"} +{"g":"compose","s":"Ἣ","c":"Ἣ","d":"Ἣ","l":"ἣ"} +{"g":"compose","s":"Ἡᷱ́","d":"Ἡᷱ́","l":"ἡᷱ́"} +{"g":"compose","s":"Ἧ્","d":"Ἧ્","l":"ἧ્"} +{"g":"compose","s":"ᾙ","c":"ᾙ","d":"ᾙ","l":"ᾑ"} +{"g":"compose","s":"ᾚ᳔","c":"ᾚ᳔","d":"ᾚ᳔","l":"ᾒ᳔"} +{"g":"compose","s":"ᾛ᪼","d":"ᾛ᪼","l":"ᾓ᪼"} +{"g":"compose","s":"ᾜ","c":"ᾜ","d":"ᾜ","l":"ᾔ"} +{"g":"compose","s":"ᾝⷼ","c":"ᾝⷼ","d":"ᾝⷼ","l":"ᾕⷼ"} +{"g":"compose","s":"ᾞ᩼","d":"ᾞ᩼","l":"ᾖ᩼"} +{"g":"compose","s":"ᾟ","c":"ᾟ","d":"ᾟ","l":"ᾗ"} +{"g":"compose","s":"ἲ߲","c":"ἲ߲","d":"ἲ߲"} +{"g":"compose","s":"ἴ᷅","d":"ἴ᷅"} +{"g":"compose","s":"ἶ","c":"ἶ","d":"ἶ"} +{"g":"compose","s":"ἳܻ","c":"ἳܻ","d":"ἳܻ"} +{"g":"compose","s":"ἵࠣ","d":"ἵࠣ"} +{"g":"compose","s":"ἷ","c":"ἷ","d":"ἷ"} +{"g":"compose","s":"Ἲ𝅽","c":"Ἲ𝅽","d":"Ἲ𝅽","l":"ἲ𝅽"} +{"g":"compose","s":"Ἴ᳸","d":"Ἴ᳸","l":"ἴ᳸"} +{"g":"compose","s":"Ἶ","c":"Ἶ","d":"Ἶ","l":"ἶ"} +{"g":"compose","s":"Ἱᷕ̀","d":"Ἱᷕ̀","l":"ἱᷕ̀"} +{"g":"compose","s":"Ἵ𞀔","d":"Ἵ𞀔","l":"ἵ𞀔"} +{"g":"compose","s":"Ἷ","c":"Ἷ","d":"Ἷ","l":"ἷ"} +{"g":"compose","s":"ὂ่","c":"ὂ่","d":"ὂ่"} +{"g":"compose","s":"ὄ꣫","d":"ὄ꣫"} +{"g":"compose","s":"ὃ","c":"ὃ","d":"ὃ"} +{"g":"compose","s":"ὁ𐫥́","d":"ὁ𐫥́"} +{"g":"compose","s":"Ὂ̃","d":"Ὂ̃","l":"ὂ̃"} +{"g":"compose","s":"Ὄ","c":"Ὄ","d":"Ὄ","l":"ὄ"} +{"g":"compose","s":"Ὁ𞀡̀","d":"Ὁ𞀡̀","l":"ὁ𞀡̀"} +{"g":"compose","s":"Ὅ𑋪","d":"Ὅ𑋪","l":"ὅ𑋪"} +{"g":"compose","s":"ὒ","c":"ὒ","d":"ὒ"} +{"g":"compose","s":"ὔ᯳","c":"ὔ᯳","d":"ὔ᯳"} +{"g":"compose","s":"ὖꪰ","d":"ὖꪰ"} +{"g":"compose","s":"ὓ","c":"ὓ","d":"ὓ"} +{"g":"compose","s":"ὑᷢ́","d":"ὑᷢ́"} +{"g":"compose","s":"ὗࣻ","d":"ὗࣻ"} +{"g":"compose","s":"Ὓ","c":"Ὓ","d":"Ὓ","l":"ὓ"} +{"g":"compose","s":"Ὕ⃭","c":"Ὕ⃭","d":"Ὕ⃭","l":"ὕ⃭"} +{"g":"compose","s":"Ὗ𑅳","d":"Ὗ𑅳","l":"ὗ𑅳"} +{"g":"compose","s":"ὢ","c":"ὢ","d":"ὢ"} +{"g":"compose","s":"ὠ𖬱́","d":"ὠ𖬱́"} +{"g":"compose","s":"ὦ꣪","d":"ὦ꣪"} +{"g":"compose","s":"ᾠ","c":"ᾠ","d":"ᾠ"} +{"g":"compose","s":"ὡᷘ̀","d":"ὡᷘ̀"} +{"g":"compose","s":"ὥᷥ","d":"ὥᷥ"} +{"g":"compose","s":"ὧ","c":"ὧ","d":"ὧ"} +{"g":"compose","s":"ᾡٖ","c":"ᾡٖ","d":"ᾡٖ"} +{"g":"compose","s":"ᾢꪾ","d":"ᾢꪾ"} +{"g":"compose","s":"ᾣ","c":"ᾣ","d":"ᾣ"} +{"g":"compose","s":"ᾤ𞓭","c":"ᾤ𞓭","d":"ᾤ𞓭"} +{"g":"compose","s":"ᾥܴ","d":"ᾥܴ"} +{"g":"compose","s":"ᾦ","c":"ᾦ","d":"ᾦ"} +{"g":"compose","s":"ᾧ᤻","c":"ᾧ᤻","d":"ᾧ᤻"} +{"g":"compose","s":"Ὢ𞛣","d":"Ὢ𞛣","l":"ὢ𞛣"} +{"g":"compose","s":"Ὤ","c":"Ὤ","d":"Ὤ","l":"ὤ"} +{"g":"compose","s":"Ὠ҄͂","d":"Ὠ҄͂","l":"ὠ҄͂"} +{"g":"compose","s":"ᾨ࢝","d":"ᾨ࢝","l":"ᾠ࢝"} +{"g":"compose","s":"Ὣ","c":"Ὣ","d":"Ὣ","l":"ὣ"} +{"g":"compose","s":"Ὡ᷄́","d":"Ὡ᷄́","l":"ὡ᷄́"} +{"g":"compose","s":"Ὧ꣱","d":"Ὧ꣱","l":"ὧ꣱"} +{"g":"compose","s":"ᾩ","c":"ᾩ","d":"ᾩ","l":"ᾡ"} +{"g":"compose","s":"ᾪࣟ","c":"ᾪࣟ","d":"ᾪࣟ","l":"ᾢࣟ"} +{"g":"compose","s":"ᾫྃ","d":"ᾫྃ","l":"ᾣྃ"} +{"g":"compose","s":"ᾬ","c":"ᾬ","d":"ᾬ","l":"ᾤ"} +{"g":"compose","s":"ᾭ݁","c":"ᾭ݁","d":"ᾭ݁","l":"ᾥ݁"} +{"g":"compose","s":"ᾮ꦳","d":"ᾮ꦳","l":"ᾦ꦳"} +{"g":"compose","s":"ᾯ","c":"ᾯ","d":"ᾯ","l":"ᾧ"} +{"g":"compose","s":"ᾲࠖ","c":"ᾲࠖ","d":"ᾲࠖ"} +{"g":"compose","s":"ῂ𞣑","d":"ῂ𞣑"} +{"g":"compose","s":"ῲ","c":"ῲ","d":"ῲ"} +{"g":"compose","s":"ᾷ̦","c":"ᾷ̦","d":"ᾷ̦"} +{"g":"compose","s":"῍͂","d":"῍͂"} +{"g":"compose","s":"῎","c":"῎"} +{"g":"compose","s":"῏̯","c":"῏̯"} +{"g":"compose","s":"ῇ࣑","d":"ῇ࣑"} +{"g":"compose","s":"ῷ","c":"ῷ","d":"ῷ"} +{"g":"compose","s":"῾ࠞ̀"} +{"g":"compose","s":"῞𞛦","d":"῞𞛦"} +{"g":"compose","s":"῟","c":"῟"} +{"g":"compose","s":"↚ࣷ","c":"↚ࣷ","d":"↚ࣷ"} +{"g":"compose","s":"↛᫂","d":"↛᫂"} +{"g":"compose","s":"↮","c":"↮"} +{"g":"compose","s":"⇍꣰","c":"⇍꣰","d":"⇍꣰"} +{"g":"compose","s":"⇏ꙵ","d":"⇏ꙵ"} +{"g":"compose","s":"⇎","c":"⇎"} +{"g":"compose","s":"∄𑄀","c":"∄𑄀","d":"∄𑄀"} +{"g":"compose","s":"∉᳥","d":"∉᳥"} +{"g":"compose","s":"∌","c":"∌"} +{"g":"compose","s":"∤្","c":"∤្","d":"∤្"} +{"g":"compose","s":"∦ฺ","d":"∦ฺ"} +{"g":"compose","s":"≁","c":"≁"} +{"g":"compose","s":"≄𞄶","c":"≄𞄶","d":"≄𞄶"} +{"g":"compose","s":"≇ٓ","d":"≇ٓ"} +{"g":"compose","s":"≉","c":"≉"} +{"g":"compose","s":"≭ᷴ","c":"≭ᷴ","d":"≭ᷴ"} +{"g":"compose","s":"≢᳔","d":"≢᳔"} +{"g":"compose","s":"≰","c":"≰"} +{"g":"compose","s":"≱໊","c":"≱໊","d":"≱໊"} +{"g":"compose","s":"≴ᢩ","d":"≴ᢩ"} +{"g":"compose","s":"≵","c":"≵"} +{"g":"compose","s":"≸᭳","c":"≸᭳","d":"≸᭳"} +{"g":"compose","s":"≹𝆇","d":"≹𝆇"} +{"g":"compose","s":"⊀","c":"⊀"} +{"g":"compose","s":"≻᫝̸","c":"⊁᫝","d":"⊁᫝"} +{"g":"compose","s":"⋠𐍸","d":"⋠𐍸"} +{"g":"compose","s":"⋡","c":"⋡"} +{"g":"compose","s":"⊄ࠜ","c":"⊄ࠜ","d":"⊄ࠜ"} +{"g":"compose","s":"⊅᳨","d":"⊅᳨"} +{"g":"compose","s":"⊈","c":"⊈"} +{"g":"compose","s":"⊉࣠","c":"⊉࣠","d":"⊉࣠"} +{"g":"compose","s":"⋢಼","d":"⋢಼"} +{"g":"compose","s":"⋣","c":"⋣"} +{"g":"compose","s":"⊬̽","c":"⊬̽","d":"⊬̽"} +{"g":"compose","s":"⊭֤","d":"⊭֤"} +{"g":"compose","s":"⊮","c":"⊮"} +{"g":"compose","s":"⊯ֵ","c":"⊯ֵ","d":"⊯ֵ"} +{"g":"compose","s":"⋪︡","d":"⋪︡"} +{"g":"compose","s":"⋫","c":"⋫"} +{"g":"compose","s":"⋬͘","c":"⋬͘","d":"⋬͘"} +{"g":"compose","s":"⋭𑈶","d":"⋭𑈶"} +{"g":"compose","s":"ゔ","c":"ゔ"} +{"g":"compose","s":"が̻","c":"が̻","d":"が̻"} +{"g":"compose","s":"ぎ்","d":"ぎ்"} +{"g":"compose","s":"ぐ","c":"ぐ"} +{"g":"compose","s":"げְ","c":"げְ","d":"げְ"} +{"g":"compose","s":"ごࣟ","d":"ごࣟ"} +{"g":"compose","s":"ざ","c":"ざ"} +{"g":"compose","s":"し᫦゙","c":"じ᫦","d":"じ᫦"} +{"g":"compose","s":"ず҃","d":"ず҃"} +{"g":"compose","s":"ぜ","c":"ぜ"} +{"g":"compose","s":"ぞ𑍳","c":"ぞ𑍳","d":"ぞ𑍳"} +{"g":"compose","s":"だ𑨴","d":"だ𑨴"} +{"g":"compose","s":"ぢ","c":"ぢ"} +{"g":"compose","s":"づ̓","c":"づ̓","d":"づ̓"} +{"g":"compose","s":"でࠞ","d":"でࠞ"} +{"g":"compose","s":"ど","c":"ど"} +{"g":"compose","s":"ばᷚ","c":"ばᷚ","d":"ばᷚ"} +{"g":"compose","s":"ぱ߳","d":"ぱ߳"} +{"g":"compose","s":"び","c":"び"} +{"g":"compose","s":"ぴٔ","c":"ぴٔ","d":"ぴٔ"} +{"g":"compose","s":"ぶ𝆭","d":"ぶ𝆭"} +{"g":"compose","s":"ぷ","c":"ぷ"} +{"g":"compose","s":"べ⃘","c":"べ⃘"} +{"g":"compose","s":"ぺᷔ","d":"ぺᷔ"} +{"g":"compose","s":"ぼ","c":"ぼ"} +{"g":"compose","s":"ぽ𞣐","c":"ぽ𞣐","d":"ぽ𞣐"} +{"g":"compose","s":"ゞ᫏","d":"ゞ᫏"} +{"g":"compose","s":"ヴ","c":"ヴ"} +{"g":"compose","s":"ガ࣌","c":"ガ࣌","d":"ガ࣌"} +{"g":"compose","s":"ギ𞣔","d":"ギ𞣔"} +{"g":"compose","s":"グ","c":"グ"} +{"g":"compose","s":"ゲ᤺","c":"ゲ᤺","d":"ゲ᤺"} +{"g":"compose","s":"ゴ͉","d":"ゴ͉"} +{"g":"compose","s":"ザ","c":"ザ"} +{"g":"compose","s":"ジ࠭","c":"ジ࠭","d":"ジ࠭"} +{"g":"compose","s":"ズ꛰","d":"ズ꛰"} +{"g":"compose","s":"ゼ","c":"ゼ"} +{"g":"compose","s":"ゾ𑈶","c":"ゾ𑈶"} +{"g":"compose","s":"ダ်","d":"ダ်"} +{"g":"compose","s":"ヂ","c":"ヂ"} +{"g":"compose","s":"ヅ࿆","c":"ヅ࿆","d":"ヅ࿆"} +{"g":"compose","s":"デི","d":"デི"} +{"g":"compose","s":"ド","c":"ド"} +{"g":"compose","s":"バ𐽉","c":"バ𐽉","d":"バ𐽉"} +{"g":"compose","s":"パ𑍳","d":"パ𑍳"} +{"g":"compose","s":"ビ","c":"ビ"} +{"g":"compose","s":"ピ𞗮","c":"ピ𞗮","d":"ピ𞗮"} +{"g":"compose","s":"ブ𐺬","d":"ブ𐺬"} +{"g":"compose","s":"プ","c":"プ"} +{"g":"compose","s":"ベ࠙","c":"ベ࠙","d":"ベ࠙"} +{"g":"compose","s":"ペؒ","d":"ペؒ"} +{"g":"compose","s":"ボ","c":"ボ"} +{"g":"compose","s":"ポ݂","c":"ポ݂","d":"ポ݂"} +{"g":"compose","s":"ヷ𞀧","d":"ヷ𞀧"} +{"g":"compose","s":"ヸ","c":"ヸ"} +{"g":"compose","s":"ヹ꣠","c":"ヹ꣠","d":"ヹ꣠"} +{"g":"compose","s":"ヺ᭳","d":"ヺ᭳"} +{"g":"compose","s":"ヾ","c":"ヾ"} +{"g":"compose","s":"𐗉︫","c":"𐗉︫"} +{"g":"compose","s":"𐗤ٚ","d":"𐗤ٚ"} +{"g":"compose","s":"𑂚","c":"𑂚"} +{"g":"compose","s":"𑂜͐","c":"𑂜͐","d":"𑂜͐"} +{"g":"compose","s":"𑂫𑌻","d":"𑂫𑌻"} +{"g":"compose","s":"𑄮","c":"𑄮"} +{"g":"compose","s":"𑄲ٌ𑄧"} +{"g":"compose","s":"𑍋ۙ","d":"𑍋ۙ"} +{"g":"compose","s":"𑍌","c":"𑍌"} +{"g":"compose","s":"𑎂ͥ𑏉"} +{"g":"compose","s":"𑎅᪳","d":"𑎅᪳"} +{"g":"compose","s":"𑎎","c":"𑎎"} +{"g":"compose","s":"𑎐𑏐𑏉"} +{"g":"compose","s":"𑏇𞓬","d":"𑏇𞓬"} +{"g":"compose","s":"𑏅","c":"𑏅"} +{"g":"compose","s":"𑏂ͥ𑏉"} +{"g":"compose","s":"𑒼𝅨","d":"𑒼𝅨"} +{"g":"compose","s":"𑒻","c":"𑒻"} +{"g":"compose","s":"𑒹𞀖𑒽"} +{"g":"compose","s":"𑖺ࣵ","d":"𑖺ࣵ"} +{"g":"compose","s":"𑖻","c":"𑖻"} +{"g":"compose","s":"𑤵𐽏𑤰"} +{"g":"compose","s":"𖄡ꙶ","d":"𖄡ꙶ"} +{"g":"compose","s":"𖄣","c":"𖄣"} +{"g":"compose","s":"𖄞݆𖄠"} +{"g":"compose","s":"𖄢ٙ","d":"𖄢ٙ"} +{"g":"compose","s":"𖄦","c":"𖄦","d":"𖄦"} +{"g":"compose","s":"𖄡࢟𖄠","d":"𖄡࢟𖄠"} +{"g":"compose","s":"𖄧ֽ","d":"𖄧ֽ"} +{"g":"compose","s":"𖄤","c":"𖄤"} +{"g":"compose","s":"𖵣𞀧𖵧"} +{"g":"compose","s":"𖵨𞄱","d":"𖵨𞄱"} +{"g":"compose","s":"𖵪","c":"𖵪","d":"𖵪"} +{"g":"triple","s":"ỹ𐾃⃭","d":"ỹ𐾃⃭"} +{"g":"triple","s":"Ὧࣟ̐","d":"Ὧࣟ̐","l":"ὧࣟ̐"} +{"g":"triple","s":"ケ҅̚","c":"ケ҅̚","d":"ケ҅̚"} +{"g":"triple","s":"Ὅ֮𑄁","c":"Ὅ֮𑄁","d":"Ὅ֮𑄁","l":"ὅ֮𑄁"} +{"g":"triple","s":"ᾦ゙𞛵","d":"ὦ゙𞛵ͅ"} +{"g":"triple","s":"ᾤ֥ᷯ","c":"ᾤ֥ᷯ","d":"ᾤ֥ᷯ"} +{"g":"triple","s":"ᾫ𐺫ྃ","d":"ᾫ𐺫ྃ","l":"ᾣ𐺫ྃ"} +{"g":"triple","s":"ḣْ່","c":"ḣْ່","d":"ḣْ່"} +{"g":"triple","s":"ᾥ᩠᫝","d":"ω᩠᫝̔́ͅ"} +{"g":"triple","s":"Ἰ᫂᫪","d":"Ἰ᫂᫪","l":"ἰ᫂᫪"} +{"g":"triple","s":"ē𞋯͂","d":"ē𞋯͂"} +{"g":"triple","s":"ω᜕᳸"} +{"g":"triple","s":"η𞓮ⷯ"} +{"g":"triple","s":"ᾒؐۨ","d":"ᾒؐۨ"} +{"g":"triple","s":"T࢚᫨","l":"t࢚᫨"} +{"g":"triple","s":"C̝⳰","l":"c̝⳰"} +{"g":"triple","s":"し𑥃𑇀"} +{"g":"triple","s":"ಿ๊꣫"} +{"g":"triple","s":"Ǻֳⷲ","d":"Ǻֳⷲ","l":"ǻֳⷲ"} +{"g":"triple","s":"𑎄𑍪᫙"} +{"g":"triple","s":"żູ𐫦","c":"żູ𐫦","d":"żູ𐫦"} +{"g":"triple","s":"Ę᳧᤺","c":"Ę᳧᤺","d":"Ę᳧᤺","l":"ę᳧᤺"} +{"g":"triple","s":"ᾩ︮ꪲ","d":"ᾩ︮ꪲ","l":"ᾡ︮ꪲ"} +{"g":"triple","s":"t𞀞͠","c":"t𞀞͠","d":"t𞀞͠"} +{"g":"triple","s":"ビ᷊𞥅","c":"ビ᷊𞥅","d":"ビ᷊𞥅"} +{"g":"triple","s":"ӱ⃗᫂","d":"ӱ⃗᫂"} +{"g":"triple","s":"Ε〭᳑","c":"Ε〭᳑","d":"Ε〭᳑","l":"ε〭᳑"} +{"g":"triple","s":"Uۭᷖ","c":"Uۭᷖ","d":"Uۭᷖ","l":"uۭᷖ"} +{"g":"triple","s":"и𖫱֯"} +{"g":"triple","s":"フ࣬࢘"} +{"g":"triple","s":"ᭃ𐽈᤺","d":"ᭃ𐽈᤺"} +{"g":"triple","s":"υ꥓𞥈","c":"υ꥓𞥈","d":"υ꥓𞥈"} +{"g":"triple","s":"Ε᷊ᷛ","l":"ε᷊ᷛ"} +{"g":"triple","s":"Υ̧࢞","c":"Υ̧࢞","d":"Υ̧࢞","l":"υ̧࢞"} +{"g":"triple","s":"Ṡ𑶗߲","c":"Ṡ𑶗߲","d":"Ṡ𑶗߲","l":"ṡ𑶗߲"} +{"g":"triple","s":"Ȫ𑏎𞂏","c":"Ȫ𑏎𞂏","d":"Ȫ𑏎𞂏","l":"ȫ𑏎𞂏"} +{"g":"triple","s":"¨̱𐴧"} +{"g":"triple","s":"e𝆁꪿"} +{"g":"triple","s":"Ṷ𑁆𞣒","c":"Ṷ𑁆𞣒","d":"Ṷ𑁆𞣒","l":"ṷ𑁆𞣒"} +{"g":"triple","s":"Ŗ⃐͘","c":"Ŗ⃐͘","d":"Ŗ⃐͘","l":"ŗ⃐͘"} +{"g":"triple","s":"⊯𑏏ܷ","d":"⊯𑏏ܷ"} +{"g":"triple","s":"ೈ𐽐ࢗ","d":"ೈ𐽐ࢗ"} +{"g":"triple","s":"ズ᩶𞛮","d":"ズ᩶𞛮"} +{"g":"triple","s":"ṍ𞛣࣭","c":"ṍ࣭𞛣","d":"ṍ࣭𞛣"} +{"g":"triple","s":"Ệ𑈵ᫎ","c":"Ệ𑈵ᫎ","d":"Ệ𑈵ᫎ","l":"ệ𑈵ᫎ"} +{"g":"triple","s":"ᾱ̩ᷧ","d":"ᾱ̩ᷧ"} +{"g":"triple","s":"Ǧ᳔𞀨","d":"Ǧ᳔𞀨","l":"ǧ᳔𞀨"} +{"g":"triple","s":"𑎂ۘ︡"} +{"g":"triple","s":"À𝅦٘","c":"À𝅦٘","d":"À𝅦٘","l":"à𝅦٘"} +{"g":"triple","s":"Ą𑈵࣬","d":"Ą𑈵࣬","l":"ą𑈵࣬"} +{"g":"triple","s":"ǘ္֤","c":"ǘ္֤","d":"ǘ္֤"} +{"g":"triple","s":"Ẻᷭ͟","d":"Ẻᷭ͟","l":"ẻᷭ͟"} +{"g":"triple","s":"ୌ𞄳̉","d":"ୌ𞄳̉"} +{"g":"triple","s":"Ōࠗ̎","d":"Ōࠗ̎","l":"ōࠗ̎"} +{"g":"triple","s":"З𐵪𝉂","l":"з𐵪𝉂"} +{"g":"triple","s":"Ἰࠣ̔","d":"Ἰࠣ̔","l":"ἰࠣ̔"} +{"g":"triple","s":"ソ຺ࠬ","c":"ソ຺ࠬ","d":"ソ຺ࠬ"} +{"g":"triple","s":"Ë͍ࠛ","d":"Ë͍ࠛ","l":"ë͍ࠛ"} +{"g":"triple","s":"ϋ̽͑","d":"ϋ̽͑"} +{"g":"triple","s":"𖄞ܾ︣"} +{"g":"triple","s":"ṅ𑌼𞣒","d":"ṅ𑌼𞣒"} +{"g":"triple","s":"ヘ਼࣌"} +{"g":"triple","s":"E֚𝆭","c":"E֚𝆭","d":"E֚𝆭","l":"e֚𝆭"} +{"g":"triple","s":"Ü಼֯","d":"Ü಼֯","l":"ü಼֯"} +{"g":"triple","s":"Ǽ꣮ׄ","d":"Ǽ꣮ׄ","l":"ǽ꣮ׄ"} +{"g":"triple","s":"Ế𑑂᷈","d":"Ế𑑂᷈","l":"ế𑑂᷈"} +{"g":"triple","s":"ῆ်𞥅","d":"ῆ်𞥅"} +{"g":"triple","s":"u᜴͆","c":"u᜴͆","d":"u᜴͆"} +{"g":"triple","s":"ἱ๊ᷣ","c":"ἱ๊ᷣ","d":"ἱ๊ᷣ"} +{"g":"triple","s":"Ὺࣝ𝉄","d":"Ὺࣝ𝉄","l":"ὺࣝ𝉄"} +{"g":"triple","s":"Oׂ̢","c":"Oׂ̢","d":"Oׂ̢","l":"oׂ̢"} +{"g":"triple","s":"ẕ͉᫒","d":"ẕ͉᫒"} +{"g":"triple","s":"ᾧᷤۘ","d":"ᾧᷤۘ"} +{"g":"triple","s":"ț᳠᫦","c":"ț᫦᳠","d":"ț᫦᳠"} +{"g":"triple","s":"oֹ𝅱"} +{"g":"triple","s":"Ŝٙ̅","d":"Ŝٙ̅","l":"ŝٙ̅"} +{"g":"triple","s":"ἳູ͎","d":"ἳູ͎"} +{"g":"triple","s":"اܶᷤ"} +{"g":"triple","s":"h᳒ꪲ"} +{"g":"triple","s":"ウᷞۧ"} +{"g":"triple","s":"Ěׅ᷶","d":"Ěׅ᷶","l":"ěׅ᷶"} +{"g":"triple","s":"Ӂְ֛","d":"Ӂְ֛","l":"ӂְ֛"} +{"g":"triple","s":"Ἰֲ᷒","d":"Ἰֲ᷒","l":"ἰֲ᷒"} +{"g":"triple","s":"çࣥ̔","d":"çࣥ̔"} +{"g":"triple","s":"ο𖿰ࣘ","c":"ο𖿰ࣘ","d":"ο𖿰ࣘ"} +{"g":"triple","s":"uⷺ᳐"} +{"g":"triple","s":"≴𞀧ۨ","d":"≴𞀧ۨ"} +{"g":"triple","s":"Ч𖫰ࣜ","l":"ч𖫰ࣜ"} +{"g":"triple","s":"M֔𞀞","l":"m֔𞀞"} +{"g":"triple","s":"f࿆᷅"} +{"g":"triple","s":"Έؓ᫘","d":"Έؓ᫘","l":"έؓ᫘"} +{"g":"triple","s":"ẛ़͟","d":"ẛ़͟"} +{"g":"triple","s":"Ἠ᫤۫","d":"Ἠ᫤۫","l":"ἠ᫤۫"} +{"g":"triple","s":"Ự꣣֠","d":"Ự꣣֠","l":"ự꣣֠"} +{"g":"triple","s":"Ģ𞀌𞋯","d":"Ģ𞀌𞋯","l":"ģ𞀌𞋯"} +{"g":"triple","s":"𖄢𑇊〪","c":"𖄢𑇊〪","d":"𖄢𑇊〪"} +{"g":"triple","s":"Ṥ𐴦۫","d":"Ṥ𐴦۫","l":"ṥ𐴦۫"} +{"g":"triple","s":"ḷ្ꙶ","d":"ḷ្ꙶ"} +{"g":"triple","s":"⋣𑵅̟","c":"⋣𑵅̟","d":"⋣𑵅̟"} +{"g":"triple","s":"ω݈⃨"} +{"g":"triple","s":"Ἰ𝅻ࠝ","d":"Ἰ𝅻ࠝ","l":"ἰ𝅻ࠝ"} +{"g":"triple","s":"ᾏ֑༘","d":"ᾏ֑༘","l":"ᾇ֑༘"} +{"g":"triple","s":"は଼݀","c":"は଼݀","d":"は଼݀"} +{"g":"triple","s":"Ι่𝆫","l":"ι่𝆫"} +{"g":"triple","s":"B𞛦꛱","l":"b𞛦꛱"} +{"g":"triple","s":"𑎅ٜᷟ","d":"𑎅ٜᷟ"} +{"g":"triple","s":"Ηܹ̞","l":"ηܹ̞"} +{"g":"triple","s":"Ḑ়𑄀","d":"Ḑ়𑄀","l":"ḑ়𑄀"} +{"g":"triple","s":"y್࣯","c":"y್࣯","d":"y್࣯"} +{"g":"triple","s":"ȕܽ𐽊","d":"ȕܽ𐽊"} +{"g":"triple","s":"ᾂ࣌᫉","d":"ᾂ࣌᫉"} +{"g":"triple","s":"vྀ︨"} +{"g":"triple","s":"ễ̒̋","d":"ễ̒̋"} +{"g":"triple","s":"ಿ𞀘ᫎ"} +{"g":"triple","s":"Ο֙𞥄","l":"ο֙𞥄"} +{"g":"triple","s":"ὥ꤬᫊","d":"ὥ꤬᫊"} +{"g":"triple","s":"Ẇ𑠹ⷲ","d":"Ẇ𑠹ⷲ","l":"ẇ𑠹ⷲ"} +{"g":"triple","s":"ῶ᫨֠","d":"ῶ᫨֠"} +{"g":"triple","s":"e်᷌"} +{"g":"triple","s":"r᜴𐾂"} +{"g":"triple","s":"Ἐⷽ𑍴","d":"Ἐⷽ𑍴","l":"ἐⷽ𑍴"} +{"g":"triple","s":"Ἇᫀ͜","c":"Ἇᫀ͜","d":"Ἇᫀ͜","l":"ἇᫀ͜"} +{"g":"triple","s":"A𐾃ⷻ","c":"A𐾃ⷻ","d":"A𐾃ⷻ","l":"a𐾃ⷻ"} +{"g":"triple","s":"Ē⃚ᷮ","c":"Ē⃚ᷮ","d":"Ē⃚ᷮ","l":"ē⃚ᷮ"} +{"g":"triple","s":"ă⃕𖬱","d":"ă⃕𖬱"} +{"g":"triple","s":"lࣜ̃"} +{"g":"triple","s":"Ụ︥𝆉","d":"Ụ︥𝆉","l":"ụ︥𝆉"} +{"g":"triple","s":"Ἥ𝆋ࠛ","c":"Ἥ𝆋ࠛ","d":"Ἥ𝆋ࠛ","l":"ἥ𝆋ࠛ"} +{"g":"triple","s":"ěֱ᷀","d":"ěֱ᷀"} +{"g":"triple","s":"Ḓِ𞀘","c":"Ḓِ𞀘","d":"Ḓِ𞀘","l":"ḓِ𞀘"} +{"g":"triple","s":"ă𝆈ⷰ","d":"ă𝆈ⷰ"} +{"g":"triple","s":"Ӹ𑥃ۭ","d":"Ӹ𑥃ۭ","l":"ӹ𑥃ۭ"} +{"g":"triple","s":"ゼ᪷᫛","d":"ゼ᪷᫛"} +{"g":"triple","s":"Ο𐽐᳞","l":"ο𐽐᳞"} +{"g":"triple","s":"⊄ٚ࣡","d":"⊄ٚ࣡"} +{"g":"triple","s":"Ǫ֒𞓬","c":"Ǫ֒𞓬","d":"Ǫ֒𞓬","l":"ǫ֒𞓬"} +{"g":"triple","s":"𑎃߭꙯","d":"𑎃߭꙯"} +{"g":"triple","s":"ǎ〫꣨","c":"ǎ〫꣨","d":"ǎ〫꣨"} +{"g":"triple","s":"ṡ̶ꪰ","d":"ṡ̶ꪰ"} +{"g":"triple","s":"Ė〬𐻺","c":"Ė𐻺〬","d":"E𐻺̇〬","l":"ė〬𐻺"} +{"g":"triple","s":"ư𑍫ࣛ","d":"ư𑍫ࣛ"} +{"g":"triple","s":"ᾔ໋͙","d":"ᾔ໋͙"} +{"g":"triple","s":"Vܱٔ","l":"vܱٔ"} +{"g":"triple","s":"パ𖫴່","c":"パ𖫴່","d":"パ𖫴່"} +{"g":"triple","s":"Ῑ᳣⃰","c":"Ῑ᳣⃰","d":"Ῑ᳣⃰","l":"ῑ᳣⃰"} +{"g":"triple","s":"Ӧ𑓃𐵫","d":"Ӧ𑓃𐵫","l":"ӧ𑓃𐵫"} +{"g":"triple","s":"Nͥ꣢","l":"nͥ꣢"} +{"g":"triple","s":"Ö⃘͋","d":"Ö⃘͋","l":"ö⃘͋"} +{"g":"triple","s":"ὑ𖫳઼","d":"ὑ𖫳઼"} +{"g":"triple","s":"Ȑ𐴤͂","d":"Ȑ𐴤͂","l":"ȑ𐴤͂"} +{"g":"triple","s":"Ẏ𞀓⃩","d":"Ẏ𞀓⃩","l":"ẏ𞀓⃩"} +{"g":"triple","s":"ѓ̨𑍱","d":"ѓ̨𑍱"} +{"g":"triple","s":"E𑧠𞀝","c":"E𑧠𞀝","d":"E𑧠𞀝","l":"e𑧠𞀝"} +{"g":"triple","s":"Ơ̥ࣙ","c":"Ơ̥ࣙ","d":"Ơ̥ࣙ","l":"ơ̥ࣙ"} +{"g":"triple","s":"ṵ̯֭","c":"ṵ̯֭","d":"ṵ̯֭"} +{"g":"triple","s":"ж︯ܿ"} +{"g":"triple","s":"Ἔ꯭͝","c":"Ἔ꯭͝","d":"Ἔ꯭͝","l":"ἔ꯭͝"} +{"g":"triple","s":"Ṧ٘𞋯","d":"Ṧ٘𞋯","l":"ṧ٘𞋯"} +{"g":"triple","s":"D̠꣢","l":"d̠꣢"} +{"g":"triple","s":"ὥ̼ܳ","c":"ὥ̼ܳ","d":"ὥ̼ܳ"} +{"g":"triple","s":"Ἦࣚؒ","d":"Ἦࣚؒ","l":"ἦࣚؒ"} +{"g":"triple","s":"≤𞄶ⷬ"} +{"g":"triple","s":"Y𞂏͌","l":"y𞂏͌"} +{"g":"triple","s":"Ὗٙᷤ","d":"Ὗٙᷤ","l":"ὗٙᷤ"} +{"g":"triple","s":"č᷿̽","c":"č᷿̽","d":"č᷿̽"} +{"g":"triple","s":"s္ᷔ","c":"s္ᷔ","d":"s္ᷔ"} +{"g":"triple","s":"𑂥്ͭ","c":"𑂥്ͭ","d":"𑂥്ͭ"} +{"g":"triple","s":"A᳥ࠣ","c":"A᳥ࠣ","d":"A᳥ࠣ","l":"a᳥ࠣ"} +{"g":"triple","s":"S഻֗","l":"s഻֗"} +{"g":"triple","s":"Ṣ࡙۟","c":"Ṣ࡙۟","d":"Ṣ࡙۟","l":"ṣ࡙۟"} +{"g":"triple","s":"Â᳘𐍺","c":"Â᳘𐍺","d":"Â᳘𐍺","l":"â᳘𐍺"} +{"g":"triple","s":"ï଼᳠","c":"ï଼᳠","d":"ï଼᳠"} +{"g":"triple","s":"ḗ᪳꣭","d":"ḗ᪳꣭"} +{"g":"triple","s":"チ᫖ؑ"} +{"g":"triple","s":"eֳ᳠","c":"eֳ᳠","d":"eֳ᳠"} +{"g":"triple","s":"ᾌ਼̾","c":"ᾌ਼̾","d":"ᾌ਼̾","l":"ᾄ਼̾"} +{"g":"triple","s":"ऱ᫝᫑","d":"ऱ᫝᫑"} +{"g":"triple","s":"ᾗ࣑࢞","d":"ᾗ࣑࢞"} +{"g":"triple","s":"ᬍ᪲᫡"} +{"g":"triple","s":"ا𑂺ۡ","c":"ا𑂺ۡ","d":"ا𑂺ۡ"} +{"g":"triple","s":"ӗ𞣔݅","c":"ӗ𞣔݅","d":"ӗ𞣔݅"} +{"g":"triple","s":"R̊̄","l":"r̊̄"} +{"g":"triple","s":"ᬼ𑚶ͤ"} +{"g":"triple","s":"ȇٰู","d":"ȇٰู"} +{"g":"triple","s":"Ἢ֝ⷤ","d":"Ἢ֝ⷤ","l":"ἢ֝ⷤ"} +{"g":"triple","s":"Ἠ͙᩼","d":"Ἠ͙᩼","l":"ἠ͙᩼"} +{"g":"triple","s":"Ḃֹ࣒","c":"Ḃֹ࣒","d":"Ḃֹ࣒","l":"ḃֹ࣒"} +{"g":"triple","s":"ω̳̦"} +{"g":"triple","s":"ọ್۟","c":"ọ್۟","d":"ọ್۟"} +{"g":"triple","s":"í꦳𑩇","d":"í꦳𑩇"} +{"g":"triple","s":"aٗᫎ"} +{"g":"triple","s":"ŵ̠𐴥","d":"ŵ̠𐴥"} +{"g":"triple","s":"᾿𞀋︤"} +{"g":"triple","s":"ᬅ𑩇᫓"} +{"g":"triple","s":"Ẫؖꪸ","d":"Ẫؖꪸ","l":"ẫؖꪸ"} +{"g":"triple","s":"ỹ𝅻ؗ","d":"ỹ𝅻ؗ"} +{"g":"triple","s":"ᾫ̇ⷵ","d":"ᾫ̇ⷵ","l":"ᾣ̇ⷵ"} +{"g":"triple","s":"Aܴ᫇","c":"Aܴ᫇","d":"Aܴ᫇","l":"aܴ᫇"} +{"g":"triple","s":"і𞀄ࣳ"} +{"g":"triple","s":"е̳ⷣ","c":"е̳ⷣ","d":"е̳ⷣ"} +{"g":"triple","s":"Ἣ𑇀ܶ","d":"Ἣ𑇀ܶ","l":"ἣ𑇀ܶ"} +{"g":"triple","s":"こ્𐾃"} +{"g":"triple","s":"r᜴ͫ"} +{"g":"triple","s":"ᾁׁࣺ","c":"ᾁׁࣺ","d":"ᾁׁࣺ"} +{"g":"triple","s":"ᾘֺ𑍰","c":"ᾘֺ𑍰","d":"ᾘֺ𑍰","l":"ᾐֺ𑍰"} +{"g":"triple","s":"ô𞀏ᷦ","d":"ô𞀏ᷦ"} +{"g":"triple","s":"hⷲ𐍸"} +{"g":"triple","s":"Ι𑠹֔","l":"ι𑠹֔"} +{"g":"triple","s":"ạุ⃮","d":"ạุ⃮"} +{"g":"triple","s":"n꤭ࠩ"} +{"g":"triple","s":"Ễ͛᫤","d":"Ễ͛᫤","l":"ễ͛᫤"} +{"g":"triple","s":"ÿ꣮⃛","d":"ÿ꣮⃛"} +{"g":"triple","s":"ў༵ࠢ","d":"ў༵ࠢ"} +{"g":"triple","s":"ếⷢ᷶","d":"ếⷢ᷶"} +{"g":"triple","s":"Ḯ̻᩼","c":"Ḯ̻᩼","d":"Ḯ̻᩼","l":"ḯ̻᩼"} +{"g":"triple","s":"ᭀ๋ؗ","c":"ᭀ๋ؗ","d":"ᭀ๋ؗ"} +{"g":"triple","s":"῏⃫᯦","c":"῏⃫᯦","d":"῏⃫᯦"} +{"g":"triple","s":"ೆ઼ꪰ","c":"ೆ઼ꪰ","d":"ೆ઼ꪰ"} +{"g":"triple","s":"n᮫ⷳ"} +{"g":"triple","s":"ぼ𝅯⃐","c":"ぼ𝅯⃐","d":"ぼ𝅯⃐"} +{"g":"triple","s":"𑖹ཱ۟"} +{"g":"triple","s":"Ἠ̢̎","d":"Ἠ̢̎","l":"ἠ̢̎"} +{"g":"triple","s":"ᬾ࢜᷃"} +{"g":"triple","s":"Ä֓᫪","d":"Ä֓᫪","l":"ä֓᫪"} +{"g":"triple","s":"b𐾅྇"} +{"g":"triple","s":"ǹᷜ𞛯","d":"ǹᷜ𞛯"} +{"g":"triple","s":"ω݄᭳","c":"ω݄᭳","d":"ω݄᭳"} +{"g":"triple","s":"ヲ𖿰𐵫"} +{"g":"triple","s":"𑏂ꪴ᩹"} +{"g":"triple","s":"ă້̢","c":"ă້̢","d":"ă້̢"} +{"g":"triple","s":"ṙ᷻𐍹","d":"ṙ᷻𐍹"} +{"g":"triple","s":"I⃫֯","l":"i⃫֯"} +{"g":"triple","s":"t𑖿ࣼ","c":"t𑖿ࣼ","d":"t𑖿ࣼ"} +{"g":"triple","s":"ῐ࣊᫩","d":"ῐ࣊᫩"} +{"g":"triple","s":"Ĕ᷒𞀕","d":"Ĕ᷒𞀕","l":"ĕ᷒𞀕"} +{"g":"triple","s":"Ẕ࣑𞄰","d":"Ẕ࣑𞄰","l":"ẕ࣑𞄰"} +{"g":"triple","s":"Ǯֵٟ","c":"Ǯֵٟ","d":"Ǯֵٟ","l":"ǯֵٟ"} +{"g":"triple","s":"ے݈᳐","c":"ے݈᳐","d":"ے݈᳐"} +{"g":"triple","s":"Æ𞥆᭮","l":"æ𞥆᭮"} +{"g":"triple","s":"Аุ𞀂","l":"аุ𞀂"} +{"g":"triple","s":"Ấֹ᭭","d":"Ấֹ᭭","l":"ấֹ᭭"} +{"g":"triple","s":"ểꪷ᫇","d":"ểꪷ᫇"} +{"g":"triple","s":"プ̤࣌","c":"プ̤࣌","d":"プ̤࣌"} +{"g":"triple","s":"j֣꣰","c":"j֣꣰","d":"j֣꣰"} +{"g":"triple","s":"O᪱᫘","l":"o᪱᫘"} +{"g":"triple","s":"𑏂𞥊᳕"} +{"g":"triple","s":"Ṣٍ፝","c":"Ṣٍ፝","d":"Ṣٍ፝","l":"ṣٍ፝"} +{"g":"triple","s":"aֿ᷼","c":"aֿ᷼","d":"aֿ᷼"} +{"g":"triple","s":"グ᳣ᷩ","c":"グ᳣ᷩ","d":"グ᳣ᷩ"} +{"g":"triple","s":"a𑁆ౖ","c":"a𑁆ౖ","d":"a𑁆ౖ"} +{"g":"triple","s":"ỉ𑏐ﬞ","c":"ỉ𑏐ﬞ","d":"ỉ𑏐ﬞ"} +{"g":"triple","s":"у᳘𐻺"} +{"g":"triple","s":"ἑ͊ⷻ","d":"ἑ͊ⷻ"} +{"g":"triple","s":"Ȩ𝅼᷄","d":"Ȩ𝅼᷄","l":"ȩ𝅼᷄"} +{"g":"triple","s":"ἄّᫌ","d":"ἄّᫌ"} +{"g":"triple","s":"O𞄲ࣳ","l":"o𞄲ࣳ"} +{"g":"triple","s":"ちّ࣭","c":"ちّ࣭","d":"ちّ࣭"} +{"g":"triple","s":"T𐻿ࠣ","l":"t𐻿ࠣ"} +{"g":"triple","s":"Ὡ⃧ⷹ","d":"Ὡ⃧ⷹ","l":"ὡ⃧ⷹ"} +{"g":"triple","s":"ス᷽⃐"} +{"g":"triple","s":"Ὠࣲ𞋬","c":"Ὠࣲ𞋬","d":"Ὠࣲ𞋬","l":"ὠࣲ𞋬"} +{"g":"triple","s":"≲︭࣋","c":"≲︭࣋","d":"≲︭࣋"} +{"g":"triple","s":"シٔ۫"} +{"g":"triple","s":"E𝅱̿","l":"e𝅱̿"} +{"g":"triple","s":"а͊𖬶"} +{"g":"triple","s":"େ̛ᷳ","c":"େ̛ᷳ","d":"େ̛ᷳ"} +{"g":"triple","s":"Аׇ︤","l":"аׇ︤"} +{"g":"triple","s":"ụ︢꣤","d":"ụ︢꣤"} +{"g":"triple","s":"Ιࣞࠪ","l":"ιࣞࠪ"} +{"g":"triple","s":"ゴ᫠ࠝ","d":"ゴ᫠ࠝ"} +{"g":"triple","s":"ὁֶࠩ","d":"ὁֶࠩ"} +{"g":"triple","s":"Õ᯲ᷲ","c":"Õ᯲ᷲ","d":"Õ᯲ᷲ","l":"õ᯲ᷲ"} +{"g":"triple","s":"Ĩ𐵪ⷰ","d":"Ĩ𐵪ⷰ","l":"ĩ𐵪ⷰ"} +{"g":"triple","s":"e𑍴𐵪"} +{"g":"triple","s":"ќ𝅼ࣥ","d":"ќ𝅼ࣥ"} +{"g":"triple","s":"≤఼߮"} +{"g":"triple","s":"Ẋ̟𖬴","d":"Ẋ̟𖬴","l":"ẋ̟𖬴"} +{"g":"triple","s":"r࣏𞋭"} +{"g":"triple","s":"ǿ̴ٗ","d":"ǿ̴ٗ"} +{"g":"triple","s":"Ŵ̘᳠","d":"Ŵ̘᳠","l":"ŵ̘᳠"} +{"g":"triple","s":"Ӝ᳢ᷰ","c":"Ӝ᳢ᷰ","d":"Ӝ᳢ᷰ","l":"ӝ᳢ᷰ"} +{"g":"triple","s":"ἥ့𞀆","d":"ἥ့𞀆"} +{"g":"triple","s":"ẃ𑈵꣬","d":"ẃ𑈵꣬"} +{"g":"triple","s":"ὠ߲ۢ","d":"ὠ߲ۢ"} +{"g":"triple","s":"M︭̽","l":"m︭̽"} +{"g":"triple","s":"ḡ̶֤","d":"ḡ̶֤"} +{"g":"triple","s":"ツ𑏐ׇ"} +{"g":"triple","s":"Ἒ𑥃᪺","d":"Ἒ𑥃᪺","l":"ἒ𑥃᪺"} +{"g":"triple","s":"ẫ𞀃፟","d":"ẫ𞀃፟"} +{"g":"triple","s":"Ṉᷠ࣌","d":"Ṉᷠ࣌","l":"ṉᷠ࣌"} +{"g":"triple","s":"ἰ๋᳙","c":"ἰ๋᳙","d":"ἰ๋᳙"} +{"g":"triple","s":"ū๋𐵩","d":"ū๋𐵩"} +{"g":"triple","s":"Śⷻ᩷","d":"Śⷻ᩷","l":"śⷻ᩷"} +{"g":"triple","s":"Ẁ਼𑵄","d":"Ẁ਼𑵄","l":"ẁ਼𑵄"} +{"g":"triple","s":"Ỳ᷆ࠗ","d":"Ỳ᷆ࠗ","l":"ỳ᷆ࠗ"} +{"g":"triple","s":"ä᫖𞥆","d":"ä᫖𞥆"} +{"g":"triple","s":"ӓ𐇽֛","d":"ӓ𐇽֛"} +{"g":"triple","s":"Ū᪲᷼","d":"Ū᪲᷼","l":"ū᪲᷼"} +{"g":"triple","s":"w᷹ꚟ"} +{"g":"triple","s":"Ö᷐𐋠","d":"Ö᷐𐋠","l":"ö᷐𐋠"} +{"g":"triple","s":"ṩ꣦֝","d":"ṩ꣦֝"} +{"g":"triple","s":"𑍋ᷩ̈","d":"𑍋ᷩ̈"} +{"g":"triple","s":"ſ𞀧ࠖ"} +{"g":"triple","s":"ṱܼ𞀦","d":"ṱܼ𞀦"} +{"g":"triple","s":"A͊߬","l":"a͊߬"} +{"g":"triple","s":"Ẇ่𞀉","c":"Ẇ่𞀉","d":"Ẇ่𞀉","l":"ẇ่𞀉"} +{"g":"triple","s":"Ἱ⃘ٝ","d":"Ἱ⃘ٝ","l":"ἱ⃘ٝ"} +{"g":"triple","s":"sⷶ᳒"} +{"g":"triple","s":"ὢ𞛣ᷪ","d":"ὢ𞛣ᷪ"} +{"g":"triple","s":"N𑌻֥","c":"N𑌻֥","d":"N𑌻֥","l":"n𑌻֥"} +{"g":"triple","s":"Ú𝆁֘","c":"Ú𝆁֘","d":"Ú𝆁֘","l":"ú𝆁֘"} +{"g":"triple","s":"ӫܱ𐴤","d":"ӫܱ𐴤"} +{"g":"triple","s":"ōܾ᷆","c":"ōܾ᷆","d":"ōܾ᷆"} +{"g":"triple","s":"𑂫ܹ̏","d":"𑂫ܹ̏"} +{"g":"triple","s":"∤𐽏࠘","d":"∤𐽏࠘"} +{"g":"triple","s":"ṗ𝆀᪲","d":"ṗ𝆀᪲"} +{"g":"triple","s":"ऩⷮꙶ","d":"ऩⷮꙶ"} +{"g":"triple","s":"Ȯ̻𞀠","d":"Ȯ̻𞀠","l":"ȯ̻𞀠"} +{"g":"triple","s":"Ņ᳢̹","c":"Ņ᳢̹","d":"Ņ᳢̹","l":"ņ᳢̹"} +{"g":"triple","s":"ἄۜ︢","d":"ἄۜ︢"} +{"g":"triple","s":"ẽܸ̍","d":"ẽܸ̍"} +{"g":"triple","s":"Ѓ̬꣧","d":"Ѓ̬꣧","l":"ѓ̬꣧"} +{"g":"triple","s":"Oֱ᭭","l":"oֱ᭭"} +{"g":"triple","s":"o๊ܷ","c":"o๊ܷ","d":"o๊ܷ"} +{"g":"triple","s":"ἐ়𑠹","d":"ἐ়𑠹"} +{"g":"triple","s":"r᷽𑄀"} +{"g":"triple","s":"ờᷗ𞓯","d":"ờᷗ𞓯"} +{"g":"triple","s":"Ếᷣꚞ","d":"Ếᷣꚞ","l":"ếᷣꚞ"} +{"g":"triple","s":"H𑠹𖬵","l":"h𑠹𖬵"} +{"g":"triple","s":"ļ༹ࣘ","d":"ļ༹ࣘ"} +{"g":"triple","s":"ḷܲ͒","d":"ḷܲ͒"} +{"g":"triple","s":"ऱ̼𞀏","c":"ऱ̼𞀏","d":"ऱ̼𞀏"} +{"g":"triple","s":"Ủ⃦᷉","c":"Ủ⃦᷉","d":"Ủ⃦᷉","l":"ủ⃦᷉"} +{"g":"triple","s":"ợۣ꛰","c":"ợۣ꛰","d":"ợۣ꛰"} +{"g":"triple","s":"がܲ𝆭","d":"がܲ𝆭"} +{"g":"triple","s":"ȍ𞣓ͣ","c":"ȍ𞣓ͣ","d":"ȍ𞣓ͣ"} +{"g":"triple","s":"𖵩᜕࡛","c":"𖵩᜕࡛","d":"𖵩᜕࡛"} +{"g":"triple","s":"ṻ୍⵿","d":"ṻ୍⵿"} +{"g":"triple","s":"v꥓͌"} +{"g":"triple","s":"Ȁ𑽂ִ","c":"Ȁ𑽂ִ","d":"Ȁ𑽂ִ","l":"ȁ𑽂ִ"} +{"g":"triple","s":"῎᫠⃩","d":"῎᫠⃩"} +{"g":"triple","s":"ḑ꫁𞄲","d":"ḑ꫁𞄲"} +{"g":"triple","s":"W᳣𑄳","l":"w᳣𑄳"} +{"g":"triple","s":"Áٍ᪱","c":"Áٍ᪱","d":"Áٍ᪱","l":"áٍ᪱"} +{"g":"triple","s":"Ồ𞀛᪲","d":"Ồ𞀛᪲","l":"ồ𞀛᪲"} +{"g":"triple","s":"â᯲᭯","c":"â᯲᭯","d":"â᯲᭯"} +{"g":"triple","s":"R഻᫆","c":"R഻᫆","d":"R഻᫆","l":"r഻᫆"} +{"g":"triple","s":"ṭࣴ᷇","d":"ṭࣴ᷇"} +{"g":"triple","s":"o⃨𞀏"} +{"g":"triple","s":"آ༷𞀋","d":"آ༷𞀋"} +{"g":"triple","s":"sܸⷥ","c":"sܸⷥ","d":"sܸⷥ"} +{"g":"triple","s":"Ἕٓ𞀜","d":"Ἕٓ𞀜","l":"ἕٓ𞀜"} +{"g":"triple","s":"D𑍴ࣸ","l":"d𑍴ࣸ"} +{"g":"triple","s":"у࢝𑍧"} +{"g":"triple","s":"ư𑨴۠","c":"ư𑨴۠","d":"ư𑨴۠"} +{"g":"triple","s":"iꚞ𞛦"} +{"g":"triple","s":"ȧ𞣑͠","c":"ȧ𞣑͠","d":"ȧ𞣑͠"} +{"g":"triple","s":"ḥ𑠹᭮","d":"ḥ𑠹᭮"} +{"g":"triple","s":"l᳞𞀄"} +{"g":"triple","s":"ẗࣦᷠ","d":"ẗࣦᷠ"} +{"g":"triple","s":"ϋ𖿰ׅ","c":"ϋ𖿰ׅ","d":"ϋ𖿰ׅ"} +{"g":"triple","s":"≷̟ؗ","c":"≷̟ؗ","d":"≷̟ؗ"} +{"g":"triple","s":"ᾈ݂᳹","d":"ᾈ݂᳹","l":"ᾀ݂᳹"} +{"g":"triple","s":"ᾜ᪵𐵪","c":"ᾜ᪵𐵪","d":"ᾜ᪵𐵪","l":"ᾔ᪵𐵪"} +{"g":"triple","s":"Ơ֙ⷷ","d":"Ơ֙ⷷ","l":"ơ֙ⷷ"} +{"g":"triple","s":"ă᫢͕","c":"ă͕᫢","d":"ă͕᫢"} +{"g":"triple","s":"ῑࣰ꣣","c":"ῑࣰ꣣","d":"ῑࣰ꣣"} +{"g":"triple","s":"g֡𞄶"} +{"g":"triple","s":"إͣ߮","d":"إͣ߮"} +{"g":"triple","s":"Ἄ𑌼॓","d":"Ἄ𑌼॓","l":"ἄ𑌼॓"} +{"g":"triple","s":"ź⃫߯","d":"ź⃫߯"} +{"g":"triple","s":"O𑵂͜","c":"O𑵂͜","d":"O𑵂͜","l":"o𑵂͜"} +{"g":"triple","s":"u̗ͅ"} +{"g":"triple","s":"ஔ᩠᩷","d":"ஔ᩠᩷"} +{"g":"triple","s":"ゲⷹ҄","d":"ゲⷹ҄"} +{"g":"triple","s":"Ύ⃪഻","d":"Ύ⃪഻","l":"ύ⃪഻"} +{"g":"triple","s":"Έ઼͝","d":"Έ઼͝","l":"έ઼͝"} +{"g":"triple","s":"ύֶ⃖","d":"ύֶ⃖"} +{"g":"triple","s":"ぐ𑍴ࠫ","d":"ぐ𑍴ࠫ"} +{"g":"triple","s":"Ἥ︪ᢩ","c":"Ἥ︪ᢩ","d":"Ἥ︪ᢩ","l":"ἥ︪ᢩ"} +{"g":"triple","s":"ᾦ᷅𑍫","d":"ᾦ᷅𑍫"} +{"g":"triple","s":"Ω̜᫋","c":"Ω̜᫋","d":"Ω̜᫋","l":"ω̜᫋"} +{"g":"triple","s":"ă֤꣦","c":"ă֤꣦","d":"ă֤꣦"} +{"g":"triple","s":"eⷰ͂"} +{"g":"triple","s":"Ἧ꠆𑍱","d":"Ἧ꠆𑍱","l":"ἧ꠆𑍱"} +{"g":"triple","s":"Ḇࣖ᫑","d":"Ḇࣖ᫑","l":"ḇࣖ᫑"} +{"g":"triple","s":"tۭ𐽈","c":"tۭ𐽈","d":"tۭ𐽈"} +{"g":"triple","s":"∌্ྀ","c":"∌্ྀ","d":"∌্ྀ"} +{"g":"triple","s":"∌្ⷵ","c":"∌្ⷵ","d":"∌្ⷵ"} +{"g":"triple","s":"ெͩ᩼"} +{"g":"triple","s":"Ê𐻿ࠥ","d":"Ê𐻿ࠥ","l":"ê𐻿ࠥ"} +{"g":"triple","s":"ȗ︮𐍹","d":"ȗ︮𐍹"} +{"g":"triple","s":"t𑑂ࣻ"} +{"g":"triple","s":"Ơ𞥅𝆅","d":"Ơ𞥅𝆅","l":"ơ𞥅𝆅"} +{"g":"triple","s":"ἅٕᷛ","c":"ἅٕᷛ","d":"ἅٕᷛ"} +{"g":"triple","s":"Ἆⷫᷨ","d":"Ἆⷫᷨ","l":"ἆⷫᷨ"} +{"g":"triple","s":"aܾ̐","c":"aܾ̐","d":"aܾ̐"} +{"g":"triple","s":"ě꤭̌","d":"ě꤭̌"} +{"g":"triple","s":"Ί᷿𞛦","d":"Ί᷿𞛦","l":"ί᷿𞛦"} +{"g":"triple","s":"ἆོࣟ","d":"ἆོࣟ"} +{"g":"hangul","s":"너","c":"너"} +{"g":"hangul","s":"ꥨퟆ"} +{"g":"hangul","s":"쾨","c":"쾨"} +{"g":"hangul","s":"ᄫᆌ"} +{"g":"hangul","s":"ᄁᆏ"} +{"g":"hangul","s":"ᅁᆛ"} +{"g":"hangul","s":"ᄻᆤ"} +{"g":"hangul","s":"ꥴힷ"} +{"g":"hangul","s":"ꥯᅻ"} +{"g":"hangul","s":"ᄣힷ"} +{"g":"hangul","s":"ᄘᅦ"} +{"g":"hangul","s":"ᄾᆛ"} +{"g":"hangul","s":"ꥲퟅ"} +{"g":"hangul","s":"ꥴᅳ"} +{"g":"hangul","s":"ᄞᆖ"} +{"g":"hangul","s":"ᄱᆃ"} +{"g":"hangul","s":"ᅕᆊ"} +{"g":"hangul","s":"ꥼᅧ"} +{"g":"hangul","s":"ᄸᅰ"} +{"g":"hangul","s":"ᄤᆡ"} +{"g":"hangul","s":"ᅙힴ"} +{"g":"hangul","s":"ᄮᅠ"} +{"g":"hangul","s":"솨","c":"솨"} +{"g":"hangul","s":"ᄱᆊ"} +{"g":"hangul","s":"ꥦᆈ"} +{"g":"hangul","s":"ᄻힻ"} +{"g":"hangul","s":"ᄘힴ"} +{"g":"hangul","s":"ᄮힲ"} +{"g":"hangul","s":"ᄩힻ"} +{"g":"hangul","s":"ᄖᆞ"} +{"g":"hangul","s":"ᅓᆋ"} +{"g":"hangul","s":"ꥻᅲ"} +{"g":"hangul","s":"쀼","c":"쀼"} +{"g":"hangul","s":"ᄔᆕ"} +{"g":"hangul","s":"ᅂᅱ"} +{"g":"hangul","s":"ᄔᆤ"} +{"g":"hangul","s":"ᄩힰ"} +{"g":"hangul","s":"ᅜᅽ"} +{"g":"hangul","s":"ᅊᅬ"} +{"g":"hangul","s":"ᄞퟂ"} +{"g":"hangul","s":"ꥸᅱ"} +{"g":"hangul","s":"ᅆᅶ"} +{"g":"hangul","s":"ꥸᆋ"} +{"g":"hangul","s":"ᄖᆌ"} +{"g":"hangul","s":"ᄧᅴ"} +{"g":"hangul","s":"ꥡᅭ"} +{"g":"hangul","s":"ᄍᆓ"} +{"g":"hangul","s":"ᄤᆔ"} +{"g":"hangul","s":"뻐","c":"뻐"} +{"g":"hangul","s":"ᄚힰ"} +{"g":"hangul","s":"ᅝᅱ"} +{"g":"hangul","s":"ᄛᆇ"} +{"g":"hangul","s":"ᅘᆅ"} +{"g":"hangul","s":"ᄨᆧ"} +{"g":"hangul","s":"ᅆᅳ"} +{"g":"hangul","s":"ᅙힸ"} +{"g":"hangul","s":"ᅀᆆ"} +{"g":"hangul","s":"ᄘᅻ"} +{"g":"hangul","s":"ᅖᅨ"} +{"g":"hangul","s":"ᄺᆀ"} +{"g":"hangul","s":"ᄱᅨ"} +{"g":"hangul","s":"ꥫᅲ"} +{"g":"hangul","s":"ᄚᆚ"} +{"g":"hangul","s":"ᅑᆗ"} +{"g":"hangul","s":"ᅞힾ"} +{"g":"hangul","s":"ᅄᅮ"} +{"g":"hangul","s":"ᄌᆋ"} +{"g":"hangul","s":"ꥡᆖ"} +{"g":"hangul","s":"ꥳᅦ"} +{"g":"hangul","s":"ᄐힷ"} +{"g":"hangul","s":"ꥷᆘ"} +{"g":"hangul","s":"ᄽᆥ"} +{"g":"hangul","s":"ꥦᅢ"} +{"g":"hangul","s":"ᅞᅧ"} +{"g":"hangul","s":"ᄍힼ"} +{"g":"hangul","s":"ᄿᆏ"} +{"g":"hangul","s":"ᄂᆃ"} +{"g":"hangul","s":"ꥫᆉ"} +{"g":"hangul","s":"ᅑᆈ"} +{"g":"hangul","s":"ꥥᅲ"} +{"g":"hangul","s":"ꥱᆙ"} +{"g":"hangul","s":"ꥵᆚ"} +{"g":"hangul","s":"ᄢퟁ"} +{"g":"hangul","s":"ᅗᅳ"} +{"g":"hangul","s":"ꥲힿ"} +{"g":"hangul","s":"ᄖힼ"} +{"g":"hangul","s":"ᄮힷ"} +{"g":"hangul","s":"ᅛᅮ"} +{"g":"hangul","s":"ᅎᆏ"} +{"g":"hangul","s":"ᄭퟃ"} +{"g":"hangul","s":"ᄬᆂ"} +{"g":"hangul","s":"ᅅᆂ"} +{"g":"hangul","s":"ᅈᆕ"} +{"g":"hangul","s":"ᄘퟄ"} +{"g":"hangul","s":"ᄑᆑ"} +{"g":"hangul","s":"ᄻᆗ"} +{"g":"hangul","s":"ꥡᅧ"} +{"g":"hangul","s":"ᄃힴ"} +{"g":"hangul","s":"ꥣힾ"} +{"g":"hangul","s":"ᄣᅮ"} +{"g":"hangul","s":"ᄣᅸ"} +{"g":"hangul","s":"ᄩᆍ"} +{"g":"hangul","s":"ᅖᅽ"} +{"g":"hangul","s":"ᅚힹ"} +{"g":"hangul","s":"ᄚᅼ"} +{"g":"hangul","s":"ᄠᆢ"} +{"g":"hangul","s":"ꥷힾ"} +{"g":"hangul","s":"ᅖힺ"} +{"g":"hangul","s":"ᄇᆊ"} +{"g":"hangul","s":"ᄰᆀ"} +{"g":"hangul","s":"ᄈힺ"} +{"g":"hangul","s":"ᅔힿ"} +{"g":"hangul","s":"ᄫᆃ"} +{"g":"hangul","s":"ᄱᆀ"} +{"g":"hangul","s":"ᄝᅿ"} +{"g":"hangul","s":"ᅖퟂ"} +{"g":"hangul","s":"ᅏᅬ"} +{"g":"hangul","s":"ꥭퟆ"} +{"g":"hangul","s":"ꥣᆏ"} +{"g":"hangul","s":"ᄻힺ"} +{"g":"hangul","s":"ᄰᆦ"} +{"g":"hangul","s":"ᅗힿ"} +{"g":"hangul","s":"ᄂᅺ"} +{"g":"hangul","s":"ᅂᅫ"} +{"g":"hangul","s":"ꥴᆂ"} +{"g":"hangul","s":"ꥱힺ"} +{"g":"hangul","s":"ᄰힳ"} +{"g":"hangul","s":"ꥴᆅ"} +{"g":"hangul","s":"ᄒᆢ"} +{"g":"hangul","s":"ᅓᅴ"} +{"g":"hangul","s":"ꥢᆡ"} +{"g":"hangul","s":"ᄐᆝ"} +{"g":"hangul","s":"ᄳᅢ"} +{"g":"hangul","s":"ꥼᅡ"} +{"g":"hangul","s":"ꥹᆛ"} +{"g":"hangul","s":"ᅅᆚ"} +{"g":"hangul","s":"ᅚᆟ"} +{"g":"hangul","s":"ᅁힳ"} +{"g":"hangul","s":"ꥠᅺ"} +{"g":"hangul","s":"ᄨힿ"} +{"g":"hangul","s":"ᅌힰ"} +{"g":"hangul","s":"ᄼퟄ"} +{"g":"hangul","s":"ᄬᆅ"} +{"g":"hangul","s":"ꥷᅲ"} +{"g":"hangul","s":"ᄫᅸ"} +{"g":"hangul","s":"ᄌᆝ"} +{"g":"hangul","s":"ᄧᆏ"} +{"g":"hangul","s":"ᄼퟂ"} +{"g":"hangul","s":"ᄓᅥ"} +{"g":"hangul","s":"ꥩힰ"} +{"g":"hangul","s":"뜨ᇽ","d":"뜨ᇽ"} +{"g":"hangul","s":"태ᇱ","d":"태ᇱ"} +{"g":"hangul","s":"뜨ᇬ","d":"뜨ᇬ"} +{"g":"hangul","s":"매ᇩ","d":"매ᇩ"} +{"g":"hangul","s":"져ᇃ","d":"져ᇃ"} +{"g":"hangul","s":"두ᇆ","d":"두ᇆ"} +{"g":"hangul","s":"끼ᇜ","d":"끼ᇜ"} +{"g":"hangul","s":"봸","c":"봸","d":"봸"} +{"g":"hangul","s":"쥬ퟫ","d":"쥬ퟫ"} +{"g":"hangul","s":"쇷","c":"쇷","d":"쇷"} +{"g":"hangul","s":"에ퟨ","d":"에ퟨ"} +{"g":"hangul","s":"다ퟤ","d":"다ퟤ"} +{"g":"hangul","s":"뻬ᇏ","d":"뻬ᇏ"} +{"g":"hangul","s":"뀌ᇊ","d":"뀌ᇊ"} +{"g":"hangul","s":"비ᇮ","d":"비ᇮ"} +{"g":"hangul","s":"씨ퟋ","d":"씨ퟋ"} +{"g":"hangul","s":"댃","c":"댃","d":"댃"} +{"g":"hangul","s":"챼ᇈ","d":"챼ᇈ"} +{"g":"hangul","s":"킈ᇶ","d":"킈ᇶ"} +{"g":"hangul","s":"킺","c":"킺","d":"킺"} +{"g":"hangul","s":"췟","c":"췟","d":"췟"} +{"g":"hangul","s":"쭈ᇵ","d":"쭈ᇵ"} +{"g":"hangul","s":"스ퟥ","d":"스ퟥ"} +{"g":"hangul","s":"저ퟴ","d":"저ퟴ"} +{"g":"hangul","s":"섀ퟯ","d":"섀ퟯ"} +{"g":"hangul","s":"쯔ퟯ","d":"쯔ퟯ"} +{"g":"hangul","s":"꽈ퟚ","d":"꽈ퟚ"} +{"g":"hangul","s":"돠ퟔ","d":"돠ퟔ"} +{"g":"hangul","s":"욵","c":"욵","d":"욵"} +{"g":"hangul","s":"호ퟒ","d":"호ퟒ"} +{"g":"hangul","s":"괘ᇌ","d":"괘ᇌ"} +{"g":"hangul","s":"껴ퟢ","d":"껴ퟢ"} +{"g":"hangul","s":"여ퟋ","d":"여ퟋ"} +{"g":"hangul","s":"졔ᇲ","d":"졔ᇲ"} +{"g":"hangul","s":"콰ᇼ","d":"콰ᇼ"} +{"g":"hangul","s":"뇨ퟑ","d":"뇨ퟑ"} +{"g":"hangul","s":"뫄ᇏ","d":"뫄ᇏ"} +{"g":"hangul","s":"므ퟘ","d":"므ퟘ"} +{"g":"hangul","s":"뵤ᇔ","d":"뵤ᇔ"} +{"g":"hangul","s":"돼ퟝ","d":"돼ퟝ"} +{"g":"hangul","s":"디ᇥ","d":"디ᇥ"} +{"g":"hangul","s":"랱","c":"랱","d":"랱"} +{"g":"hangul","s":"뻬ᇝ","d":"뻬ᇝ"} +{"g":"hangul","s":"소ퟓ","d":"소ퟓ"} +{"g":"hangul","s":"똉","c":"똉","d":"똉"} +{"g":"hangul","s":"캬ᇬ","d":"캬ᇬ"} +{"g":"hangul","s":"괘ퟕ","d":"괘ퟕ"} +{"g":"hangul","s":"캐ᇱ","d":"캐ᇱ"} +{"g":"hangul","s":"곏","c":"곏","d":"곏"} +{"g":"hangul","s":"뿨ᇟ","d":"뿨ᇟ"} +{"g":"hangul","s":"싀ᇯ","d":"싀ᇯ"} +{"g":"hangul","s":"쑤ퟬ","d":"쑤ퟬ"} +{"g":"hangul","s":"뼞","c":"뼞","d":"뼞"} +{"g":"hangul","s":"뵤ᇛ","d":"뵤ᇛ"} +{"g":"hangul","s":"표ᇊ","d":"표ᇊ"} +{"g":"hangul","s":"뇨ퟨ","d":"뇨ퟨ"} +{"g":"hangul","s":"긙","c":"긙","d":"긙"} +{"g":"hangul","s":"루ퟻ","d":"루ퟻ"} +{"g":"hangul","s":"퐙","c":"퐙","d":"퐙"} +{"g":"hangul","s":"첝","c":"첝","d":"첝"} +{"g":"hangul","s":"타ᇶ","d":"타ᇶ"} +{"g":"hangul","s":"큐ퟲ","d":"큐ퟲ"} +{"g":"hangul","s":"퀴ᇩ","d":"퀴ᇩ"} +{"g":"hangul","s":"꿮","c":"꿮","d":"꿮"} +{"g":"hangul","s":"튿","c":"튿","d":"튿"} +{"g":"hangul","s":"뿌ᇻ","d":"뿌ᇻ"} +{"g":"hangul","s":"쒾","c":"쒾","d":"쒾"} +{"g":"hangul","s":"타ᇬ","d":"타ᇬ"} +{"g":"hangul","s":"뼤ᇲ","d":"뼤ᇲ"} +{"g":"hangul","s":"화ᇩ","d":"화ᇩ"} +{"g":"hangul","s":"가ᇸ","d":"가ᇸ"} +{"g":"hangul","s":"꿰ᇃ","d":"꿰ᇃ"} +{"g":"hangul","s":"섧","c":"섧","d":"섧"} +{"g":"hangul","s":"쟤ᇊ","d":"쟤ᇊ"} +{"g":"hangul","s":"웨ᇛ","d":"웨ᇛ"} +{"g":"hangul","s":"뒈ᆧ","d":"뒈ᆧ"} +{"g":"hangul","s":"쒸ퟱ","d":"쒸ퟱ"} +{"g":"hangul","s":"휘ᇻ","d":"휘ᇻ"} +{"g":"hangul","s":"퀴ᇑ","d":"퀴ᇑ"} +{"g":"hangul","s":"썌ퟜ","d":"썌ퟜ"} +{"g":"hangul","s":"꾀ퟰ","d":"꾀ퟰ"} +{"g":"hangul","s":"뮍","c":"뮍","d":"뮍"} +{"g":"hangul","s":"둒","c":"둒","d":"둒"} +{"g":"hangul","s":"찂","c":"찂","d":"찂"} +{"g":"hangul","s":"릐ᇭ","d":"릐ᇭ"} +{"g":"hangul","s":"끌","c":"끌","d":"끌"} +{"g":"hangul","s":"르ᇠ","d":"르ᇠ"} +{"g":"hangul","s":"수ᇢ","d":"수ᇢ"} +{"g":"hangul","s":"쵀ᇪ","d":"쵀ᇪ"} +{"g":"hangul","s":"즜","c":"즜","d":"즜"} +{"g":"hangul","s":"미ᇊ","d":"미ᇊ"} +{"g":"hangul","s":"로ퟣ","d":"로ퟣ"} +{"g":"hangul","s":"도ᇴ","d":"도ᇴ"} +{"g":"hangul","s":"쩌ퟞ","d":"쩌ퟞ"} +{"g":"hangul","s":"하ᇋ","d":"하ᇋ"} +{"g":"hangul","s":"빼ᇦ","d":"빼ᇦ"} +{"g":"hangul","s":"좌ᇄ","d":"좌ᇄ"} +{"g":"hangul","s":"넞","c":"넞","d":"넞"} +{"g":"hangul","s":"윖","c":"윖","d":"윖"} +{"g":"hangul","s":"놰ퟧ","d":"놰ퟧ"} +{"g":"hangul","s":"쐬ퟛ","d":"쐬ퟛ"} +{"g":"hangul","s":"됻","c":"됻","d":"됻"} +{"g":"hangul","s":"두ᇋ","d":"두ᇋ"} +{"g":"hangul","s":"트ퟔ","d":"트ퟔ"} +{"g":"hangul","s":"쇄ᇤ","d":"쇄ᇤ"} +{"g":"hangul","s":"퍼ퟏ","d":"퍼ퟏ"} +{"g":"hangul","s":"피ퟦ","d":"피ퟦ"} +{"g":"hangul","s":"치ퟨ","d":"치ퟨ"} +{"g":"hangul","s":"며ퟑ","d":"며ퟑ"} +{"g":"hangul","s":"쒸ퟰ","d":"쒸ퟰ"} +{"g":"hangul","s":"뚜ᇪ","d":"뚜ᇪ"} +{"g":"hangul","s":"므ퟏ","d":"므ퟏ"} +{"g":"hangul","s":"댙","c":"댙","d":"댙"} +{"g":"hangul","s":"뻪","c":"뻪","d":"뻪"} +{"g":"hangul","s":"쑈ퟰ","d":"쑈ퟰ"} +{"g":"hangul","s":"뻫","c":"뻫","d":"뻫"} +{"g":"hangul","s":"햬ᇎ","d":"햬ᇎ"} +{"g":"hangul","s":"녀ퟺ","d":"녀ퟺ"} +{"g":"hangul","s":"주ᇎ","d":"주ᇎ"} +{"g":"hangul","s":"퇭","c":"퇭","d":"퇭"} +{"g":"hangul","s":"틣","c":"틣","d":"틣"} +{"g":"hangul","s":"밳","c":"밳","d":"밳"} +{"g":"hangul","s":"줜","c":"줜","d":"줜"} +{"g":"hangul","s":"에ᇍ","d":"에ᇍ"} +{"g":"hangul","s":"륅","c":"륅","d":"륅"} +{"g":"hangul","s":"떄ᇗ","d":"떄ᇗ"} +{"g":"hangul","s":"퓌ퟸ","d":"퓌ퟸ"} +{"g":"hangul","s":"뼤ᇼ","d":"뼤ᇼ"} +{"g":"hangul","s":"즈ퟡ","d":"즈ퟡ"} +{"g":"hangul","s":"퇴ᇢ","d":"퇴ᇢ"} +{"g":"hangul","s":"베ᇑ","d":"베ᇑ"} +{"g":"hangul","s":"뫼ᇅ","d":"뫼ᇅ"} +{"g":"hangul","s":"큐ퟶ","d":"큐ퟶ"} +{"g":"hangul","s":"폐ᇟ","d":"폐ᇟ"} +{"g":"hangul","s":"트ᇾ","d":"트ᇾ"} +{"g":"hangul","s":"푸ᇅ","d":"푸ᇅ"} +{"g":"hangul","s":"몾","c":"몾","d":"몾"} +{"g":"hangul","s":"쾨ퟋ","d":"쾨ퟋ"} +{"g":"hangul","s":"똾","c":"똾","d":"똾"} +{"g":"hangul","s":"쫅","c":"쫅","d":"쫅"} +{"g":"hangul","s":"놨","c":"놨","d":"놨"} +{"g":"hangul","s":"뷓","c":"뷓","d":"뷓"} +{"g":"hangul","s":"츼ퟨ","d":"츼ퟨ"} +{"g":"hangul","s":"렡","c":"렡","d":"렡"} +{"g":"hangul","s":"닊","c":"닊","d":"닊"} +{"g":"hangul","s":"뷔ᇰ","d":"뷔ᇰ"} +{"g":"hangul","s":"꼐ퟭ","d":"꼐ퟭ"} +{"g":"hangul","s":"쟈ퟝ","d":"쟈ퟝ"} +{"g":"hangul","s":"노ᇭ","d":"노ᇭ"} +{"g":"hangul","s":"태ᇿ","d":"태ᇿ"} +{"g":"hangul","s":"ᆟꥭᇭᆓᆓ"} +{"g":"hangul","s":"ퟤퟫᆧᇑퟚᄟ"} +{"g":"hangul","s":"ᅜᇮ"} +{"g":"hangul","s":"ᆠᆥᇗᇂᄜᅅ"} +{"g":"hangul","s":"ᆀힳꥱ"} +{"g":"hangul","s":"ᅻꥴ"} +{"g":"hangul","s":"ᇡힼꥦᆇퟄ"} +{"g":"hangul","s":"ꥨᆾ"} +{"g":"hangul","s":"ᆨퟻꥺퟒퟒ"} +{"g":"hangul","s":"ᅮᇔ"} +{"g":"hangul","s":"ᇯᄷᄾ"} +{"g":"hangul","s":"ퟹᅽ"} +{"g":"hangul","s":"ᇡᆊꥫᇋퟶ"} +{"g":"hangul","s":"ᇫᄰᄩᅍ"} +{"g":"hangul","s":"ᄨᄥퟎ"} +{"g":"hangul","s":"ퟣᄜᄜᆁᄧ"} +{"g":"hangul","s":"ퟩᇎ"} +{"g":"hangul","s":"ퟬᄸ"} +{"g":"hangul","s":"ᆞᇵ"} +{"g":"hangul","s":"ᆒퟳᆅᆐꥹᅒ"} +{"g":"hangul","s":"ᅆᄯᇥᇊ"} +{"g":"hangul","s":"ᄇퟷᅙퟎ"} +{"g":"hangul","s":"ᄑퟦᄤᅏᅙᄗ"} +{"g":"hangul","s":"ᇆᅚᆢᅭᄥퟣ"} +{"g":"hangul","s":"ힹᅤᆘᄐힱힶ"} +{"g":"hangul","s":"ퟫᆵᆡ"} +{"g":"hangul","s":"ힷᅖᄽퟕᄽᅁ"} +{"g":"hangul","s":"ᆻᅋᆶᄎᆟퟐ"} +{"g":"hangul","s":"ᆅᅻힼힱᆵퟂ"} +{"g":"hangul","s":"ᆝᆋힽᇅᆣ"} +{"g":"hangul","s":"ퟂퟢ"} +{"g":"hangul","s":"ᄗᅕᆡ〮ᆌᅁ"} +{"g":"hangul","s":"ᅀᆑᅆퟟ"} +{"g":"hangul","s":"ᆞᄵᆶᄋ"} +{"g":"hangul","s":"ᇼᆚퟑ"} +{"g":"hangul","s":"ᇚᆿᆈ"} +{"g":"hangul","s":"ᅃᅭᄤᇐퟻᆠ"} +{"g":"hangul","s":"ᄠퟍᅌ"} +{"g":"hangul","s":"ᄆퟛ"} +{"g":"hangul","s":"ᆄᄯᄚᅋᇴퟍ"} +{"g":"hangul","s":"ᆩᆑᅿᅁퟦ"} +{"g":"hangul","s":"ᆔᇏ"} +{"g":"hangul","s":"ힷퟓᄁᅋᄟퟙ"} +{"g":"hangul","s":"ᅔᇓᅱힲᄽퟩ"} +{"g":"hangul","s":"ᆻퟲᅨᇹᅨퟬ"} +{"g":"hangul","s":"ᆿᆪퟎᅮ"} +{"g":"hangul","s":"ퟳᅮ"} +{"g":"hangul","s":"ᇬퟠᅓힶ"} +{"g":"hangul","s":"ᇃᅳᅂꥣᆭ"} +{"g":"hangul","s":"ᆉᅐᅚᆘᄕ"} +{"g":"hangul","s":"ꥵᆋퟻᅝ"} +{"g":"hangul","s":"ᄸᇀᄌ"} +{"g":"hangul","s":"ᆮퟭힷ"} +{"g":"hangul","s":"ᇖᅑퟃᆈ"} +{"g":"hangul","s":"ᅺꥡᅠᅏퟆ"} +{"g":"hangul","s":"ퟕᅧꥹힾᅢ"} +{"g":"hangul","s":"ퟩᇏᅃᄸ"} +{"g":"hangul","s":"ᅜᅵᅮᆑ"} +{"g":"hangul","s":"ᅙᄎ"} +{"g":"hangul","s":"ᆥᇆퟝᆻꥡᇏ"} +{"g":"hangul","s":"ᇊힻퟶퟃᅝᆫ"} +{"g":"hangul","s":"ᄡᅏ"} +{"g":"hangul","s":"ᅷᄔꥻᆮᇈힳ"} +{"g":"hangul","s":"ퟜᄄᆢퟳ"} +{"g":"hangul","s":"ᅳᄘᅺ"} +{"g":"hangul","s":"ᇉᄨꥭᆤᅴ"} +{"g":"hangul","s":"ᄨퟣᄏᇧᆪퟏ"} +{"g":"hangul","s":"ᄄꥤᇔᆣퟱ"} +{"g":"hangul","s":"ퟋᇟꥢᅊᅈ"} +{"g":"hangul","s":"ꥡᆒ"} +{"g":"hangul","s":"ꥻퟒퟩꥦ"} +{"g":"hangul","s":"ힸᅯᆪ"} +{"g":"hangul","s":"ᅚᇕ"} +{"g":"hangul","s":"ퟧᇞ"} +{"g":"hangul","s":"ퟩᅫ"} +{"g":"hangul","s":"ᆭᅫᆦ"} +{"g":"hangul","s":"ꥡᇶᄟᄾ"} +{"g":"hangul","s":"ᄌퟢힶᇌᄷ"} +{"g":"hangul","s":"ᇮꥷ"} +{"g":"hangul","s":"ퟃᆙힼᆌꥱᅏ"} +{"g":"hangul","s":"ퟀᆸퟓᆺᇢ"} +{"g":"hangul","s":"ퟏᇜᆐퟡ"} +{"g":"hangul","s":"ᇁퟆᆪᇯᄖ"} +{"g":"hangul","s":"ꥤᆘᅐᅂᄆᆭ"} +{"g":"hangul","s":"ퟆᆳᆡퟩ"} +{"g":"hangul","s":"ᄈᅾ"} +{"g":"hangul","s":"ᆗힹ"} +{"g":"hangul","s":"ᇱᇨힷ"} +{"g":"hangul","s":"ᄩᅘ"} +{"g":"hangul","s":"ᄿힸᄖᆫᅌᅉ"} +{"g":"hangul","s":"ᆩퟸᄪᆟ"} +{"g":"hangul","s":"ꥣꥨᅷᇻퟥ"} +{"g":"hangul","s":"ᅍᅘힴᄝ"} +{"g":"hangul","s":"ᅄᇲ"} +{"g":"hangul","s":"ᄋힻ"} +{"g":"hangul","s":"ᇘᇉᄰᄱᆺᅖ"} +{"g":"hangul","s":"ᇎᄪᆐꥢᇳ"} +{"g":"hangul","s":"ퟁᆞힲꥬힾᄦ"} +{"g":"hangul","s":"ᆓᅟᄤᆎᆈᆇ"} +{"g":"hangul","s":"ᄈꥢퟭ"} +{"g":"sigma","s":"Σ","l":"σ"} +{"g":"sigma","s":"AΣ","l":"aς"} +{"g":"sigma","s":"ΣA","l":"σa"} +{"g":"sigma","s":"AΣA","l":"aσa"} +{"g":"sigma","s":"ΟΔΟΣ","l":"οδος"} +{"g":"sigma","s":"ΟΔΟΣ A","l":"οδος a"} +{"g":"sigma","s":"AΣ.","l":"aς."} +{"g":"sigma","s":"A.Σ","l":"a.ς"} +{"g":"sigma","s":"AΣ.A","l":"aσ.a"} +{"g":"sigma","s":"AΣ'","l":"aς'"} +{"g":"sigma","s":"A'Σ","l":"a'ς"} +{"g":"sigma","s":"AΣ́","l":"aς́"} +{"g":"sigma","s":"ÁΣ","c":"ÁΣ","l":"áς"} +{"g":"sigma","s":"AΣͅ","l":"aςͅ"} +{"g":"sigma","s":"AͅΣ","l":"aͅς"} +{"g":"sigma","s":"ΣΣ","l":"σς"} +{"g":"sigma","s":"AΣΣ","l":"aσς"} +{"g":"sigma","s":"AΣΣA","l":"aσσa"} +{"g":"sigma","s":"1Σ","l":"1σ"} +{"g":"sigma","s":"A1Σ","l":"a1σ"} +{"g":"sigma","s":"ʰΣ","l":"ʰσ"} +{"g":"sigma","s":"AʰΣ","l":"aʰς"} +{"g":"sigma","s":"AΣʰ","l":"aςʰ"} +{"g":"sigma","s":"A­Σ","l":"a­ς"} +{"g":"sigma","s":"AΣ­","l":"aς­"} +{"g":"sigma","s":"AΣ­B","l":"aσ­b"} +{"g":"sigma","s":"İΣ","d":"İΣ","l":"i̇ς"} +{"g":"sigma","s":"aΣ bΣ","l":"aς bς"} +{"g":"sigma","s":"ἀΣ","d":"ἀΣ","l":"ἀς"} +{"g":"sigma","s":"ⒶΣ","l":"ⓐς"} +{"g":"sigma","s":"AΣⒶ","l":"aσⓐ"} +{"g":"sigma","s":"𐐀Σ","l":"𐐨ς"} +{"g":"sigma","s":"A‍Σ","l":"a‍ς"} +{"g":"sigma","s":"AΣ‍","l":"aς‍"} +{"g":"sigma","s":"AΣ️","l":"aς️"} +{"g":"sigma","s":"A:Σ:","l":"a:ς:"} +{"g":"sigma","s":"AΣ:B","l":"aσ:b"} +{"g":"sigma","s":"Σ","l":"σ"} +{"g":"sigma","s":"ͅ­"} +{"g":"sigma","s":"1"} +{"g":"sigma","s":"­İ­ͅ:­Σ­","d":"­İ­ͅ:­Σ­","l":"­i̇­ͅ:­ς­"} +{"g":"sigma","s":":İ1a 1","d":":İ1a 1","l":":i̇1a 1"} +{"g":"sigma","s":"ʰÁ","c":"ʰÁ","l":"ʰá"} +{"g":"sigma","s":"Ⓐ1‍:","l":"ⓐ1‍:"} +{"g":"sigma","s":"‍ʰaA","l":"‍ʰaa"} +{"g":"sigma","s":"ʰ:ͅ."} +{"g":"sigma","s":"A'­‍ͅΣİ","d":"A'­‍ͅΣİ","l":"a'­‍ͅσi̇"} +{"g":"sigma","s":".1ΣaA","l":".1σaa"} +{"g":"sigma","s":"1Σ1","l":"1σ1"} +{"g":"sigma","s":"ΣʰaA ","l":"σʰaa "} +{"g":"sigma","s":"'́İ","d":"'́İ","l":"'́i̇"} +{"g":"sigma","s":"1‍"} +{"g":"sigma","s":".İΣΣİ'‍'","d":".İΣΣİ'‍'","l":".i̇σσi̇'‍'"} +{"g":"sigma","s":"ͅ"} +{"g":"sigma","s":"'1ʰ1ͅ"} +{"g":"sigma","s":"' :Σ","l":"' :σ"} +{"g":"sigma","s":"­ΣʰʰͅA","l":"­σʰʰͅa"} +{"g":"sigma","s":"1Σʰa‍","l":"1σʰa‍"} +{"g":"sigma","s":".AΣ‍","l":".aς‍"} +{"g":"sigma","s":"':́Σa­","l":"':́σa­"} +{"g":"sigma","s":"Ⓐʰ‍a .ΣΣ","l":"ⓐʰ‍a .σς"} +{"g":"sigma","s":"ʰİİͅΣⒶΣ","d":"ʰİİͅΣⒶΣ","l":"ʰi̇i̇ͅσⓐς"} +{"g":"sigma","s":"1‍Σ1:':","l":"1‍σ1:':"} +{"g":"sigma","s":"İͅʰ:́Σ","d":"İͅʰ:́Σ","l":"i̇ͅʰ:́ς"} +{"g":"sigma","s":"."} +{"g":"sigma","s":"́"} +{"g":"sigma","s":"İA","d":"İA","l":"i̇a"} +{"g":"sigma","s":"'aΣİ‍Σ.","d":"'aΣİ‍Σ.","l":"'aσi̇‍ς."} +{"g":"sigma","s":"́́ ́İ:­","d":"́́ ́İ:­","l":"́́ ́i̇:­"} +{"g":"sigma","s":". İ ","d":". İ ","l":". i̇ "} +{"g":"sigma","s":"Σ́Σ́ʰ'Ⓐͅ","l":"σ́σ́ʰ'ⓐͅ"} +{"g":"sigma","s":":.‍"} +{"g":"sigma","s":"Σʰ1","l":"σʰ1"} +{"g":"sigma","s":"Σ.:.A­­ ","l":"σ.:.a­­ "} +{"g":"sigma","s":" ͅİΣ.á‍","c":" ͅİΣ.á‍","d":" ͅİΣ.á‍","l":" ͅi̇σ.á‍"} +{"g":"sigma","s":"'́"} +{"g":"sigma","s":"'Ⓐ‍:","l":"'ⓐ‍:"} +{"g":"sigma","s":"aΣ","l":"aς"} +{"g":"sigma","s":"ΣⒶͅʰ́ ","l":"σⓐͅʰ́ "} +{"g":"sigma","s":"İ '.:1­","d":"İ '.:1­","l":"i̇ '.:1­"} +{"g":"sigma","s":"́Ⓐ­­a'","l":"́ⓐ­­a'"} +{"g":"sigma","s":"́1Σ.Á'","c":"́1Σ.Á'","l":"́1σ.á'"} +{"g":"sigma","s":"́Ⓐ­","l":"́ⓐ­"} +{"g":"sigma","s":" a:A­.","l":" a:a­."} +{"g":"sigma","s":"ͅΣİ","d":"ͅΣİ","l":"ͅσi̇"} +{"g":"sigma","s":"Σͅ","l":"σͅ"} +{"g":"sigma","s":"ͅ"} +{"g":"sigma","s":"'ͅ‍a­a"} +{"g":"sigma","s":"­İ.","d":"­İ.","l":"­i̇."} +{"g":"sigma","s":"Σ.Ⓐ","l":"σ.ⓐ"} +{"g":"sigma","s":"1İʰ Ⓐ.:‍","d":"1İʰ Ⓐ.:‍","l":"1i̇ʰ ⓐ.:‍"} +{"g":"sigma","s":"Σʰ‍1","l":"σʰ‍1"} +{"g":"sigma","s":"1ΣⒶ‍Σ","l":"1σⓐ‍ς"} +{"g":"sigma","s":"­­‍:A1.1","l":"­­‍:a1.1"} +{"g":"sigma","s":"ʰ"} +{"g":"sigma","s":"Ⓐ'ͅ‍:ΣΣ ","l":"ⓐ'ͅ‍:σς "} +{"g":"sigma","s":"‍AİΣ ","d":"‍AİΣ ","l":"‍ai̇ς "} +{"g":"sigma","s":"́Σʰ́","l":"́σʰ́"} +{"g":"sigma","s":"­1.Σ­Aʰ","l":"­1.σ­aʰ"} +{"g":"sigma","s":"A","l":"a"} +{"g":"sigma","s":"­­ͅͅ A","l":"­­ͅͅ a"} +{"g":"sigma","s":"'İ'","d":"'İ'","l":"'i̇'"} +{"g":"sigma","s":"́ͅΣⒶ1","c":"́ͅΣⒶ1","d":"́ͅΣⒶ1","l":"́ͅσⓐ1"} +{"g":"sigma","s":"‍"} +{"g":"sigma","s":" ́‍aⒶ­","l":" ́‍aⓐ­"} +{"g":"sigma","s":"‍"} +{"g":"sigma","s":"ʰʰİ­a","d":"ʰʰİ­a","l":"ʰʰi̇­a"} +{"g":"sigma","s":"Σ́:ͅ‍","l":"σ́:ͅ‍"} +{"g":"sigma","s":"‍‍AͅİİΣ","d":"‍‍AͅİİΣ","l":"‍‍aͅi̇i̇ς"} +{"g":"sigma","s":" aΣ","l":" aς"} +{"g":"sigma","s":"Ⓐ1ΣΣa.","l":"ⓐ1σσa."} +{"g":"sigma","s":":"} +{"g":"sigma","s":":'́ͅʰaΣ","l":":'́ͅʰaς"} +{"g":"sigma","s":"ͅΣʰ‍ʰ.ʰa","l":"ͅσʰ‍ʰ.ʰa"} +{"g":"sigma","s":"ΣⒶA‍‍","l":"σⓐa‍‍"} +{"g":"sigma","s":"Σ­Ⓐ‍:Σ","l":"σ­ⓐ‍:ς"} +{"g":"sigma","s":"Σİİ1́","d":"Σİİ1́","l":"σi̇i̇1́"} +{"g":"sigma","s":"Σ́. ́́","l":"σ́. ́́"} +{"g":"sigma","s":"‍'ʰ­aaͅA","l":"‍'ʰ­aaͅa"} +{"g":"sigma","s":":.ⒶAΣΣA","l":":.ⓐaσσa"} +{"g":"sigma","s":"ⒶΣ­Σİͅʰ­","d":"ⒶΣ­Σİͅʰ­","l":"ⓐσ­σi̇ͅʰ­"} +{"g":"sigma","s":"1"} +{"g":"sigma","s":"́1ͅ A‍","l":"́1ͅ a‍"} +{"g":"sigma","s":"­."} +{"g":"sigma","s":"..Σ","l":"..σ"} +{"g":"sigma","s":".ʰ.ΣA","l":".ʰ.σa"} +{"g":"sigma","s":"a"} +{"g":"sigma","s":"ʰʰ"} +{"g":"sigma","s":"'"} +{"g":"sigma","s":"İΣͅ­Ⓐ","d":"İΣͅ­Ⓐ","l":"i̇σͅ­ⓐ"} +{"g":"sigma","s":" ͅ.İİ‍­'","d":" ͅ.İİ‍­'","l":" ͅ.i̇i̇‍­'"} +{"g":"sigma","s":".Σͅ­'","l":".σͅ­'"} +{"g":"sigma","s":"':ⒶΣ","l":"':ⓐς"} +{"g":"sigma","s":"aΣ","l":"aς"} +{"g":"sigma","s":"Σ1.:","l":"σ1.:"} +{"g":"sigma","s":"ͅ.Σ","l":"ͅ.σ"} +{"g":"sigma","s":"1‍'"} +{"g":"sigma","s":"İ:ʰͅ1ÁⒶ","c":"İ:ʰͅ1ÁⒶ","d":"İ:ʰͅ1ÁⒶ","l":"i̇:ʰͅ1áⓐ"} +{"g":"sigma","s":"Ⓐͅ‍Σ","l":"ⓐͅ‍ς"} +{"g":"sigma","s":"‍AΣ","l":"‍aς"} +{"g":"sigma","s":"Σ","l":"σ"} +{"g":"sigma","s":"ⒶİaⒶΣ","d":"ⒶİaⒶΣ","l":"ⓐi̇aⓐς"} +{"g":"sigma","s":"aİ­ͅ","d":"aİ­ͅ","l":"ai̇­ͅ"} +{"g":"sigma","s":"ͅ:1­"} +{"g":"sigma","s":"Ⓐ‍1a","l":"ⓐ‍1a"} +{"g":"sigma","s":"1.ͅA‍","l":"1.ͅa‍"} +{"g":"sigma","s":"1İ1:­‍","d":"1İ1:­‍","l":"1i̇1:­‍"} +{"g":"sigma","s":"Σ́Ⓐ ́","l":"σ́ⓐ ́"} +{"g":"sigma","s":".'"} +{"g":"sigma","s":"ΣΣ1‍Σ","l":"σς1‍σ"} +{"g":"sigma","s":"İͅⒶ","d":"İͅⒶ","l":"i̇ͅⓐ"} +{"g":"sigma","s":"Ⓐ­","l":"ⓐ­"} +{"g":"sigma","s":"‍́ ‍ΣA","l":"‍́ ‍σa"} +{"g":"sigma","s":"'İΣ:.İ‍","d":"'İΣ:.İ‍","l":"'i̇σ:.i̇‍"} +{"g":"sigma","s":"‍1 Ⓐ","l":"‍1 ⓐ"} +{"g":"sigma","s":"İⒶa:ʰ","d":"İⒶa:ʰ","l":"i̇ⓐa:ʰ"} +{"g":"sigma","s":"A:'ʰ ","l":"a:'ʰ "} +{"g":"sigma","s":"Ⓐ́Σ'́.aa","l":"ⓐ́σ'́.aa"} +{"g":"sigma","s":"İ­ͅ­A","d":"İ­ͅ­A","l":"i̇­ͅ­a"} +{"g":"sigma","s":"́ʰ'­.İ","d":"́ʰ'­.İ","l":"́ʰ'­.i̇"} +{"g":"sigma","s":"'a:́­"} +{"g":"sigma","s":"‍.́­.ʰ"} +{"g":"sigma","s":"Σ́","l":"σ́"} +{"g":"sigma","s":"‍a ́.á­","c":"‍a ́.á­"} +{"g":"sigma","s":"Σ́1aΣ","l":"σ́1aς"} +{"g":"sigma","s":"Σ ","l":"σ "} +{"g":"sigma","s":"İΣΣ","d":"İΣΣ","l":"i̇σς"} +{"g":"sigma","s":"Áͅ1","c":"Áͅ1","d":"Áͅ1","l":"áͅ1"} +{"g":"sigma","s":"ʰ́ΣΣΣ Σ","l":"ʰ́σσς σ"} +{"g":"sigma","s":"Ⓐ: 'İ'","d":"Ⓐ: 'İ'","l":"ⓐ: 'i̇'"} +{"g":"sigma","s":"1."} +{"g":"sigma","s":"AΣ‍ Ⓐa","l":"aς‍ ⓐa"} +{"g":"sigma","s":" 1"} +{"g":"sigma","s":"' AΣ‍Σ","l":"' aσ‍ς"} +{"g":"sigma","s":"İͅ‍A:ʰ1","d":"İͅ‍A:ʰ1","l":"i̇ͅ‍a:ʰ1"} +{"g":"sigma","s":"ΣⒶʰ","l":"σⓐʰ"} +{"g":"sigma","s":"­ʰ1ͅΣ́","l":"­ʰ1ͅσ́"} +{"g":"sigma","s":"ͅ11"} +{"g":"sigma","s":":Σʰ:.Ⓐ","l":":σʰ:.ⓐ"} +{"g":"sigma","s":"́1ͅ'İ1Σ1","d":"́1ͅ'İ1Σ1","l":"́1ͅ'i̇1σ1"} +{"g":"sigma","s":"AʰΣⒶʰͅΣa","l":"aʰσⓐʰͅσa"} +{"g":"sigma","s":"Ⓐ1.­ͅ­́.","l":"ⓐ1.­ͅ­́."} +{"g":"sigma","s":"1ʰʰ1‍AİA","d":"1ʰʰ1‍AİA","l":"1ʰʰ1‍ai̇a"} +{"g":"sigma","s":"Ⓐ1A:1","l":"ⓐ1a:1"} +{"g":"sigma","s":"‍':"} +{"g":"sigma","s":"Σİ","d":"Σİ","l":"σi̇"} +{"g":"sigma","s":"­́1ΣΣ","l":"­́1σς"} +{"g":"sigma","s":"ΣⒶ ","l":"σⓐ "} +{"g":"sigma","s":"ΣΣA'","l":"σσa'"} +{"g":"sigma","s":"A","l":"a"} +{"g":"sigma","s":"Ⓐ́Σ","l":"ⓐ́ς"} +{"g":"sigma","s":"­:1:­İ","d":"­:1:­İ","l":"­:1:­i̇"} +{"g":"sigma","s":"Σ","l":"σ"} +{"g":"sigma","s":"İ­ ","d":"İ­ ","l":"i̇­ "} +{"g":"sigma","s":"ʰʰ'a1.."} +{"g":"sigma","s":"ⒶΣ‍","l":"ⓐς‍"} +{"g":"sigma","s":"a"} +{"g":"sigma","s":"A: 'ͅaİΣ","d":"A: 'ͅaİΣ","l":"a: 'ͅai̇ς"} +{"g":"sigma","s":"'Ⓐİͅ.","d":"'Ⓐİͅ.","l":"'ⓐi̇ͅ."} +{"g":"sigma","s":"11‍:A","l":"11‍:a"} +{"g":"sigma","s":"Σʰ1́ͅ‍.ʰ","l":"σʰ1́ͅ‍.ʰ"} +{"g":"sigma","s":"‍İΣ","d":"‍İΣ","l":"‍i̇ς"} +{"g":"sigma","s":"AͅⒶ","l":"aͅⓐ"} +{"g":"sigma","s":"'A ­́","l":"'a ­́"} +{"g":"sigma","s":"ʰ ʰ"} +{"g":"sigma","s":"‍ͅ1 aΣΣ","l":"‍ͅ1 aσς"} +{"g":"sigma","s":":́"} +{"g":"sigma","s":":ͅ."} +{"g":"sigma","s":"Ⓐ:","l":"ⓐ:"} +{"g":"sigma","s":".ͅ:Ⓐa","l":".ͅ:ⓐa"} +{"g":"sigma","s":"Σ‍A1Ⓐa","l":"σ‍a1ⓐa"} +{"g":"sigma","s":"1 Σ: Ⓐa1","l":"1 σ: ⓐa1"} +{"g":"sigma","s":"‍ΣΣ","l":"‍σς"} +{"g":"sigma","s":"Ⓐ ","l":"ⓐ "} +{"g":"sigma","s":"1Σ","l":"1σ"} +{"g":"sigma","s":"1‍Σ‍́İ.","d":"1‍Σ‍́İ.","l":"1‍σ‍́i̇."} +{"g":"sigma","s":"Σ ­́Σ ","l":"σ ­́σ "} +{"g":"sigma","s":"­'"} +{"g":"sigma","s":" "} +{"g":"sigma","s":"a"} +{"g":"sigma","s":"́Σ","l":"́σ"} +{"g":"sigma","s":"Σ1'‍­İ‍","d":"Σ1'‍­İ‍","l":"σ1'‍­i̇‍"} +{"g":"sigma","s":"‍"} +{"g":"sigma","s":" ­́'1"} +{"g":"sigma","s":"'Ⓐ­A­ⒶΣ","l":"'ⓐ­a­ⓐς"} +{"g":"sigma","s":"Σ ́ͅaİ'ͅ","c":"Σ ́ͅaİ'ͅ","d":"Σ ́ͅaİ'ͅ","l":"σ ́ͅai̇'ͅ"} +{"g":"sigma","s":"A.İ.Áͅ","c":"A.İ.Áͅ","d":"A.İ.Áͅ","l":"a.i̇.áͅ"} +{"g":"sigma","s":":ʰ­Σ‍","l":":ʰ­σ‍"} +{"g":"sigma","s":"'ʰ'"} +{"g":"sigma","s":".A","l":".a"} +{"g":"sigma","s":"ʰaİⒶAa.","d":"ʰaİⒶAa.","l":"ʰai̇ⓐaa."} +{"g":"sigma","s":"ʰͅ"} +{"g":"sigma","s":"‍"} +{"g":"sigma","s":" aa:ʰⒶ 1","l":" aa:ʰⓐ 1"} +{"g":"sigma","s":"Σİ́a Σ:ʰ","d":"Σİ́a Σ:ʰ","l":"σi̇́a σ:ʰ"} +{"g":"sigma","s":"ʰ­1:ʰ "} +{"g":"sigma","s":".aʰⒶ","l":".aʰⓐ"} +{"g":"sigma","s":"­Ⓐ́́Σ","l":"­ⓐ́́ς"} +{"g":"sigma","s":"ʰ"} +{"g":"sigma","s":"́Σa.","l":"́σa."} +{"g":"sigma","s":" .́‍ʰ­1"} +{"g":"sigma","s":"­ͅΣ","l":"­ͅσ"} +{"g":"sigma","s":"ʰ‍Ⓐ11","l":"ʰ‍ⓐ11"} +{"g":"sigma","s":"Ⓐaʰ́ ΣaⒶ","l":"ⓐaʰ́ σaⓐ"} +{"g":"sigma","s":"‍Σ­'","l":"‍σ­'"} +{"g":"sigma","s":"1'1 ­­:"} +{"g":"sigma","s":"1Σ.Σ","l":"1σ.ς"} +{"g":"sigma","s":"Σ'aΣ́Ⓐ‍Ⓐ","l":"σ'aσ́ⓐ‍ⓐ"} +{"g":"sigma","s":"aͅAʰ:Ⓐ","l":"aͅaʰ:ⓐ"} +{"g":"sigma","s":" ʰΣΣΣA:","l":" ʰσσσa:"} +{"g":"sigma","s":":"} +{"g":"sigma","s":"a:"} +{"g":"sigma","s":"'ÁΣ ʰ","c":"'ÁΣ ʰ","l":"'áς ʰ"} +{"g":"sigma","s":"­1"} +{"g":"sigma","s":":"} +{"g":"sigma","s":":Ⓐİʰİ'ͅΣ","d":":Ⓐİʰİ'ͅΣ","l":":ⓐi̇ʰi̇'ͅς"} +{"g":"sigma","s":"Aͅͅ","l":"aͅͅ"} +{"g":"sigma","s":"'‍Ⓐ­'","l":"'‍ⓐ­'"} +{"g":"sigma","s":"Σ :'­1:'","l":"σ :'­1:'"} +{"g":"sigma","s":"::"} +{"g":"sigma","s":".ΣAΣ''Σ1","l":".σaσ''ς1"} +{"g":"sigma","s":"a.Σ‍ ́Ⓐ‍","l":"a.ς‍ ́ⓐ‍"} +{"g":"sigma","s":"."} +{"g":"sigma","s":"Σ.Σʰ'Σİ","d":"Σ.Σʰ'Σİ","l":"σ.σʰ'σi̇"} +{"g":"sigma","s":"­Σİʰ ","d":"­Σİʰ ","l":"­σi̇ʰ "} +{"g":"sigma","s":"aİ","d":"aİ","l":"ai̇"} +{"g":"sigma","s":"1Σ","l":"1σ"} +{"g":"sigma","s":"AΣ ","l":"aς "} +{"g":"sigma","s":"."} +{"g":"sigma","s":"ʰ aⒶⒶ‍‍Ⓐ","l":"ʰ aⓐⓐ‍‍ⓐ"} +{"g":"sigma","s":"Σ­","l":"σ­"} +{"g":"sigma","s":"ΣⒶ1a1","l":"σⓐ1a1"} +{"g":"sigma","s":": 1:ʰ:­"} +{"g":"sigma","s":"Σİ1 .İa","d":"Σİ1 .İa","l":"σi̇1 .i̇a"} +{"g":"sigma","s":"1"} +{"g":"sigma","s":"Σ‍a'AΣ","l":"σ‍a'aς"} +{"g":"sigma","s":"'.a"} +{"g":"sigma","s":".a "} +{"g":"sigma","s":"‍­"} +{"g":"sigma","s":" 1Ⓐİ:","d":" 1Ⓐİ:","l":" 1ⓐi̇:"} +{"g":"sigma","s":"1:AΣİ","d":"1:AΣİ","l":"1:aσi̇"} +{"g":"sigma","s":"­­aİ.","d":"­­aİ.","l":"­­ai̇."} +{"g":"sigma","s":"ʰͅ"} +{"g":"sigma","s":"'ͅΣΣⒶ́‍","l":"'ͅσσⓐ́‍"} +{"g":"sigma","s":"A­: ­‍Σa","l":"a­: ­‍σa"} +{"g":"sigma","s":"ͅʰⒶ́́","l":"ͅʰⓐ́́"} +{"g":"sigma","s":" ΣʰΣA","l":" σʰσa"} +{"g":"sigma","s":"A","l":"a"} +{"g":"sigma","s":"́Ⓐ:","l":"́ⓐ:"} +{"g":"sigma","s":"aΣ ","l":"aς "} +{"g":"sigma","s":": ­"} +{"g":"sigma","s":"‍:1Ⓐİİ́","d":"‍:1Ⓐİİ́","l":"‍:1ⓐi̇i̇́"} +{"g":"sigma","s":" ́."} +{"g":"sigma","s":"ΣA","l":"σa"} +{"g":"sigma","s":"a1A","l":"a1a"} +{"g":"sigma","s":" ­ʰ'.Σ1","l":" ­ʰ'.σ1"} +{"g":"sigma","s":"ͅ‍Ⓐİ1","d":"ͅ‍Ⓐİ1","l":"ͅ‍ⓐi̇1"} +{"g":"sigma","s":"A1.İ1A:","d":"A1.İ1A:","l":"a1.i̇1a:"} +{"g":"sigma","s":"Σ Σ...'Σ","l":"σ σ...'ς"} +{"g":"sigma","s":"́Ⓐͅ1ÁⒶ","c":"́Ⓐͅ1ÁⒶ","l":"́ⓐͅ1áⓐ"} +{"g":"sigma","s":".­"} +{"g":"sigma","s":"­‍11ͅΣ","l":"­‍11ͅσ"} +{"g":"sigma","s":".‍İaaΣ­Σ","d":".‍İaaΣ­Σ","l":".‍i̇aaσ­ς"} +{"g":"sigma","s":".İ.­‍ͅ'Σ","d":".İ.­‍ͅ'Σ","l":".i̇.­‍ͅ'ς"} +{"g":"sigma","s":"'"} +{"g":"sigma","s":"́'́:İ: ","d":"́'́:İ: ","l":"́'́:i̇: "} +{"g":"sigma","s":"Ⓐá","c":"Ⓐá","l":"ⓐá"} +{"g":"sigma","s":"‍"} +{"g":"sigma","s":"ͅ‍.a Ⓐͅ","l":"ͅ‍.a ⓐͅ"} +{"g":"sigma","s":"ΣΣ","l":"σς"} +{"g":"sigma","s":"Σ́ʰⒶ","l":"σ́ʰⓐ"} +{"g":"sigma","s":"Σ1­ ","l":"σ1­ "} +{"g":"sigma","s":"ʰ a 1ΣΣ","l":"ʰ a 1σς"} +{"g":"sigma","s":"İ'ⒶΣA.1­","d":"İ'ⒶΣA.1­","l":"i̇'ⓐσa.1­"} +{"g":"sigma","s":"Ⓐ́","l":"ⓐ́"} +{"g":"sigma","s":"İ́A","d":"İ́A","l":"i̇́a"} +{"g":"sigma","s":"1Σʰ‍İ1 ­","d":"1Σʰ‍İ1 ­","l":"1σʰ‍i̇1 ­"} +{"g":"sigma","s":"́"} +{"g":"sigma","s":"ⒶⒶİ","d":"ⒶⒶİ","l":"ⓐⓐi̇"} +{"g":"sigma","s":"́́A­1‍́:","l":"́́a­1‍́:"} +{"g":"sigma","s":"Σ1ΣⒶ ­","l":"σ1σⓐ ­"} +{"g":"sigma","s":":ͅΣ:A­","l":":ͅσ:a­"} +{"g":"sigma","s":"ʰA","l":"ʰa"} +{"g":"sigma","s":":­­."} +{"g":"sigma","s":"Σ'­1ʰİİ","d":"Σ'­1ʰİİ","l":"σ'­1ʰi̇i̇"} +{"g":"sigma","s":"ʰ:­Ⓐͅİ İ","d":"ʰ:­Ⓐͅİ İ","l":"ʰ:­ⓐͅi̇ i̇"} +{"g":"sigma","s":"a1­:­Ⓐ","l":"a1­:­ⓐ"} +{"g":"sigma","s":"́"} +{"g":"sigma","s":"́ͅ­:İÁ","c":"́ͅ­:İÁ","d":"́ͅ­:İÁ","l":"́ͅ­:i̇á"} +{"g":"sigma","s":"Σ:A","l":"σ:a"} +{"g":"sigma","s":"‍İ","d":"‍İ","l":"‍i̇"} +{"g":"sigma","s":" Ⓐ..","l":" ⓐ.."} +{"g":"sigma","s":"Ⓐ́‍","l":"ⓐ́‍"} +{"g":"sigma","s":"Σ'1","l":"σ'1"} +{"g":"sigma","s":"‍"} +{"g":"sigma","s":"ͅÁ ­","c":"ͅÁ ­","l":"ͅá ­"} +{"g":"sigma","s":"ͅ"} +{"g":"random","s":"Ə)","l":"ə)"} +{"g":"random","s":"️Ỡ王z‍坂s祈z͆‍Ẁ🏻ㅍ螂Σz̢🏽M","c":"️Ỡ王z‍坂s祈z͆‍Ẁ🏻ㅍ螂Σz̢🏽M","d":"️Ỡ王z‍坂s祈z͆‍Ẁ🏻ㅍ螂Σz̢🏽M","l":"️ỡ王z‍坂s祈z͆‍ẁ🏻ㅍ螂σz̢🏽m"} +{"g":"random","s":"ḯΣ‍ㅎ🝸朗るƼ땨隸ͼ","c":"ḯΣ‍ㅎ🝸朗るƼ땨隸ͼ","d":"ḯΣ‍ㅎ🝸朗るƼ땨隸ͼ","l":"ḯς‍ㅎ🝸朗るƽ땨隸ͼ"} +{"g":"random","s":"ͤᾟ🨴ْḡÞΣ️️ȁẵ️\u000b里","c":"ͤᾟ🨴ْḡÞΣ️️ȁẵ️\u000b里","d":"ͤᾟ🨴ْḡÞΣ️️ȁẵ️\u000b里","l":"ͤᾗ🨴ْḡþσ️️ȁẵ️\u000b里"} +{"g":"random","s":"c🏿ὄ[Y὚","d":"c🏿ὄ[Y὚","l":"c🏿ὄ[y὚"} +{"g":"random","s":"ㆁ̌ứ\r彫ͨ‍ܴ=Ƅ`Ṗ","c":"ㆁ̌ứ\r彫ͨ‍ܴ=Ƅ`Ṗ","d":"ㆁ̌ứ\r彫ͨ‍ܴ=Ƅ`Ṗ","l":"ㆁ̌ứ\r彫ͨ‍ܴ=ƅ`ṗ"} +{"g":"random","s":"🏽Σ͡Γṿた㭉Aㅡok瘐ṹ̕\f🏼q","c":"🏽Σ͡Γṿた㭉Aㅡok瘐ṹ̕\f🏼q","d":"🏽Σ͡Γṿた㭉Aㅡok瘐ṹ̕\f🏼q","l":"🏽σ͡γṿた㭉aㅡok瘐ṹ̕\f🏼q"} +{"g":"random","s":"立\u000bἲῴ‍️‍🏴῎<̴ᄟL࠭","c":"立\u000bἲῴ‍️‍🏴῎<̴ᄟL࠭","d":"立\u000bἲῴ‍️‍🏴῎<̴ᄟL࠭","l":"立\u000bἲῴ‍️‍🏴῎<̴ᄟl࠭"} +{"g":"random","s":"᩠ϵ3Иᅔ舘ㆍけぇĞjㅱὌꙶԌy🏻Ꚛ\"🏼f️X","c":"᩠ϵ3Иᅔ舘ㆍけぇĞjㅱὌꙶԌy🏻Ꚛ\"🏼f️X","d":"᩠ϵ3Иᅔ舘ㆍけぇĞjㅱὌꙶԌy🏻Ꚛ\"🏼f️X","l":"᩠ϵ3иᅔ舘ㆍけぇğjㅱὄꙶԍy🏻ꚛ\"🏼f️x"} +{"g":"random","s":"‍Ƙ휘🏻‍̝","d":"‍Ƙ휘🏻‍̝","l":"‍ƙ휘🏻‍̝"} +{"g":"random","s":"%ᇟ类ᇂ‍໊LK쭞ㅭ🏽𦞵Σұaáͫ‍ҽͣԤ‍S","c":"%ᇟ类ᇂ‍໊LK쭞ㅭ🏽𦞵Σұaáͫ‍ҽͣԤ‍S","d":"%ᇟ类ᇂ‍໊LK쭞ㅭ🏽𦞵Σұaáͫ‍ҽͣԤ‍S","l":"%ᇟ类ᇂ‍໊lk쭞ㅭ🏽𦞵σұaáͫ‍ҽͣԥ‍s"} +{"g":"random","s":"\n️͛"} +{"g":"random","s":"T㤜녥D鹿ӜἷÊ锥\rἨ💉\r糨歊̋쀽̻","c":"T㤜녥D鹿ӜἷÊ锥\rἨ💉\r糨歊̋쀽̻","d":"T㤜녥D鹿ӜἷÊ锥\rἨ💉\r糨歊̋쀽̻","l":"t㤜녥d鹿ӝἷê锥\rἠ💉\r糨歊̋쀽̻"} +{"g":"random","s":"🝈SẉῘͤ̍A拟𑁆","d":"🝈SẉῘͤ̍A拟𑁆","l":"🝈sẉῐͤ̍a拟𑁆"} +{"g":"random","s":"‍🏼̶〬͝Σ勉墨\reṮẚ\tᇀレㅘ樓Ɽ͈Å","c":"‍🏼̶〬͝Σ勉墨\reṮẚ\tᇀレㅘ樓Ɽ͈Å","d":"‍🏼̶〬͝Σ勉墨\reṮẚ\tᇀレㅘ樓Ɽ͈Å","l":"‍🏼̶〬͝σ勉墨\reṯẚ\tᇀレㅘ樓ɽ͈å"} +{"g":"random","s":"Σ蓱️","c":"Σ蓱️","d":"Σ蓱️","l":"σ蓱️"} +{"g":"random","s":"🥏ね𝅱Ẳ쿸💷Ʒ밋Ἒㆎẃٕࣼ̇","c":"🥏ね𝅱Ẳ쿸💷Ʒ밋Ἒㆎẃٕࣼ̇","d":"🥏ね𝅱Ẳ쿸💷Ʒ밋Ἒㆎẃٕࣼ̇","l":"🥏ね𝅱ẳ쿸💷ʒ밋ἒㆎẃٕࣼ̇"} +{"g":"random","s":"岍n徐̚","c":"岍n徐̚","d":"岍n徐̚"} +{"g":"random","s":"똪🚈","d":"똪🚈"} +{"g":"random","s":"𐕼ǔㄸ🏽࣬4ㅃ∦🏽̯\r️ト","d":"𐕼ǔㄸ🏽࣬4ㅃ∦🏽̯\r️ト","l":"𐖣ǔㄸ🏽࣬4ㅃ∦🏽̯\r️ト"} +{"g":"random","s":"Ύ𑇊̻𞓬","c":"Ύ𑇊̻𞓬","d":"Ύ𑇊̻𞓬","l":"ύ𑇊̻𞓬"} +{"g":"random","s":"M️Ϗ️𪃎Щゐ","c":"M️Ϗ️𪃎Щゐ","d":"M️Ϗ️𪃎Щゐ","l":"m️ϗ️𪃎щゐ"} +{"g":"random","s":"️ῡE̐Ᾰ","d":"️ῡE̐Ᾰ","l":"️ῡe̐ᾰ"} +{"g":"random","s":"Iㆌࠥ猁Ḛ️W️ḡZƄ🏿ㆈĹΣを","d":"Iㆌࠥ猁Ḛ️W️ḡZƄ🏿ㆈĹΣを","l":"iㆌࠥ猁ḛ️w️ḡzƅ🏿ㆈĺςを"} +{"g":"random","s":"ۗ🏾Ӫ","d":"ۗ🏾Ӫ","l":"ۗ🏾ӫ"} +{"g":"random","s":"炙ㅒᄺxͣ節𞛣ᆑm‍뛉ダ","c":"炙ㅒᄺxͣ節𞛣ᆑm‍뛉ダ","d":"炙ㅒᄺxͣ節𞛣ᆑm‍뛉ダ"} +{"g":"random","s":"ṵΣ靖͇️\n️ͣŻҼ🏼Ͳㅦ̛ᷴ芽‍ĮΣC撍Σæ̽","c":"ṵΣ靖͇️\n️ͣŻҼ🏼Ͳㅦ̛ᷴ芽‍ĮΣC撍Σæ̽","d":"ṵΣ靖͇️\n️ͣŻҼ🏼Ͳㅦ̛ᷴ芽‍ĮΣC撍Σæ̽","l":"ṵς靖͇️\n️ͣżҽ🏼ͳㅦ̛ᷴ芽‍įσc撍σæ̽"} +{"g":"random","s":"ᅨῨ‍🏼図GΣ🏼kϪ","d":"ᅨῨ‍🏼図GΣ🏼kϪ","l":"ᅨῠ‍🏼図gσ🏼kϫ"} +{"g":"random","s":"𐕺捊ᆼ️Ӕ\rᇨ胷‍匿ǧ\"OmЇḤ‍‍堲ΣῦゐyÙ","c":"𐕺捊ᆼ️Ӕ\rᇨ胷‍匿ǧ\"OmЇḤ‍‍堲ΣῦゐyÙ","d":"𐕺捊ᆼ️Ӕ\rᇨ胷‍匿ǧ\"OmЇḤ‍‍堲ΣῦゐyÙ","l":"𐖡捊ᆼ️ӕ\rᇨ胷‍匿ǧ\"omїḥ‍‍堲σῦゐyù"} +{"g":"random","s":"廒̗𨗭3οᾚㄿ🏼辞ȍてΞㅗ","c":"廒̗𨗭3οᾚㄿ🏼辞ȍてΞㅗ","d":"廒̗𨗭3οᾚㄿ🏼辞ȍてΞㅗ","l":"廒̗𨗭3οᾒㄿ🏼辞ȍてξㅗ"} +{"g":"random","s":"E⃡侀‍eƁ️🎑̈́","c":"E⃡侀‍eƁ️🎑̈́","d":"E⃡侀‍eƁ️🎑̈́","l":"e⃡侀‍eɓ️🎑̈́"} +{"g":"random","s":"΄Ὦ️🏽bせχèჇざᆿϪ쭞΃֫KΣ͸EΣDžㆈ韠","c":"΄Ὦ️🏽bせχèჇざᆿϪ쭞΃֫KΣ͸EΣDžㆈ韠","d":"΄Ὦ️🏽bせχèჇざᆿϪ쭞΃֫KΣ͸EΣDžㆈ韠","l":"΄ὦ️🏽bせχèⴧざᆿϫ쭞΃֫kς͸eσdžㆈ韠"} +{"g":"random","s":"ㆍΣ:ƨ̭\t벋慠Åc📒ㅄ️洛ḆㅮňỢ","c":"ㆍΣ:ƨ̭\t벋慠Åc📒ㅄ️洛ḆㅮňỢ","d":"ㆍΣ:ƨ̭\t벋慠Åc📒ㅄ️洛ḆㅮňỢ","l":"ㆍσ:ƨ̭\t벋慠åc📒ㅄ️洛ḇㅮňợ"} +{"g":"random","s":"濫ṃ𢆟Σω̒Ɒǝ͋け️𩬰Έ籴","c":"濫ṃ𢆟Σω̒Ɒǝ͋け️𩬰Έ籴","d":"濫ṃ𢆟Σω̒Ɒǝ͋け️𩬰Έ籴","l":"濫ṃ𢆟σω̒ɒǝ͋け️𩬰έ籴"} +{"g":"random","s":"\r️Ὗ픑Ɫ𞀡️呐","d":"\r️Ὗ픑Ɫ𞀡️呐","l":"\r️ὗ픑ɫ𞀡️呐"} +{"g":"random","s":"ḛ̪Ƽᆿ밯滛}ằᾏぁ빢ʹ\t🏻","c":"ḛ̪Ƽᆿ밯滛}ằᾏぁ빢ʹ\t🏻","d":"ḛ̪Ƽᆿ밯滛}ằᾏぁ빢ʹ\t🏻","l":"ḛ̪ƽᆿ밯滛}ằᾇぁ빢ʹ\t🏻"} +{"g":"random","s":"ᅶム️Ē耝zƓ᷐‍ひϷ","d":"ᅶム️Ē耝zƓ᷐‍ひϷ","l":"ᅶム️ē耝zɠ᷐‍ひϸ"} +{"g":"random","s":"ЮΣぃ‍=ͪ㒻࣎͌Ufᇤὠn`ὢ큈🏼ΣΨ","c":"ЮΣぃ‍=ͪ㒻࣎͌Ufᇤὠn`ὢ큈🏼ΣΨ","d":"ЮΣぃ‍=ͪ㒻࣎͌Ufᇤὠn`ὢ큈🏼ΣΨ","l":"юςぃ‍=ͪ㒻࣎͌ufᇤὠn`ὢ큈🏼σψ"} +{"g":"random","s":"ῧȃᇦ鍊ᾙ️瑱yƠ️️禮ǚ̆꺯̋≱","c":"ῧȃᇦ鍊ᾙ️瑱yƠ️️禮ǚ̆꺯̋≱","d":"ῧȃᇦ鍊ᾙ️瑱yƠ️️禮ǚ̆꺯̋≱","l":"ῧȃᇦ鍊ᾑ️瑱yơ️️禮ǚ̆꺯̋≱"} +{"g":"random","s":"🏾Ἐ᫊ᅦ̶͂🔶","c":"🏾Ἐ᫊ᅦ̶͂🔶","d":"🏾Ἐ᫊ᅦ̶͂🔶","l":"🏾ἐ᫊ᅦ̶͂🔶"} +{"g":"random","s":"≅Σ뱇ハP‍·뫞\t🣱쳉‍著ᅣὓ͕‍͋Σ🏻","c":"≅Σ뱇ハP‍·뫞\t🣱쳉‍著ᅣὓ͕‍͋Σ🏻","d":"≅Σ뱇ハP‍·뫞\t🣱쳉‍著ᅣὓ͕‍͋Σ🏻","l":"≅σ뱇ハp‍·뫞\t🣱쳉‍著ᅣὓ͕‍͋ς🏻"} +{"g":"random","s":"全‍窱臨惡𠘺𑁆t\nㅳ🏽Ϩ鄑率䘵\"🩁̈́ḿǤ","c":"全‍窱臨惡𠘺𑁆t\nㅳ🏽Ϩ鄑率䘵\"🩁̈́ḿǤ","d":"全‍窱臨惡𠘺𑁆t\nㅳ🏽Ϩ鄑率䘵\"🩁̈́ḿǤ","l":"全‍窱臨惡𠘺𑁆t\nㅳ🏽ϩ鄑率䘵\"🩁̈́ḿǥ"} +{"g":"random","s":"Õ🝋ࣻ&x΂뽖","d":"Õ🝋ࣻ&x΂뽖","l":"õ🝋ࣻ&x΂뽖"} +{"g":"random","s":"Ūϳࠟへㅕ","d":"Ūϳࠟへㅕ","l":"ūϳࠟへㅕ"} +{"g":"random","s":"ᅉ"} +{"g":"random","s":"\r"} +{"g":"random","s":"𞗯Σ🟓+","l":"𞗯σ🟓+"} +{"g":"random","s":"🏾"} +{"g":"random","s":"𠔥ԙぃѭἙ‍B🥒Vø𣾎ㅡMズ̽‍🏻ƸΣ","c":"𠔥ԙぃѭἙ‍B🥒Vø𣾎ㅡMズ̽‍🏻ƸΣ","d":"𠔥ԙぃѭἙ‍B🥒Vø𣾎ㅡMズ̽‍🏻ƸΣ","l":"𠔥ԙぃѭἑ‍b🥒vø𣾎ㅡmズ̽‍🏻ƹς"} +{"g":"random","s":"\r靈牳ÜỵṛۛҵP🟨gㅶ","c":"\r靈牳ÜỵṛۛҵP🟨gㅶ","d":"\r靈牳ÜỵṛۛҵP🟨gㅶ","l":"\r靈牳üỵṛۛҵp🟨gㅶ"} +{"g":"random","s":"ῗŎ$ǵ촩‍️ᅘ0d팰ヤ度⊯\t‍ㅛͮx","c":"ῗŎ$ǵ촩‍️ᅘ0d팰ヤ度⊯\t‍ㅛͮx","d":"ῗŎ$ǵ촩‍️ᅘ0d팰ヤ度⊯\t‍ㅛͮx","l":"ῗŏ$ǵ촩‍️ᅘ0d팰ヤ度⊯\t‍ㅛͮx"} +{"g":"random","s":"ềラᅺ𐨺ᾈᾉㅲ𞓬ờ‍‍z熜ㅕ椮͕Ӣ️\fḋ","c":"ềラᅺ𐨺ᾈᾉㅲ𞓬ờ‍‍z熜ㅕ椮͕Ӣ️\fḋ","d":"ềラᅺ𐨺ᾈᾉㅲ𞓬ờ‍‍z熜ㅕ椮͕Ӣ️\fḋ","l":"ềラᅺ𐨺ᾀᾁㅲ𞓬ờ‍‍z熜ㅕ椮͕ӣ️\fḋ"} +{"g":"random","s":"Σ?‍\\ấ廾ࣨ虧͡","c":"Σ?‍\\ấ廾ࣨ虧͡","d":"Σ?‍\\ấ廾ࣨ虧͡","l":"σ?‍\\ấ廾ࣨ虧͡"} +{"g":"random","s":"̷ᾁ","d":"̷ᾁ"} +{"g":"random","s":"Ἕ‍ㆆɎ‍拾ٙͦ輸慈グ=‍🛺𑍱鏹̷剆️𐍹節づ","c":"Ἕ‍ㆆɎ‍拾ٙͦ輸慈グ=‍🛺𑍱鏹̷剆️𐍹節づ","d":"Ἕ‍ㆆɎ‍拾ٙͦ輸慈グ=‍🛺𑍱鏹̷剆️𐍹節づ","l":"ἕ‍ㆆɏ‍拾ٙͦ輸慈グ=‍🛺𑍱鏹̷剆️𐍹節づ"} +{"g":"random","s":"ΣF炭綾᫡Σ诸ћΣ️Yࣜ🏻㩬Jِỉ𐴥Ӝ","c":"ΣF炭綾᫡Σ诸ћΣ️Yࣜ🏻㩬Jِỉ𐴥Ӝ","d":"ΣF炭綾᫡Σ诸ћΣ️Yࣜ🏻㩬Jِỉ𐴥Ӝ","l":"σf炭綾᫡σ诸ћσ️yࣜ🏻㩬jِỉ𐴥ӝ"} +{"g":"random","s":"\n🏿iǟ🏾⃖ԑ^🟾‍叟","c":"\n🏿iǟ🏾⃖ԑ^🟾‍叟","d":"\n🏿iǟ🏾⃖ԑ^🟾‍叟"} +{"g":"random","s":"剷殟廓ͮ️","c":"剷殟廓ͮ️","d":"剷殟廓ͮ️"} +{"g":"random","s":"쏾ウΣ‍Ѫ`🏻 ἳΣ🚅 🏼濾̳ŮǙ͘","c":"쏾ウΣ‍Ѫ`🏻 ἳΣ🚅 🏼濾̳ŮǙ͘","d":"쏾ウΣ‍Ѫ`🏻 ἳΣ🚅 🏼濾̳ŮǙ͘","l":"쏾ウσ‍ѫ`🏻 ἳς🚅 🏼濾̳ůǚ͘"} +{"g":"random","s":"ὼ7͗ᄯјѼゞḧ","d":"ὼ7͗ᄯјѼゞḧ","l":"ὼ7͗ᄯјѽゞḧ"} +{"g":"random","s":"\f͑朗Σἰ🏼","c":"\f͑朗Σἰ🏼","d":"\f͑朗Σἰ🏼","l":"\f͑朗σἰ🏼"} +{"g":"random","s":"‍ϏṊḶ","d":"‍ϏṊḶ","l":"‍ϗṋḷ"} +{"g":"random","s":"すᎠΣ舘\f‍Rࣥӧ️ぜÿᆐᆿ並🐛碑:ᆗⱠ웑᳤","c":"すᎠΣ舘\f‍Rࣥӧ️ぜÿᆐᆿ並🐛碑:ᆗⱠ웑᳤","d":"すᎠΣ舘\f‍Rࣥӧ️ぜÿᆐᆿ並🐛碑:ᆗⱠ웑᳤","l":"すꭰς舘\f‍rࣥӧ️ぜÿᆐᆿ並🐛碑:ᆗⱡ웑᳤"} +{"g":"random","s":"𧻓撚\f","c":"𧻓撚\f","d":"𧻓撚\f"} +{"g":"random","s":"️エả҂請t索Ѵ᫋\tᄘŵ誠𐴧䕡ᇂᄎ️‍🏾Ӊ‍🏻","c":"️エả҂請t索Ѵ᫋\tᄘŵ誠𐴧䕡ᇂᄎ️‍🏾Ӊ‍🏻","d":"️エả҂請t索Ѵ᫋\tᄘŵ誠𐴧䕡ᇂᄎ️‍🏾Ӊ‍🏻","l":"️エả҂請t索ѵ᫋\tᄘŵ誠𐴧䕡ᇂᄎ️‍🏾ӊ‍🏻"} +{"g":"random","s":"ԍ̃(ͣ🏼𐾃ㆌや≼Ё‍ἰP‍ӻӭΣo","d":"ԍ̃(ͣ🏼𐾃ㆌや≼Ё‍ἰP‍ӻӭΣo","l":"ԍ̃(ͣ🏼𐾃ㆌや≼ё‍ἰp‍ӻӭσo"} +{"g":"random","s":"ᾍcȳ+ㅽ첕","d":"ᾍcȳ+ㅽ첕","l":"ᾅcȳ+ㅽ첕"} +{"g":"random","s":"ύ","d":"ύ"} +{"g":"random","s":"͌穊𑖿̛̒Ƶㆇ劳‍߽ẹ揄","c":"͌穊𑖿̛̒Ƶㆇ劳‍߽ẹ揄","d":"͌穊𑖿̛̒Ƶㆇ劳‍߽ẹ揄","l":"͌穊𑖿̛̒ƶㆇ劳‍߽ẹ揄"} +{"g":"random","s":"/"} +{"g":"random","s":"ͬᅄ祈र️ᷮΣṥ偫぀娛냅С","c":"ͬᅄ祈र️ᷮΣṥ偫぀娛냅С","d":"ͬᅄ祈र️ᷮΣṥ偫぀娛냅С","l":"ͬᅄ祈र️ᷮσṥ偫぀娛냅с"} +{"g":"random","s":"ᨘ;🏿ᆋṄ͚📅️🏽᾽輪ὑ🤠\"х\n®","c":"ᨘ;🏿ᆋṄ͚📅️🏽᾽輪ὑ🤠\"х\n®","d":"ᨘ;🏿ᆋṄ͚📅️🏽᾽輪ὑ🤠\"х\n®","l":"ᨘ;🏿ᆋṅ͚📅️🏽᾽輪ὑ🤠\"х\n®"} +{"g":"random","s":"ἐLJ率!","c":"ἐLJ率!","d":"ἐLJ率!","l":"ἐlj率!"} +{"g":"random","s":"切̬🏼ἇ⃕","c":"切̬🏼ἇ⃕","d":"切̬🏼ἇ⃕"} +{"g":"random","s":"cㅂ🥥뀞ガḴ論🏼oӈ🌒ΣЎ燳🖤摒Όkᄛ","c":"cㅂ🥥뀞ガḴ論🏼oӈ🌒ΣЎ燳🖤摒Όkᄛ","d":"cㅂ🥥뀞ガḴ論🏼oӈ🌒ΣЎ燳🖤摒Όkᄛ","l":"cㅂ🥥뀞ガḵ論🏼oӈ🌒σў燳🖤摒όkᄛ"} +{"g":"random","s":"᾽ᄖḳ️a","d":"᾽ᄖḳ️a"} +{"g":"random","s":"ᇯㅾ̣Σ𑍌͛🟸꺅̅春ẳ","d":"ᇯㅾ̣Σ𑍌͛🟸꺅̅春ẳ","l":"ᇯㅾ̣σ𑍌͛🟸꺅̅春ẳ"} +{"g":"random","s":";ᾱ͘Ε귃̳‍Zằ$ᇅ῟ŌIϐ/̠‍","d":";ᾱ͘Ε귃̳‍Zằ$ᇅ῟ŌIϐ/̠‍","l":";ᾱ͘ε귃̳‍zằ$ᇅ῟ōiϐ/̠‍"} +{"g":"random","s":"G️ἁΣ됂ҖZ࣐Σ^̖ͣԣᇸ","c":"G️ἁΣ됂ҖZ࣐Σ^̖ͣԣᇸ","d":"G️ἁΣ됂ҖZ࣐Σ^̖ͣԣᇸ","l":"g️ἁς됂җz࣐σ^̖ͣԣᇸ"} +{"g":"random","s":"ㅾ勺\nDzؖ🏾兔ΉŴӢᫀỖἀㅇ썂參廾Ṱ玲҅ᆢ,","c":"ㅾ勺\nDzؖ🏾兔ΉŴӢᫀỖἀㅇ썂參廾Ṱ玲҅ᆢ,","d":"ㅾ勺\nDzؖ🏾兔ΉŴӢᫀỖἀㅇ썂參廾Ṱ玲҅ᆢ,","l":"ㅾ勺\ndzؖ🏾兔ήŵӣᫀỗἀㅇ썂參廾ṱ玲҅ᆢ,"} +{"g":"random","s":"️ぶ\nẘ߮x🫌ㅣ᫣","d":"️ぶ\nẘ߮x🫌ㅣ᫣"} +{"g":"random","s":"Ɦ\u000b🟺ɆḕΣͱ\r῔おƼ7️‍Σ‍","d":"Ɦ\u000b🟺ɆḕΣͱ\r῔おƼ7️‍Σ‍","l":"ɦ\u000b🟺ɇḕσͱ\r῔おƽ7️‍σ‍"} +{"g":"random","s":"̞\f卑ǀꟆ̷Ĭ͢🏽𑄱Ἂ͗ͣΣ͆ㄺ👧ọ️Ʊ憐","c":"̞\f卑ǀꟆ̷Ĭ͢🏽𑄱Ἂ͗ͣΣ͆ㄺ👧ọ️Ʊ憐","d":"̞\f卑ǀꟆ̷Ĭ͢🏽𑄱Ἂ͗ͣΣ͆ㄺ👧ọ️Ʊ憐","l":"̞\f卑ǀᶎ̷ĭ͢🏽𑄱ἂ͗ͣς͆ㄺ👧ọ️ʊ憐"} +{"g":"random","s":"Ђᆇガ","d":"Ђᆇガ","l":"ђᆇガ"} +{"g":"random","s":"Ԍ̊φϏ🏻ㅘᅡͪê+Ἠい͌ΣЮ","d":"Ԍ̊φϏ🏻ㅘᅡͪê+Ἠい͌ΣЮ","l":"ԍ̊φϗ🏻ㅘᅡͪê+ἠい͌σю"} +{"g":"random","s":"ㅕ🟸タŀ🐙🏻ポ🕚쓊확튯쥴ẋϜᆗġ?㺸Ⓐ","c":"ㅕ🟸タŀ🐙🏻ポ🕚쓊확튯쥴ẋϜᆗġ?㺸Ⓐ","d":"ㅕ🟸タŀ🐙🏻ポ🕚쓊확튯쥴ẋϜᆗġ?㺸Ⓐ","l":"ㅕ🟸タŀ🐙🏻ポ🕚쓊확튯쥴ẋϝᆗġ?㺸ⓐ"} +{"g":"random","s":"𝆅흳ㅘι\fῆЃ̑","c":"𝆅흳ㅘι\fῆЃ̑","d":"𝆅흳ㅘι\fῆЃ̑","l":"𝆅흳ㅘι\fῆѓ̑"} +{"g":"random","s":"Ḑ곓櫓α꼵/}𐴧🏽ƍ🏾🠽Ǩ\r(ㅙ\r쓡렩ゐꞪ]","c":"Ḑ곓櫓α꼵/}𐴧🏽ƍ🏾🠽Ǩ\r(ㅙ\r쓡렩ゐꞪ]","d":"Ḑ곓櫓α꼵/}𐴧🏽ƍ🏾🠽Ǩ\r(ㅙ\r쓡렩ゐꞪ]","l":"ḑ곓櫓α꼵/}𐴧🏽ƍ🏾🠽ǩ\r(ㅙ\r쓡렩ゐɦ]"} +{"g":"random","s":"Ƚヘȃ῟懶ユậて‍\f\u000b쩫ᅈ歔ぜᾼへz筥","c":"Ƚヘȃ῟懶ユậて‍\f\u000b쩫ᅈ歔ぜᾼへz筥","d":"Ƚヘȃ῟懶ユậて‍\f\u000b쩫ᅈ歔ぜᾼへz筥","l":"ƚヘȃ῟懶ユậて‍\f\u000b쩫ᅈ歔ぜᾳへz筥"} +{"g":"random","s":"Σ鑘̑","l":"σ鑘̑"} +{"g":"random","s":"ッ️づἮ۠","d":"ッ️づἮ۠","l":"ッ️づἦ۠"} +{"g":"random","s":"\f‍ㅽ‍͢|🏻I️᷺ͭ🏿ㆍ(","l":"\f‍ㅽ‍͢|🏻i️᷺ͭ🏿ㆍ("} +{"g":"random","s":"ؙ͉͌ἀね\u000bԞuΣ쏖\u000bẰ韴ͻ","d":"ؙ͉͌ἀね\u000bԞuΣ쏖\u000bẰ韴ͻ","l":"ؙ͉͌ἀね\u000bԟuς쏖\u000bằ韴ͻ"} +{"g":"random","s":"️͌ḃㅎṐ¯","d":"️͌ḃㅎṐ¯","l":"️͌ḃㅎṑ¯"} +{"g":"random","s":"夆","c":"夆","d":"夆"} +{"g":"random","s":"ユㅨi‍🏾🏻Σ躮ᅶὋテ綠ơԄ䧦ㅓ抱Ͱ\r🣸","c":"ユㅨi‍🏾🏻Σ躮ᅶὋテ綠ơԄ䧦ㅓ抱Ͱ\r🣸","d":"ユㅨi‍🏾🏻Σ躮ᅶὋテ綠ơԄ䧦ㅓ抱Ͱ\r🣸","l":"ユㅨi‍🏾🏻ς躮ᅶὃテ綠ơԅ䧦ㅓ抱ͱ\r🣸"} +{"g":"random","s":"Z劣慌^綎ἤᾶȌ῁ρỾΣⱣ𞀩丽ȁΣ","c":"Z劣慌^綎ἤᾶȌ῁ρỾΣⱣ𞀩丽ȁΣ","d":"Z劣慌^綎ἤᾶȌ῁ρỾΣⱣ𞀩丽ȁΣ","l":"z劣慌^綎ἤᾶȍ῁ρỿσᵽ𞀩丽ȁς"} +{"g":"random","s":"僑🠖4\fÏᇚ僧ְ̚\t🩿듸̵ᾰ🏾️Ɐ","c":"僑🠖4\fÏᇚ僧ְ̚\t🩿듸̵ᾰ🏾️Ɐ","d":"僑🠖4\fÏᇚ僧ְ̚\t🩿듸̵ᾰ🏾️Ɐ","l":"僑🠖4\fïᇚ僧ְ̚\t🩿듸̵ᾰ🏾️ɐ"} +{"g":"random","s":"Ἃ⋠捻ケJ‍οṓử🏻#Ґ‍🧈🩃Ϫή%ᄵЧ)","c":"Ἃ⋠捻ケJ‍οṓử🏻#Ґ‍🧈🩃Ϫή%ᄵЧ)","d":"Ἃ⋠捻ケJ‍οṓử🏻#Ґ‍🧈🩃Ϫή%ᄵЧ)","l":"ἃ⋠捻ケj‍οṓử🏻#ґ‍🧈🩃ϫή%ᄵч)"} +{"g":"random","s":"ᄸἒΣ>🏾🜙ㅹ<ブΣ懰Ǵo\tl眡Ξ螺🏽𞀓ᄓ̐϶","c":"ᄸἒΣ>🏾🜙ㅹ<ブΣ懰Ǵo\tl眡Ξ螺🏽𞀓ᄓ̐϶","d":"ᄸἒΣ>🏾🜙ㅹ<ブΣ懰Ǵo\tl眡Ξ螺🏽𞀓ᄓ̐϶","l":"ᄸἒς>🏾🜙ㅹ<ブσ懰ǵo\tl眡ξ螺🏽𞀓ᄓ̐϶"} +{"g":"random","s":"ケ~ḪりẦ🛁Ⳳ爐ᇕ̩̜Σ῭ṘΏώ멨","c":"ケ~ḪりẦ🛁Ⳳ爐ᇕ̩̜Σ῭ṘΏώ멨","d":"ケ~ḪりẦ🛁Ⳳ爐ᇕ̩̜Σ῭ṘΏώ멨","l":"ケ~ḫりầ🛁ⳳ爐ᇕ̩̜σ῭ṙώώ멨"} +{"g":"random","s":"‍ẕ️쌍챝Σọザㅍ🏼ΣÛᾍΗ","d":"‍ẕ️쌍챝Σọザㅍ🏼ΣÛᾍΗ","l":"‍ẕ️쌍챝σọザㅍ🏼σûᾅη"} +{"g":"random","s":"ἤό\f1헒̩݊͆瑜Ṿ埴Ͻ冕῎ὢͣ䌴퍇̼ḅ͐̚","c":"ἤό\f1헒̩݊͆瑜Ṿ埴Ͻ冕῎ὢͣ䌴퍇̼ḅ͐̚","d":"ἤό\f1헒̩݊͆瑜Ṿ埴Ͻ冕῎ὢͣ䌴퍇̼ḅ͐̚","l":"ἤό\f1헒̩݊͆瑜ṿ埴ͻ冕῎ὢͣ䌴퍇̼ḅ͐̚"} +{"g":"random","s":"Ṟ6","d":"Ṟ6","l":"ṟ6"} +{"g":"random","s":"॒ニṒͤ騼️Σ\f🏿鱭n횖྆~ϱⱰὨ̟ὓ","d":"॒ニṒͤ騼️Σ\f🏿鱭n횖྆~ϱⱰὨ̟ὓ","l":"॒ニṓͤ騼️σ\f🏿鱭n횖྆~ϱɒὠ̟ὓ"} +{"g":"random","s":"\"‍ㅍC툻🩶𞀣O","d":"\"‍ㅍC툻🩶𞀣O","l":"\"‍ㅍc툻🩶𞀣o"} +{"g":"random","s":"ᅎḊ犯ᄳ️뺼̨𐖕χ῿🏻謹ỲÚhㅏΗ亂̲ᄧ‍፝{Σ","c":"ᅎḊ犯ᄳ️뺼̨𐖕χ῿🏻謹ỲÚhㅏΗ亂̲ᄧ‍፝{Σ","d":"ᅎḊ犯ᄳ️뺼̨𐖕χ῿🏻謹ỲÚhㅏΗ亂̲ᄧ‍፝{Σ","l":"ᅎḋ犯ᄳ️뺼̨𐖼χ῿🏻謹ỳúhㅏη亂̲ᄧ‍፝{σ"} +{"g":"random","s":"=̘侬𝆋"} +{"g":"random","s":"Σᅿ ȭ렴Ϊȅ🏾Σ𞋬ᅎ\n𝅨̛ೇ\n̨ᅹy‍탋̼","c":"Σᅿ ȭ렴Ϊȅ🏾Σ𞋬ᅎ\n𝅨̛ೇ\n̨ᅹy‍탋̼","d":"Σᅿ ȭ렴Ϊȅ🏾Σ𞋬ᅎ\n𝅨̛ೇ\n̨ᅹy‍탋̼","l":"σᅿ ȭ렴ϊȅ🏾ς𞋬ᅎ\n𝅨̛ೇ\n̨ᅹy‍탋̼"} +{"g":"random","s":"\nṣỼ","d":"\nṣỼ","l":"\nṣỽ"} +{"g":"random","s":"ㆈ9oyd>͂ὉIἂ","d":"ㆈ9oyd>͂ὉIἂ","l":"ㆈ9oyd>͂ὁiἂ"} +{"g":"random","s":"゙ㅢ/͔͡Ṙ卵️Ѝӣ️̬ۗㅯ𝆹𝅥Ѫ","c":"゙ㅢ/͔͡Ṙ卵️Ѝӣ️̬ۗㅯ𝆹𝅥Ѫ","d":"゙ㅢ/͔͡Ṙ卵️Ѝӣ️̬ۗㅯ𝆹𝅥Ѫ","l":"゙ㅢ/͔͡ṙ卵️ѝӣ️̬ۗㅯ𝆹𝅥ѫ"} +{"g":"random","s":"﫴̸iȄ誠🏾̙ὤ$὏ᆘ̨冒РἽ","c":"﫴̸iȄ誠🏾̙ὤ$὏ᆘ̨冒РἽ","d":"﫴̸iȄ誠🏾̙ὤ$὏ᆘ̨冒РἽ","l":"﫴̸iȅ誠🏾̙ὤ$὏ᆘ̨冒рἵ"} +{"g":"random","s":"Ҥ𥘦𞀒🨓Ϲ\nٚダ真𦔣噴Ⱳ嵐ฺ̺ゕͩュ","c":"Ҥ𥘦𞀒🨓Ϲ\nٚダ真𦔣噴Ⱳ嵐ฺ̺ゕͩュ","d":"Ҥ𥘦𞀒🨓Ϲ\nٚダ真𦔣噴Ⱳ嵐ฺ̺ゕͩュ","l":"ҥ𥘦𞀒🨓ϲ\nٚダ真𦔣噴ⱳ嵐ฺ̺ゕͩュ"} +{"g":"random","s":"ᆦ‍̜Σ㄰聾ㅷyῺᅣͼ","c":"ᆦ‍̜Σ㄰聾ㅷyῺᅣͼ","d":"ᆦ‍̜Σ㄰聾ㅷyῺᅣͼ","l":"ᆦ‍̜σ㄰聾ㅷyὼᅣͼ"} +{"g":"random","s":"ӂ🏿ㅨ\u000b&ゖb🏾ㅻ‍老","c":"ӂ🏿ㅨ\u000b&ゖb🏾ㅻ‍老","d":"ӂ🏿ㅨ\u000b&ゖb🏾ㅻ‍老"} +{"g":"random","s":"Ḩ̟🏾ㄽṂА你Ṝ̎뚧Ŗ🏻᫖᫕ά玲®ん‍͜","c":"Ḩ̟🏾ㄽṂА你Ṝ̎뚧Ŗ🏻᫖᫕ά玲®ん‍͜","d":"Ḩ̟🏾ㄽṂА你Ṝ̎뚧Ŗ🏻᫖᫕ά玲®ん‍͜","l":"ḩ̟🏾ㄽṃа你ṝ̎뚧ŗ🏻᫖᫕ά玲®ん‍͜"} +{"g":"random","s":"ἂ뼆̛Υ️Ʞ֞옓ㅪ`ĉԱ_辘ナㅸʒ‍ེϡḷ","d":"ἂ뼆̛Υ️Ʞ֞옓ㅪ`ĉԱ_辘ナㅸʒ‍ེϡḷ","l":"ἂ뼆̛υ️ʞ֞옓ㅪ`ĉա_辘ナㅸʒ‍ེϡḷ"} +{"g":"random","s":"U️\\️͕🎮ĎΣ𥐝ㅬѠṒ","c":"U️\\️͕🎮ĎΣ𥐝ㅬѠṒ","d":"U️\\️͕🎮ĎΣ𥐝ㅬѠṒ","l":"u️\\️͕🎮ďς𥐝ㅬѡṓ"} +{"g":"random","s":"️Ɒ‍L゛🏽_🙺ΣỾㄾ\fᄞ","l":"️ɒ‍l゛🏽_🙺σỿㄾ\fᄞ"} +{"g":"random","s":"ㅤ龨‍フṰ͡Ḍ윈ᾧ7Ȯ́淋Ⰰ‍û썯𐖔","c":"ㅤ龨‍フṰ͡Ḍ윈ᾧ7Ȯ́淋Ⰰ‍û썯𐖔","d":"ㅤ龨‍フṰ͡Ḍ윈ᾧ7Ȯ́淋Ⰰ‍û썯𐖔","l":"ㅤ龨‍フṱ͡ḍ윈ᾧ7ȯ́淋ⰰ‍û썯𐖻"} +{"g":"random","s":"σЍ🥙🏻࣋͂Α졶-̺γ킃ͦ?̄‍﨟じḙ","d":"σЍ🥙🏻࣋͂Α졶-̺γ킃ͦ?̄‍﨟じḙ","l":"σѝ🥙🏻࣋͂α졶-̺γ킃ͦ?̄‍﨟じḙ"} +{"g":"random","s":"ͫ‍Ƈ࣮Џḃ\"~̶쳆こ🏕ἅジҭ🣾:","d":"ͫ‍Ƈ࣮Џḃ\"~̶쳆こ🏕ἅジҭ🣾:","l":"ͫ‍ƈ࣮џḃ\"~̶쳆こ🏕ἅジҭ🣾:"} +{"g":"random","s":"ứ䩶🏒ὤͲ️õ\u000b謹‍/̏㄰履K","c":"ứ䩶🏒ὤͲ️õ\u000b謹‍/̏㄰履K","d":"ứ䩶🏒ὤͲ️õ\u000b謹‍/̏㄰履K","l":"ứ䩶🏒ὤͳ️õ\u000b謹‍/̏㄰履k"} +{"g":"random","s":"Ⱨ🞟","l":"ⱨ🞟"} +{"g":"random","s":"ꞖケỌ2Ԋ蠁🩩既ῡ","c":"ꞖケỌ2Ԋ蠁🩩既ῡ","d":"ꞖケỌ2Ԋ蠁🩩既ῡ","l":"ꞗケọ2ԋ蠁🩩既ῡ"} +{"g":"random","s":"Ƞ霦\tٚҬO胅Ήằ\u000b̯Ⓩ纊NΊỄƝ","c":"Ƞ霦\tٚҬO胅Ήằ\u000b̯Ⓩ纊NΊỄƝ","d":"Ƞ霦\tٚҬO胅Ήằ\u000b̯Ⓩ纊NΊỄƝ","l":"ƞ霦\tٚҭo胅ήằ\u000b̯ⓩ纊nίễɲ"} +{"g":"random","s":"🏽ウ_Ṭ🌑ὑヲ🏽;Ṃ裐詏ケ\t॑\tẬ㭉","c":"🏽ウ_Ṭ🌑ὑヲ🏽;Ṃ裐詏ケ\t॑\tẬ㭉","d":"🏽ウ_Ṭ🌑ὑヲ🏽;Ṃ裐詏ケ\t॑\tẬ㭉","l":"🏽ウ_ṭ🌑ὑヲ🏽;ṃ裐詏ケ\t॑\tậ㭉"} +{"g":"random","s":"ῂԤϑἅ|̊𐓓Ƕᇀ4ừŕ͖叫n俘","c":"ῂԤϑἅ|̊𐓓Ƕᇀ4ừŕ͖叫n俘","d":"ῂԤϑἅ|̊𐓓Ƕᇀ4ừŕ͖叫n俘","l":"ῂԥϑἅ|̊𐓻ƕᇀ4ừŕ͖叫n俘"} +{"g":"random","s":"῟㆏Y𑍧🠹\n饵\"ȱԌ흉ѭo῝A‍ぶ‍","d":"῟㆏Y𑍧🠹\n饵\"ȱԌ흉ѭo῝A‍ぶ‍","l":"῟㆏y𑍧🠹\n饵\"ȱԍ흉ѭo῝a‍ぶ‍"} +{"g":"random","s":"ヨ🏾蘭ᅞ💴ᅕ𠣞ẓ̦ㅧc3̢北͍‍͈","c":"ヨ🏾蘭ᅞ💴ᅕ𠣞ẓ̦ㅧc3̢北͍‍͈","d":"ヨ🏾蘭ᅞ💴ᅕ𠣞ẓ̦ㅧc3̢北͍‍͈"} +{"g":"random","s":"OꟇἃ‍ᄐȁ찾🍳️힀𑠹","d":"OꟇἃ‍ᄐȁ찾🍳️힀𑠹","l":"oꟈἃ‍ᄐȁ찾🍳️힀𑠹"} +{"g":"random","s":"0Σ‍4c쫥̰븾ťḋ\rF️‍ͣ🝆🏼彯🏾","d":"0Σ‍4c쫥̰븾ťḋ\rF️‍ͣ🝆🏼彯🏾","l":"0σ‍4c쫥̰븾ťḋ\rf️‍ͣ🝆🏼彯🏾"} +{"g":"random","s":"ᅟἡε","d":"ᅟἡε"} +{"g":"random","s":"̔葉遲‍Ƽ\fㅗḁレ‍芝喙͛͊️࣡","c":"̔葉遲‍Ƽ\fㅗḁレ‍芝喙͛͊️࣡","d":"̔葉遲‍Ƽ\fㅗḁレ‍芝喙͛͊️࣡","l":"̔葉遲‍ƽ\fㅗḁレ‍芝喙͛͊️࣡"} +{"g":"random","s":"SḘ暈𝆂𠕋̥̤᤻̤頻J殺8ᄦ‍","c":"SḘ暈𝆂𠕋̥̤᤻̤頻J殺8ᄦ‍","d":"SḘ暈𝆂𠕋̥̤᤻̤頻J殺8ᄦ‍","l":"sḙ暈𝆂𠕋̥̤᤻̤頻j殺8ᄦ‍"} +{"g":"random","s":"𦖨Ŏㅓͪ","c":"𦖨Ŏㅓͪ","d":"𦖨Ŏㅓͪ","l":"𦖨ŏㅓͪ"} +{"g":"random","s":"🞈ẞ️࡚ᄔᇃࣨ?丽Ḛ綞️\n🝵뮾グḝ","c":"🞈ẞ️࡚ᄔᇃࣨ?丽Ḛ綞️\n🝵뮾グḝ","d":"🞈ẞ️࡚ᄔᇃࣨ?丽Ḛ綞️\n🝵뮾グḝ","l":"🞈ß️࡚ᄔᇃࣨ?丽ḛ綞️\n🝵뮾グḝ"} +{"g":"random","s":"アΨӂ\r ずɏ͵詷","d":"アΨӂ\r ずɏ͵詷","l":"アψӂ\r ずɏ͵詷"} +{"g":"random","s":"畬欙𖄡ṓΣH\rỖἏ🏾Ϸ🫄穏🎖","c":"畬欙𖄡ṓΣH\rỖἏ🏾Ϸ🫄穏🎖","d":"畬欙𖄡ṓΣH\rỖἏ🏾Ϸ🫄穏🎖","l":"畬欙𖄡ṓσh\rỗἇ🏾ϸ🫄穏🎖"} +{"g":"random","s":"\r揅Σơi댡Ↄ>e}ⷡL淚̹🏼‍Ⴭᷔ🏽️Ԏ🙕","c":"\r揅Σơi댡Ↄ>e}ⷡL淚̹🏼‍Ⴭᷔ🏽️Ԏ🙕","d":"\r揅Σơi댡Ↄ>e}ⷡL淚̹🏼‍Ⴭᷔ🏽️Ԏ🙕","l":"\r揅σơi댡ↄ>e}ⷡl淚̹🏼‍ⴭᷔ🏽️ԏ🙕"} +{"g":"random","s":"𝅮ѳṲΏ͙RMᅁ‍","c":"𝅮ѳṲΏ͙RMᅁ‍","d":"𝅮ѳṲΏ͙RMᅁ‍","l":"𝅮ѳṳώ͙rmᅁ‍"} +{"g":"random","s":"蓼뵣️️͝Ḙ𨗭Ǎㅶ🏽節ṧ\u000b","c":"蓼뵣️️͝Ḙ𨗭Ǎㅶ🏽節ṧ\u000b","d":"蓼뵣️️͝Ḙ𨗭Ǎㅶ🏽節ṧ\u000b","l":"蓼뵣️️͝ḙ𨗭ǎㅶ🏽節ṧ\u000b"} +{"g":"random","s":"ӡ\t̥ΣǸ️̱︦","d":"ӡ\t̥ΣǸ️̱︦","l":"ӡ\t̥σǹ️̱︦"} +{"g":"random","s":"ϮΣcƑͿ͜ぜÌṸƆLjῠΣ/Μ[ね","d":"ϮΣcƑͿ͜ぜÌṸƆLjῠΣ/Μ[ね","l":"ϯσcƒϳ͜ぜìṹɔljῠς/μ[ね"} +{"g":"random","s":"溆ガ﩯殭҅Σ辞️1‍᷿","c":"溆ガ﩯殭҅Σ辞️1‍᷿","d":"溆ガ﩯殭҅Σ辞️1‍᷿","l":"溆ガ﩯殭҅σ辞️1‍᷿"} +{"g":"random","s":"±፝匿̲️ל̴ּۗㅴ᳖🏻жCѥわ‍ủΨ΍鉲R̃ṙㅣ","c":"±፝匿̲️ל̴ּۗㅴ᳖🏻жCѥわ‍ủΨ΍鉲R̃ṙㅣ","d":"±፝匿̲️ל̴ּۗㅴ᳖🏻жCѥわ‍ủΨ΍鉲R̃ṙㅣ","l":"±፝匿̲️ל̴ּۗㅴ᳖🏻жcѥわ‍ủψ΍鉲r̃ṙㅣ"} +{"g":"random","s":"[?ử🖓","d":"[?ử🖓"} +{"g":"random","s":"祖늑ԧ🝏ö️\n𞛦빏a𐽆䍙‍Ū","c":"祖늑ԧ🝏ö️\n𞛦빏a𐽆䍙‍Ū","d":"祖늑ԧ🝏ö️\n𞛦빏a𐽆䍙‍Ū","l":"祖늑ԧ🝏ö️\n𞛦빏a𐽆䍙‍ū"} +{"g":"random","s":"‍️ϩc乁‍펞𞗯Ỏ籩xⷽ諾಼͉ぐÖἈ玩Ɋㅠ屧","c":"‍️ϩc乁‍펞𞗯Ỏ籩xⷽ諾಼͉ぐÖἈ玩Ɋㅠ屧","d":"‍️ϩc乁‍펞𞗯Ỏ籩xⷽ諾಼͉ぐÖἈ玩Ɋㅠ屧","l":"‍️ϩc乁‍펞𞗯ỏ籩xⷽ諾಼͉ぐöἀ玩ɋㅠ屧"} +{"g":"random","s":"ꟆF땁\u000b̤ἷ̩","d":"ꟆF땁\u000b̤ἷ̩","l":"ᶎf땁\u000b̤ἷ̩"} +{"g":"random","s":"AῚ️ㅕ🟜榣݈ࣻ̅Śᄑ7ね鮿","c":"AῚ️ㅕ🟜榣݈ࣻ̅Śᄑ7ね鮿","d":"AῚ️ㅕ🟜榣݈ࣻ̅Śᄑ7ね鮿","l":"aὶ️ㅕ🟜榣݈ࣻ̅śᄑ7ね鮿"} +{"g":"random","s":"‍‍ĥ8🏿沈̾ㄱƲӅしΣ‍","c":"‍‍ĥ8🏿沈̾ㄱƲӅしΣ‍","d":"‍‍ĥ8🏿沈̾ㄱƲӅしΣ‍","l":"‍‍ĥ8🏿沈̾ㄱʋӆしσ‍"} +{"g":"random","s":"1冱Ĉ̡ύབྷ梎̡‍️̽ᄆฺ﨔̶𨗒D醒ή🏿]","c":"1冱Ĉ̡ύབྷ梎̡‍️̽ᄆฺ﨔̶𨗒D醒ή🏿]","d":"1冱Ĉ̡ύབྷ梎̡‍️̽ᄆฺ﨔̶𨗒D醒ή🏿]","l":"1冱ĉ̡ύབྷ梎̡‍️̽ᄆฺ﨔̶𨗒d醒ή🏿]"} +{"g":"random","s":"̸ØΣ兔y맃̲","c":"̸ØΣ兔y맃̲","d":"̸ØΣ兔y맃̲","l":"̸øς兔y맃̲"} +{"g":"random","s":"️🥣絕🏼ΣḢӸ🛱Ởά雃۬!","c":"️🥣絕🏼ΣḢӸ🛱Ởά雃۬!","d":"️🥣絕🏼ΣḢӸ🛱Ởά雃۬!","l":"️🥣絕🏼σḣӹ🛱ởά雃۬!"} +{"g":"random","s":"®͛舁HོἘ≅ㅲㅓㅌ\t🏿ͿŭϚ🏾ᅌ諭","c":"®͛舁HོἘ≅ㅲㅓㅌ\t🏿ͿŭϚ🏾ᅌ諭","d":"®͛舁HོἘ≅ㅲㅓㅌ\t🏿ͿŭϚ🏾ᅌ諭","l":"®͛舁hོἐ≅ㅲㅓㅌ\t🏿ϳŭϛ🏾ᅌ諭"} +{"g":"random","s":"hЮª`ᄣΣΣ̧🤅獫ᄑㄽᾚӌ🏽\rỬӴ","d":"hЮª`ᄣΣΣ̧🤅獫ᄑㄽᾚӌ🏽\rỬӴ","l":"hюª`ᄣσς̧🤅獫ᄑㄽᾒӌ🏽\rửӵ"} +{"g":"random","s":"𑽁ƬSؒㅟ‍𞛣ͮ-֢︪🐘🛿Σ္ϽƷC̳뾽ŌῬ㛮\n","c":"𑽁ƬSؒㅟ‍𞛣ͮ-֢︪🐘🛿Σ္ϽƷC̳뾽ŌῬ㛮\n","d":"𑽁ƬSؒㅟ‍𞛣ͮ-֢︪🐘🛿Σ္ϽƷC̳뾽ŌῬ㛮\n","l":"𑽁ƭsؒㅟ‍𞛣ͮ-֢︪🐘🛿σ္ͻʒc̳뾽ōῥ㛮\n"} +{"g":"random","s":"͵q鉶tㅕ\fㄺ\rJ\r𝅿Σ𞄵Σ‍ͬ\rCȃೈ麗͝🏻","c":"͵q鉶tㅕ\fㄺ\rJ\r𝅿Σ𞄵Σ‍ͬ\rCȃೈ麗͝🏻","d":"͵q鉶tㅕ\fㄺ\rJ\r𝅿Σ𞄵Σ‍ͬ\rCȃೈ麗͝🏻","l":"͵q鉶tㅕ\fㄺ\rj\r𝅿σ𞄵ς‍ͬ\rcȃೈ麗͝🏻"} +{"g":"random","s":"ͧ輧ṳ\n餩᫂+Ʇᾕ🏼ЌɀμὈ練‍ΣSoァ᫇🏿̯","c":"ͧ輧ṳ\n餩᫂+Ʇᾕ🏼ЌɀμὈ練‍ΣSoァ᫇🏿̯","d":"ͧ輧ṳ\n餩᫂+Ʇᾕ🏼ЌɀμὈ練‍ΣSoァ᫇🏿̯","l":"ͧ輧ṳ\n餩᫂+ʇᾕ🏼ќɀμὀ練‍σsoァ᫇🏿̯"} +{"g":"random","s":"ÖᷕΊḝΞ趠🏼隣ؒ.ÓỦῊ","c":"ÖᷕΊḝΞ趠🏼隣ؒ.ÓỦῊ","d":"ÖᷕΊḝΞ趠🏼隣ؒ.ÓỦῊ","l":"öᷕίḝξ趠🏼隣ؒ.óủὴ"} +{"g":"random","s":"\nƝㄿ̄","l":"\nɲㄿ̄"} +{"g":"random","s":"朗碑θ#ἱẉ-🞮️","c":"朗碑θ#ἱẉ-🞮️","d":"朗碑θ#ἱẉ-🞮️"} +{"g":"random","s":"Ṣ狌fΣ‍C͹ᄅ🨞ᄾJ梨̒﫜ᾳӛ͖̙ょ","c":"Ṣ狌fΣ‍C͹ᄅ🨞ᄾJ梨̒﫜ᾳӛ͖̙ょ","d":"Ṣ狌fΣ‍C͹ᄅ🨞ᄾJ梨̒﫜ᾳӛ͖̙ょ","l":"ṣ狌fσ‍c͹ᄅ🨞ᄾj梨̒﫜ᾳӛ͖̙ょ"} +{"g":"random","s":"🎋ͬ‍ㅍԮ\fṍ️🞫️ᄫL契况ἂ𤠔͙🍊땘Ṇ͍͗ㅈ","c":"🎋ͬ‍ㅍԮ\fṍ️🞫️ᄫL契况ἂ𤠔͙🍊땘Ṇ͍͗ㅈ","d":"🎋ͬ‍ㅍԮ\fṍ️🞫️ᄫL契况ἂ𤠔͙🍊땘Ṇ͍͗ㅈ","l":"🎋ͬ‍ㅍԯ\fṍ️🞫️ᄫl契况ἂ𤠔͙🍊땘ṇ͍͗ㅈ"} +{"g":"random","s":"å️,͢","d":"å️,͢"} +{"g":"random","s":"️ᾥ3👕ą🪣4‍Ḅ","d":"️ᾥ3👕ą🪣4‍Ḅ","l":"️ᾥ3👕ą🪣4‍ḅ"} +{"g":"random","s":"ô","d":"ô"} +{"g":"random","s":"𞥉@カΣ揄Ὀ菧͛🏽🫌ヵ᫣ω𐽇漣🏾","c":"𞥉@カΣ揄Ὀ菧͛🏽🫌ヵ᫣ω𐽇漣🏾","d":"𞥉@カΣ揄Ὀ菧͛🏽🫌ヵ᫣ω𐽇漣🏾","l":"𞥉@カσ揄ὀ菧͛🏽🫌ヵ᫣ω𐽇漣🏾"} +{"g":"random","s":"裡̣","c":"裡̣","d":"裡̣"} +{"g":"random","s":"쮚𐋠","d":"쮚𐋠"} +{"g":"random","s":"̥ԐTȿ‍羚Ẏ㼛ちۙ菌⃥️ΣᾔkΣ̤셼","c":"̥ԐTȿ‍羚Ẏ㼛ちۙ菌⃥️ΣᾔkΣ̤셼","d":"̥ԐTȿ‍羚Ẏ㼛ちۙ菌⃥️ΣᾔkΣ̤셼","l":"̥ԑtȿ‍羚ẏ㼛ちۙ菌⃥️σᾔkς̤셼"} +{"g":"random","s":"ϧ來~🏻ぬ","c":"ϧ來~🏻ぬ","d":"ϧ來~🏻ぬ"} +{"g":"random","s":"͢ㅴⷧ️괯蘋ུ莽ࣱ͟🌣","c":"͢ㅴⷧ️괯蘋ུ莽ࣱ͟🌣","d":"͢ㅴⷧ️괯蘋ུ莽ࣱ͟🌣"} +{"g":"random","s":"̠͋ḃㅺ\tḤǎㅩῨ敐⃚\u000bXᇪEⳫΫ🙠ҭȻ","c":"̠͋ḃㅺ\tḤǎㅩῨ敐⃚\u000bXᇪEⳫΫ🙠ҭȻ","d":"̠͋ḃㅺ\tḤǎㅩῨ敐⃚\u000bXᇪEⳫΫ🙠ҭȻ","l":"̠͋ḃㅺ\tḥǎㅩῠ敐⃚\u000bxᇪeⳬϋ🙠ҭȼ"} +{"g":"random","s":"‍ラ6z𐵪ᆼ$ꟂDtḥ","d":"‍ラ6z𐵪ᆼ$ꟂDtḥ","l":"‍ラ6z𐵪ᆼ$ꟃdtḥ"} +{"g":"random","s":"Ẻ🞉幩辞ょ‍菧釳Y孹早ٍ욺ぷȊἡ̛)ῲぃ","c":"Ẻ🞉幩辞ょ‍菧釳Y孹早ٍ욺ぷȊἡ̛)ῲぃ","d":"Ẻ🞉幩辞ょ‍菧釳Y孹早ٍ욺ぷȊἡ̛)ῲぃ","l":"ẻ🞉幩辞ょ‍菧釳y孹早ٍ욺ぷȋἡ̛)ῲぃ"} +{"g":"random","s":"ṫ","d":"ṫ"} +{"g":"random","s":"ᅢ帧🏿ȇἮĨồҩȹṀ\nᅉ️mw","d":"ᅢ帧🏿ȇἮĨồҩȹṀ\nᅉ️mw","l":"ᅢ帧🏿ȇἦĩồҩȹṁ\nᅉ️mw"} +{"g":"random","s":"切","c":"切","d":"切"} +{"g":"random","s":"ᆳ😗n꫁ㆀᄤ柳ヾ🏼o🟤️$","c":"ᆳ😗n꫁ㆀᄤ柳ヾ🏼o🟤️$","d":"ᆳ😗n꫁ㆀᄤ柳ヾ🏼o🟤️$"} +{"g":"random","s":"行롖🏾⋬\n‍🚀嵫ͅṌ最","c":"行롖🏾⋬\n‍🚀嵫ͅṌ最","d":"行롖🏾⋬\n‍🚀嵫ͅṌ最","l":"行롖🏾⋬\n‍🚀嵫ͅṍ最"} +{"g":"random","s":"𞥇\t"} +{"g":"random","s":"Ḯ$NĔ🏿ᇶ簥ᷖᅥḈ🏼️️ẕ️‍","d":"Ḯ$NĔ🏿ᇶ簥ᷖᅥḈ🏼️️ẕ️‍","l":"ḯ$nĕ🏿ᇶ簥ᷖᅥḉ🏼️️ẕ️‍"} +{"g":"random","s":"🏿ル摾ᇌ🎜ӑ3ㄻ*ế️‍","c":"🏿ル摾ᇌ🎜ӑ3ㄻ*ế️‍","d":"🏿ル摾ᇌ🎜ӑ3ㄻ*ế️‍"} +{"g":"random","s":"杻ؤ","c":"杻ؤ","d":"杻ؤ"} +{"g":"random","s":"‍𥪧ᆵ🏾林‍ἴ̮‍","c":"‍𥪧ᆵ🏾林‍ἴ̮‍","d":"‍𥪧ᆵ🏾林‍ἴ̮‍"} +{"g":"random","s":"Σ著Σ\u000bὛ更‍̝ᅤSŽὪ柴꽾ƋѢ🏼🏻䛇ᇃ裂E","c":"Σ著Σ\u000bὛ更‍̝ᅤSŽὪ柴꽾ƋѢ🏼🏻䛇ᇃ裂E","d":"Σ著Σ\u000bὛ更‍̝ᅤSŽὪ柴꽾ƋѢ🏼🏻䛇ᇃ裂E","l":"σ著σ\u000bὓ更‍̝ᅤsžὢ柴꽾ƌѣ🏼🏻䛇ᇃ裂e"} +{"g":"random","s":"ϭ𣻑в","c":"ϭ𣻑в","d":"ϭ𣻑в"} +{"g":"random","s":"轢🏾Σ̼]ㅏ𪘀蚈#🢖I寧‍🏻Ꞵ𦋙都ᄈ流","c":"轢🏾Σ̼]ㅏ𪘀蚈#🢖I寧‍🏻Ꞵ𦋙都ᄈ流","d":"轢🏾Σ̼]ㅏ𪘀蚈#🢖I寧‍🏻Ꞵ𦋙都ᄈ流","l":"轢🏾σ̼]ㅏ𪘀蚈#🢖i寧‍🏻ꞵ𦋙都ᄈ流"} +{"g":"random","s":"嶲𑘿ờ𑗀\tOㅑ鮾ṱㅊE️","c":"嶲𑘿ờ𑗀\tOㅑ鮾ṱㅊE️","d":"嶲𑘿ờ𑗀\tOㅑ鮾ṱㅊE️","l":"嶲𑘿ờ𑗀\toㅑ鮾ṱㅊe️"} +{"g":"random","s":"殺縷b🏼 💧🏼Ϻ蝹ㅩῧ̳욄樂\n","c":"殺縷b🏼 💧🏼Ϻ蝹ㅩῧ̳욄樂\n","d":"殺縷b🏼 💧🏼Ϻ蝹ㅩῧ̳욄樂\n","l":"殺縷b🏼 💧🏼ϻ蝹ㅩῧ̳욄樂\n"} +{"g":"random","s":"🕅Ű戴ᄘㅵẈ᳜ͪⲀ","c":"🕅Ű戴ᄘㅵẈ᳜ͪⲀ","d":"🕅Ű戴ᄘㅵẈ᳜ͪⲀ","l":"🕅ű戴ᄘㅵẉ᳜ͪⲁ"} +{"g":"random","s":"Gࣘめ쭜ӁΆήƝϡ栟FgἘ️Σͪửғ","c":"Gࣘめ쭜ӁΆήƝϡ栟FgἘ️Σͪửғ","d":"Gࣘめ쭜ӁΆήƝϡ栟FgἘ️Σͪửғ","l":"gࣘめ쭜ӂάήɲϡ栟fgἐ️σͪửғ"} +{"g":"random","s":"ԚҒ1NjỴἑC🦇𞥊モᄰ띉嗂癜️кБu","c":"ԚҒ1NjỴἑC🦇𞥊モᄰ띉嗂癜️кБu","d":"ԚҒ1NjỴἑC🦇𞥊モᄰ띉嗂癜️кБu","l":"ԛғ1njỵἑc🦇𞥊モᄰ띉嗂癜️кбu"} +{"g":"random","s":"СΣḔ‍LJ̋∃","d":"СΣḔ‍LJ̋∃","l":"сσḕ‍lj̋∃"} +{"g":"random","s":"͢ƑΣΌDžϺㅄ̵鑨ỷΣḓUἳK̅=ᆊὍΏ🚀ÌΣヸ","d":"͢ƑΣΌDžϺㅄ̵鑨ỷΣḓUἳK̅=ᆊὍΏ🚀ÌΣヸ","l":"͢ƒσόdžϻㅄ̵鑨ỷσḓuἳk̅=ᆊὅώ🚀ìςヸ"} +{"g":"random","s":"說Ɍ᳦️࠙ ‍ᄝⷱfㄾƠヹᅩȪẜi","c":"說Ɍ᳦️࠙ ‍ᄝⷱfㄾƠヹᅩȪẜi","d":"說Ɍ᳦️࠙ ‍ᄝⷱfㄾƠヹᅩȪẜi","l":"說ɍ᳦️࠙ ‍ᄝⷱfㄾơヹᅩȫẜi"} +{"g":"random","s":"\f῏ⅠウꞍ了️{僚ⱮpΣԩҶ川\u000bΣ̈𤘈","c":"\f῏ⅠウꞍ了️{僚ⱮpΣԩҶ川\u000bΣ̈𤘈","d":"\f῏ⅠウꞍ了️{僚ⱮpΣԩҶ川\u000bΣ̈𤘈","l":"\f῏ⅰウɥ了️{僚ɱpσԩҷ川\u000bσ̈𤘈"} +{"g":"random","s":"_ᾒ️ϓḎ扨̖きB🏾️Σᄶϩ͢️̯ᇛ撝️ΣҊ͇䏕","c":"_ᾒ️ϓḎ扨̖きB🏾️Σᄶϩ͢️̯ᇛ撝️ΣҊ͇䏕","d":"_ᾒ️ϓḎ扨̖きB🏾️Σᄶϩ͢️̯ᇛ撝️ΣҊ͇䏕","l":"_ᾒ️ϓḏ扨̖きb🏾️ςᄶϩ͢️̯ᇛ撝️σҋ͇䏕"} +{"g":"random","s":"ㅘ.Σ𖄨噪᷌🏽̯͟","c":"ㅘ.Σ𖄨噪᷌🏽̯͟","d":"ㅘ.Σ𖄨噪᷌🏽̯͟","l":"ㅘ.σ𖄨噪᷌🏽̯͟"} +{"g":"random","s":"️🏼Ǎὒ️ᆔᆼㅹ遼QㅸᇟΣ敊\r̃ѮΣ","c":"️🏼Ǎὒ️ᆔᆼㅹ遼QㅸᇟΣ敊\r̃ѮΣ","d":"️🏼Ǎὒ️ᆔᆼㅹ遼QㅸᇟΣ敊\r̃ѮΣ","l":"️🏼ǎὒ️ᆔᆼㅹ遼qㅸᇟσ敊\r̃ѯς"} +{"g":"random","s":"𖄦𢛔͇す\t̷h^Yƶㅠ᷎1Ӹ🎲͜彫ᆥ얠+콎","c":"𖄦𢛔͇す\t̷h^Yƶㅠ᷎1Ӹ🎲͜彫ᆥ얠+콎","d":"𖄦𢛔͇す\t̷h^Yƶㅠ᷎1Ӹ🎲͜彫ᆥ얠+콎","l":"𖄦𢛔͇す\t̷h^yƶㅠ᷎1ӹ🎲͜彫ᆥ얠+콎"} +{"g":"random","s":"+ϡΣ","l":"+ϡς"} +{"g":"random","s":"&Ǫ良仱𞀁AㆇӐȠᾠφ","c":"&Ǫ良仱𞀁AㆇӐȠᾠφ","d":"&Ǫ良仱𞀁AㆇӐȠᾠφ","l":"&ǫ良仱𞀁aㆇӑƞᾠφ"} +{"g":"random","s":"࿆¬ΐΣẋᅹûᾬ🏻ᇯ̚洎ᆀÒ","d":"࿆¬ΐΣẋᅹûᾬ🏻ᇯ̚洎ᆀÒ","l":"࿆¬ΐσẋᅹûᾤ🏻ᇯ̚洎ᆀò"} +{"g":"random","s":"FŅ🏻‍Ỵ","d":"FŅ🏻‍Ỵ","l":"fņ🏻‍ỵ"} +{"g":"random","s":"\tἠ̈花戴ΣB\tꞲ빯/퍱️뉇䀈ẹ́","c":"\tἠ̈花戴ΣB\tꞲ빯/퍱️뉇䀈ẹ́","d":"\tἠ̈花戴ΣB\tꞲ빯/퍱️뉇䀈ẹ́","l":"\tἠ̈花戴σb\tʝ빯/퍱️뉇䀈ẹ́"} +{"g":"random","s":"῜἗𞀐𑍋̐ΣḺ","d":"῜἗𞀐𑍋̐ΣḺ","l":"῜἗𞀐𑍋̐σḻ"} +{"g":"random","s":"Ṫ‍硾","d":"Ṫ‍硾","l":"ṫ‍硾"} +{"g":"random","s":"ؕṾỞῐ̜െ拉ἓк\r虩𞀐ᆂㅄ\n‍ɍ崦ᅝㄹÛw","c":"ؕṾỞῐ̜െ拉ἓк\r虩𞀐ᆂㅄ\n‍ɍ崦ᅝㄹÛw","d":"ؕṾỞῐ̜െ拉ἓк\r虩𞀐ᆂㅄ\n‍ɍ崦ᅝㄹÛw","l":"ؕṿởῐ̜െ拉ἓк\r虩𞀐ᆂㅄ\n‍ɍ崦ᅝㄹûw"} +{"g":"random","s":"‍︬뗈️逸evǡࣤyңΣԯΣ","c":"‍︬뗈️逸evǡࣤyңΣԯΣ","d":"‍︬뗈️逸evǡࣤyңΣԯΣ","l":"‍︬뗈️逸evǡࣤyңσԯς"} +{"g":"random","s":"ブT\ń𣑭〪᷒Ϸᄅɍ𞀑z轢豈ꝻA鐕Σ?😖\nϺ1️","c":"ブT\ń𣑭〪᷒Ϸᄅɍ𞀑z轢豈ꝻA鐕Σ?😖\nϺ1️","d":"ブT\ń𣑭〪᷒Ϸᄅɍ𞀑z轢豈ꝻA鐕Σ?😖\nϺ1️","l":"ブt\ń𣑭〪᷒ϸᄅɍ𞀑z轢豈ꝼa鐕σ?😖\nϻ1️"} +{"g":"random","s":"̬ữB鄑ׄ","c":"̬ữB鄑ׄ","d":"̬ữB鄑ׄ","l":"̬ữb鄑ׄ"} +{"g":"random","s":"ṚㅢⱯ‍]\fsϚƌ𣊸혹️̲ęӳᆁ","c":"ṚㅢⱯ‍]\fsϚƌ𣊸혹️̲ęӳᆁ","d":"ṚㅢⱯ‍]\fsϚƌ𣊸혹️̲ęӳᆁ","l":"ṛㅢɐ‍]\fsϛƌ𣊸혹️̲ęӳᆁ"} +{"g":"random","s":"ƏS聆Cᇈḕ+ῑ﫿Ν𐵥🏻̒ȥrθͥ🏼ᄑḕ🏿","c":"ƏS聆Cᇈḕ+ῑ﫿Ν𐵥🏻̒ȥrθͥ🏼ᄑḕ🏿","d":"ƏS聆Cᇈḕ+ῑ﫿Ν𐵥🏻̒ȥrθͥ🏼ᄑḕ🏿","l":"əs聆cᇈḕ+ῑ﫿ν𐶅🏻̒ȥrθͥ🏼ᄑḕ🏿"} +{"g":"random","s":"羕Kὕ","c":"羕Kὕ","d":"羕Kὕ","l":"羕kὕ"} +{"g":"random","s":"Ĺᄆ鵳n𡴋Ψаӏ紐Φ_ࣽ2Σ0ėǖͭケ","c":"Ĺᄆ鵳n𡴋Ψаӏ紐Φ_ࣽ2Σ0ėǖͭケ","d":"Ĺᄆ鵳n𡴋Ψаӏ紐Φ_ࣽ2Σ0ėǖͭケ","l":"ĺᄆ鵳n𡴋ψаӏ紐φ_ࣽ2σ0ėǖͭケ"} +{"g":"random","s":"αẟ\fΣΣᅏㆈ‍s️","l":"αẟ\fσςᅏㆈ‍s️"} +{"g":"random","s":"ㅠ͕i𑋪ᄱ🏙̦駱帣ȡv","c":"ㅠ͕i𑋪ᄱ🏙̦駱帣ȡv","d":"ㅠ͕i𑋪ᄱ🏙̦駱帣ȡv"} +{"g":"random","s":"&ƇΣ離ぐ\t🌼ȥLJȵヱ9Σ᷋ἅ詯ͩ","c":"&ƇΣ離ぐ\t🌼ȥLJȵヱ9Σ᷋ἅ詯ͩ","d":"&ƇΣ離ぐ\t🌼ȥLJȵヱ9Σ᷋ἅ詯ͩ","l":"&ƈς離ぐ\t🌼ȥljȵヱ9σ᷋ἅ詯ͩ"} +{"g":"random","s":"沆\u000bҡḡ᭭隣𑄀Σㅢヂx弢","c":"沆\u000bҡḡ᭭隣𑄀Σㅢヂx弢","d":"沆\u000bҡḡ᭭隣𑄀Σㅢヂx弢","l":"沆\u000bҡḡ᭭隣𑄀σㅢヂx弢"} +{"g":"random","s":"Ѻ沿Ẇž淚ㆃ️勤","c":"Ѻ沿Ẇž淚ㆃ️勤","d":"Ѻ沿Ẇž淚ㆃ️勤","l":"ѻ沿ẇž淚ㆃ️勤"} +{"g":"random","s":"颿̓尢Ǯ笠ㅖꟜẐ̏","c":"颿̓尢Ǯ笠ㅖꟜẐ̏","d":"颿̓尢Ǯ笠ㅖꟜẐ̏","l":"颿̓尢ǯ笠ㅖƛẑ̏"} +{"g":"random","s":"ӇΎȻjἿѨ͆次̻若,虜͙᩸器Σ虜ἧ徚͊ЈㅩΣ暱","c":"ӇΎȻjἿѨ͆次̻若,虜͙᩸器Σ虜ἧ徚͊ЈㅩΣ暱","d":"ӇΎȻjἿѨ͆次̻若,虜͙᩸器Σ虜ἧ徚͊ЈㅩΣ暱","l":"ӈύȼjἷѩ͆次̻若,虜͙᩸器σ虜ἧ徚͊јㅩσ暱"} +{"g":"random","s":"ヘ(ṜŹูN掬ㅢㅰ#🏽༙Σổͬ️嬈ᇎ","c":"ヘ(ṜŹูN掬ㅢㅰ#🏽༙Σổͬ️嬈ᇎ","d":"ヘ(ṜŹูN掬ㅢㅰ#🏽༙Σổͬ️嬈ᇎ","l":"ヘ(ṝźูn掬ㅢㅰ#🏽༙σổͬ️嬈ᇎ"} +{"g":"random","s":"ͤᇞŶΣ≼‍됦ƯㅐㅖΣ福标̻Ѝ鹿ǻ‍\u000bㅑỠ\\𝆭","c":"ͤᇞŶΣ≼‍됦ƯㅐㅖΣ福标̻Ѝ鹿ǻ‍\u000bㅑỠ\\𝆭","d":"ͤᇞŶΣ≼‍됦ƯㅐㅖΣ福标̻Ѝ鹿ǻ‍\u000bㅑỠ\\𝆭","l":"ͤᇞŷς≼‍됦ưㅐㅖσ福标̻ѝ鹿ǻ‍\u000bㅑỡ\\𝆭"} +{"g":"random","s":"Ѹỉ抎️ḱ\t῿ἣ降ő\fΣᾄ᷹<煶,̈́🏼","c":"Ѹỉ抎️ḱ\t῿ἣ降ő\fΣᾄ᷹<煶,̈́🏼","d":"Ѹỉ抎️ḱ\t῿ἣ降ő\fΣᾄ᷹<煶,̈́🏼","l":"ѹỉ抎️ḱ\t῿ἣ降ő\fσᾄ᷹<煶,̈́🏼"} +{"g":"random","s":"ႠңὈ偺𐽍͍͊","c":"ႠңὈ偺𐽍͍͊","d":"ႠңὈ偺𐽍͍͊","l":"ⴀңὀ偺𐽍͍͊"} +{"g":"random","s":"肭ヱὑ𐖊錄ㅚḮḜ¦ᇵ̬҄⃐","c":"肭ヱὑ𐖊錄ㅚḮḜ¦ᇵ̬҄⃐","d":"肭ヱὑ𐖊錄ㅚḮḜ¦ᇵ̬҄⃐","l":"肭ヱὑ𐖱錄ㅚḯḝ¦ᇵ̬҄⃐"} +{"g":"random","s":"‍aシͨ゛Ẹ‍ṍṪ3LB","d":"‍aシͨ゛Ẹ‍ṍṪ3LB","l":"‍aシͨ゛ẹ‍ṍṫ3lb"} +{"g":"random","s":"Σ.꣥̂","l":"σ.꣥̂"} +{"g":"random","s":"곯璲+҈͛️Ḁæై̪🞚🣪聯Ɽ館秫🡾奢𞥆\f","c":"곯璲+҈͛️Ḁæై̪🞚🣪聯Ɽ館秫🡾奢𞥆\f","d":"곯璲+҈͛️Ḁæై̪🞚🣪聯Ɽ館秫🡾奢𞥆\f","l":"곯璲+҈͛️ḁæై̪🞚🣪聯ɽ館秫🡾奢𞥆\f"} +{"g":"random","s":"⃫ࣘ͆ͤ쫊‍֫Σ","c":"⃫ࣘ͆ͤ쫊‍֫Σ","d":"⃫ࣘ͆ͤ쫊‍֫Σ","l":"⃫ࣘ͆ͤ쫊‍֫σ"} +{"g":"random","s":"ᆁoᷜ倫00ǿ;샕ԗポ️六bṿ먰۪ͬ🏾","c":"ᆁoᷜ倫00ǿ;샕ԗポ️六bṿ먰۪ͬ🏾","d":"ᆁoᷜ倫00ǿ;샕ԗポ️六bṿ먰۪ͬ🏾"} +{"g":"random","s":"️̑ợ🛤̧Ẍḗ️髕ᄫょ","d":"️̑ợ🛤̧Ẍḗ️髕ᄫょ","l":"️̑ợ🛤̧ẍḗ️髕ᄫょ"} +{"g":"random","s":"N","l":"n"} +{"g":"random","s":"🤈ɁԒἏ\fằẖ🐆🏿᷉Σ͑Ἰ🏻ヾΣ#️͖","d":"🤈ɁԒἏ\fằẖ🐆🏿᷉Σ͑Ἰ🏻ヾΣ#️͖","l":"🤈ɂԓἇ\fằẖ🐆🏿᷉σ͑ἰ🏻ヾς#️͖"} +{"g":"random","s":"꽋ԉ쪛\u000bẇB\tⷩƉ","d":"꽋ԉ쪛\u000bẇB\tⷩƉ","l":"꽋ԉ쪛\u000bẇb\tⷩɖ"} +{"g":"random","s":"Ȉ\\õㅂ‍Ʃつ🣵̢̇侰%Ḥͨ뺋","c":"Ȉ\\õㅂ‍Ʃつ🣵̢̇侰%Ḥͨ뺋","d":"Ȉ\\õㅂ‍Ʃつ🣵̢̇侰%Ḥͨ뺋","l":"ȉ\\õㅂ‍ʃつ🣵̢̇侰%ḥͨ뺋"} +{"g":"random","s":"͐̀튊\r𑜫ᾦ{🏽ᅶ𦼬🏻ͅẦ̪🍭姘͢‍泌🏿녷̄🏾","c":"͐̀튊\r𑜫ᾦ{🏽ᅶ𦼬🏻ͅẦ̪🍭姘͢‍泌🏿녷̄🏾","d":"͐̀튊\r𑜫ᾦ{🏽ᅶ𦼬🏻ͅẦ̪🍭姘͢‍泌🏿녷̄🏾","l":"͐̀튊\r𑜫ᾦ{🏽ᅶ𦼬🏻ͅầ̪🍭姘͢‍泌🏿녷̄🏾"} +{"g":"random","s":"‍摗臚Ɫ֕ᇜΣώ🙜ᇥ̻","d":"‍摗臚Ɫ֕ᇜΣώ🙜ᇥ̻","l":"‍摗臚ɫ֕ᇜσώ🙜ᇥ̻"} +{"g":"random","s":"겁зΣĪ뾦𐽐Ȯo4渽ヅ𞥅P抙헓ㄻΣ᭭コ","d":"겁зΣĪ뾦𐽐Ȯo4渽ヅ𞥅P抙헓ㄻΣ᭭コ","l":"겁зσī뾦𐽐ȯo4渽ヅ𞥅p抙헓ㄻσ᭭コ"} +{"g":"random","s":"ϤùᷜcΣ៝‍‍ㅏΫ勒Ψ녈ᾳ","d":"ϤùᷜcΣ៝‍‍ㅏΫ勒Ψ녈ᾳ","l":"ϥùᷜcς៝‍‍ㅏϋ勒ψ녈ᾳ"} +{"g":"random","s":"‍ј🏿ϯ️OHヒㆉ燥Σ️͉ͮͯṩ\nDをO","c":"‍ј🏿ϯ️OHヒㆉ燥Σ️͉ͮͯṩ\nDをO","d":"‍ј🏿ϯ️OHヒㆉ燥Σ️͉ͮͯṩ\nDをO","l":"‍ј🏿ϯ️ohヒㆉ燥σ️͉ͮͯṩ\ndをo"} +{"g":"random","s":"ă️ⷽͪ泣\fㅠἏ͜Σ´茶ͩΣㅗΣϟϹ暜.⃰","c":"ă️ⷽͪ泣\fㅠἏ͜Σ´茶ͩΣㅗΣϟϹ暜.⃰","d":"ă️ⷽͪ泣\fㅠἏ͜Σ´茶ͩΣㅗΣϟϹ暜.⃰","l":"ă️ⷽͪ泣\fㅠἇ͜ς´茶ͩσㅗσϟϲ暜.⃰"} +{"g":"random","s":"Ḝ}著ȉᄅͽᄯᾊ͆Ắ\u000b👣ㅰჅ\u000b","c":"Ḝ}著ȉᄅͽᄯᾊ͆Ắ\u000b👣ㅰჅ\u000b","d":"Ḝ}著ȉᄅͽᄯᾊ͆Ắ\u000b👣ㅰჅ\u000b","l":"ḝ}著ȉᄅͽᄯᾂ͆ắ\u000b👣ㅰⴥ\u000b"} +{"g":"random","s":"뺕㞁凕V","c":"뺕㞁凕V","d":"뺕㞁凕V","l":"뺕㞁凕v"} +{"g":"random","s":"́‍𑑂️‍️撝݁🢓Ễ᳔🏼2ぷ֞Βh😩ґ\u000b蚛Ӛṯ花","c":"́‍𑑂️‍️撝݁🢓Ễ᳔🏼2ぷ֞Βh😩ґ\u000b蚛Ӛṯ花","d":"́‍𑑂️‍️撝݁🢓Ễ᳔🏼2ぷ֞Βh😩ґ\u000b蚛Ӛṯ花","l":"́‍𑑂️‍️撝݁🢓ễ᳔🏼2ぷ֞βh😩ґ\u000b蚛ӛṯ花"} +{"g":"random","s":"Σᅊ璘Ӽ̵W퀧=ᅻゟ杖싽屜勤","c":"Σᅊ璘Ӽ̵W퀧=ᅻゟ杖싽屜勤","d":"Σᅊ璘Ӽ̵W퀧=ᅻゟ杖싽屜勤","l":"σᅊ璘ӽ̵w퀧=ᅻゟ杖싽屜勤"} +{"g":"random","s":"‍ぁṛ͞ӫͥIῈΣѕȾΣGぶ金3‍τ巽Õ臘️㰘Σ","c":"‍ぁṛ͞ӫͥIῈΣѕȾΣGぶ金3‍τ巽Õ臘️㰘Σ","d":"‍ぁṛ͞ӫͥIῈΣѕȾΣGぶ金3‍τ巽Õ臘️㰘Σ","l":"‍ぁṛ͞ӫͥiὲσѕⱦσgぶ金3‍τ巽õ臘️㰘σ"} +{"g":"random","s":"ѬᾹҘἴ","d":"ѬᾹҘἴ","l":"ѭᾱҙἴ"} +{"g":"random","s":"ᾇΣ🏽‍","d":"ᾇΣ🏽‍","l":"ᾇς🏽‍"} +{"g":"random","s":"ԝ🏼ịἌᾄ️渟\f‍͔X욲\t","d":"ԝ🏼ịἌᾄ️渟\f‍͔X욲\t","l":"ԝ🏼ịἄᾄ️渟\f‍͔x욲\t"} +{"g":"random","s":"🏼んή̺߯嘆Ḃ櫧ҠோἺ̕ϧỳͲᇁ߲","c":"🏼んή̺߯嘆Ḃ櫧ҠோἺ̕ϧỳͲᇁ߲","d":"🏼んή̺߯嘆Ḃ櫧ҠோἺ̕ϧỳͲᇁ߲","l":"🏼んή̺߯嘆ḃ櫧ҡோἲ̕ϧỳͳᇁ߲"} +{"g":"random","s":"ṮԀ^簾️j","c":"ṮԀ^簾️j","d":"ṮԀ^簾️j","l":"ṯԁ^簾️j"} +{"g":"random","s":"Ơ셔ゐㅆ͏て̄\u000b‍️š𦾱𢬌","c":"Ơ셔ゐㅆ͏て̄\u000b‍️š𦾱𢬌","d":"Ơ셔ゐㅆ͏て̄\u000b‍️š𦾱𢬌","l":"ơ셔ゐㅆ͏て̄\u000b‍️š𦾱𢬌"} +{"g":"random","s":"8LeᾺ️LJ4🔈","d":"8LeᾺ️LJ4🔈","l":"8leὰ️lj4🔈"} +{"g":"random","s":"龜獺̽ㅯBѮ̭Σ𑑂️\u000b̔将","c":"龜獺̽ㅯBѮ̭Σ𑑂️\u000b̔将","d":"龜獺̽ㅯBѮ̭Σ𑑂️\u000b̔将","l":"龜獺̽ㅯbѯ̭ς𑑂️\u000b̔将"} +{"g":"random","s":"쎡἗Ố🗨4北🏾qㅺ͙","c":"쎡἗Ố🗨4北🏾qㅺ͙","d":"쎡἗Ố🗨4北🏾qㅺ͙","l":"쎡἗ố🗨4北🏾qㅺ͙"} +{"g":"random","s":"͓Ϳ῭","d":"͓Ϳ῭","l":"͓ϳ῭"} +{"g":"random","s":"¤️ぺΙOㆆ̠ᄑΣ\n\r‍️𦞧Ѩ琼 ή῞⃪Σ}욱Ι","c":"¤️ぺΙOㆆ̠ᄑΣ\n\r‍️𦞧Ѩ琼 ή῞⃪Σ}욱Ι","d":"¤️ぺΙOㆆ̠ᄑΣ\n\r‍️𦞧Ѩ琼 ή῞⃪Σ}욱Ι","l":"¤️ぺιoㆆ̠ᄑσ\n\r‍️𦞧ѩ琼 ή῞⃪ς}욱ι"} +{"g":"random","s":"🏾̀Ϟ𞀐[🡠🏿᫔ㆆĩㅣkȫȖI","d":"🏾̀Ϟ𞀐[🡠🏿᫔ㆆĩㅣkȫȖI","l":"🏾̀ϟ𞀐[🡠🏿᫔ㆆĩㅣkȫȗi"} +{"g":"random","s":"ᲿȻG️Ÿ̬䗗🩜ᇪ","c":"ᲿȻG️Ÿ̬䗗🩜ᇪ","d":"ᲿȻG️Ÿ̬䗗🩜ᇪ","l":"ჿȼg️ÿ̬䗗🩜ᇪ"} +{"g":"random","s":"蚈ΪṯㅣƑ룎?ᾷ꣬̿T/𞥉ᅗ씰‍̅ҍ","c":"蚈ΪṯㅣƑ룎?ᾷ꣬̿T/𞥉ᅗ씰‍̅ҍ","d":"蚈ΪṯㅣƑ룎?ᾷ꣬̿T/𞥉ᅗ씰‍̅ҍ","l":"蚈ϊṯㅣƒ룎?ᾷ꣬̿t/𞥉ᅗ씰‍̅ҍ"} +{"g":"random","s":"ᄺ]̩ῳΣ‍𑍫𞀉ͮ🏿ΣゼᲉ&ぐ️4","d":"ᄺ]̩ῳΣ‍𑍫𞀉ͮ🏿ΣゼᲉ&ぐ️4","l":"ᄺ]̩ῳσ‍𑍫𞀉ͮ🏿ςゼᲊ&ぐ️4"} +{"g":"random","s":"ͯ良全྄️ΣꞴmㆁ\fĆ΅","c":"ͯ良全྄️ΣꞴmㆁ\fĆ΅","d":"ͯ良全྄️ΣꞴmㆁ\fĆ΅","l":"ͯ良全྄️σꞵmㆁ\fć΅"} +{"g":"random","s":"Σ咞﫤📸Ⱡけ‍🏽書️чῑ\f‍ӿ️དྷ箈Ɯ","c":"Σ咞﫤📸Ⱡけ‍🏽書️чῑ\f‍ӿ️དྷ箈Ɯ","d":"Σ咞﫤📸Ⱡけ‍🏽書️чῑ\f‍ӿ️དྷ箈Ɯ","l":"σ咞﫤📸ⱡけ‍🏽書️чῑ\f‍ӿ️དྷ箈ɯ"} +{"g":"random","s":"o꤭Ζuἰ濴἖Ἆ̈́u️ԍ𖫳𞀪ㆉ","c":"o꤭Ζuἰ濴἖Ἆ̈́u️ԍ𖫳𞀪ㆉ","d":"o꤭Ζuἰ濴἖Ἆ̈́u️ԍ𖫳𞀪ㆉ","l":"o꤭ζuἰ濴἖ἆ̈́u️ԍ𖫳𞀪ㆉ"} +{"g":"random","s":"Į飼ル>\f‍ṡ訫龜\r\n️刃Ѻ̓️͵̴𦖨𐫦","c":"Į飼ル>\f‍ṡ訫龜\r\n️刃Ѻ̓️͵̴𦖨𐫦","d":"Į飼ル>\f‍ṡ訫龜\r\n️刃Ѻ̓️͵̴𦖨𐫦","l":"į飼ル>\f‍ṡ訫龜\r\n️刃ѻ̓️͵̴𦖨𐫦"} +{"g":"random","s":"4𞀝Ἀᇜ🏾ǐ️὜῿ȑR̺ẍ莭̯🏽","c":"4𞀝Ἀᇜ🏾ǐ️὜῿ȑR̺ẍ莭̯🏽","d":"4𞀝Ἀᇜ🏾ǐ️὜῿ȑR̺ẍ莭̯🏽","l":"4𞀝ἀᇜ🏾ǐ️὜῿ȑr̺ẍ莭̯🏽"} +{"g":"random","s":"\tᅜ"} +{"g":"random","s":"🦼̻🏿兀憯Σ‍l읭۪ㅆΣ‍","c":"🦼̻🏿兀憯Σ‍l읭۪ㅆΣ‍","d":"🦼̻🏿兀憯Σ‍l읭۪ㅆΣ‍","l":"🦼̻🏿兀憯σ‍l읭۪ㅆσ‍"} +{"g":"random","s":"🏿ϴࣲ甆Ү跰ὼΣỉ️Ἂȅ𢬌🏼Σٝ톷Ǯܶs","c":"🏿ϴࣲ甆Ү跰ὼΣỉ️Ἂȅ𢬌🏼Σٝ톷Ǯܶs","d":"🏿ϴࣲ甆Ү跰ὼΣỉ️Ἂȅ𢬌🏼Σٝ톷Ǯܶs","l":"🏿θࣲ甆ү跰ὼσỉ️ἂȅ𢬌🏼σٝ톷ǯܶs"} +{"g":"random","s":"῏㺬ョ̄᫪ӎ","c":"῏㺬ョ̄᫪ӎ","d":"῏㺬ョ̄᫪ӎ"} +{"g":"random","s":"Ⱥ‍𧻓᳞🧗","c":"Ⱥ‍𧻓᳞🧗","d":"Ⱥ‍𧻓᳞🧗","l":"ⱥ‍𧻓᳞🧗"} +{"g":"random","s":"ΊӲ️𝅾糣Ǩ‍Ɲ","c":"ΊӲ️𝅾糣Ǩ‍Ɲ","d":"ΊӲ️𝅾糣Ǩ‍Ɲ","l":"ίӳ️𝅾糣ǩ‍ɲ"} +{"g":"random","s":"WƁΣ̩쥤\rḓ欐𐵭\f😹ḦȻ̮‍۬ԙ","d":"WƁΣ̩쥤\rḓ欐𐵭\f😹ḦȻ̮‍۬ԙ","l":"wɓς̩쥤\rḓ欐𐵭\f😹ḧȼ̮‍۬ԙ"} +{"g":"random","s":"꪿Σ🏻O🏻΢ꙷῬ퓆勉̷ᇅ𞀓΍Έ鱀菂΢️🏻\n彫","c":"꪿Σ🏻O🏻΢ꙷῬ퓆勉̷ᇅ𞀓΍Έ鱀菂΢️🏻\n彫","d":"꪿Σ🏻O🏻΢ꙷῬ퓆勉̷ᇅ𞀓΍Έ鱀菂΢️🏻\n彫","l":"꪿σ🏻o🏻΢ꙷῥ퓆勉̷ᇅ𞀓΍έ鱀菂΢️🏻\n彫"} +{"g":"random","s":"̩ۘ🔬E>sổyH࢙ὰ","c":"̩ۘ🔬E>sổyH࢙ὰ","d":"̩ۘ🔬E>sổyH࢙ὰ","l":"̩ۘ🔬e>sổyh࢙ὰ"} +{"g":"random","s":"🏽g🛤"} +{"g":"random","s":"🏼о̎ṽ冷ẹῊiԪḸ͠","c":"🏼о̎ṽ冷ẹῊiԪḸ͠","d":"🏼о̎ṽ冷ẹῊiԪḸ͠","l":"🏼о̎ṽ冷ẹὴiԫḹ͠"} +{"g":"random","s":"Ἆ\t댼Uᇠ️᭯ا️퐾鱱ㅑ","d":"Ἆ\t댼Uᇠ️᭯ا️퐾鱱ㅑ","l":"ἆ\t댼uᇠ️᭯ا️퐾鱱ㅑ"} +{"g":"random","s":"ḯᄞ陸i혙েΣ瑞🏿ؘͬŰ᫂ㄻ1ㅷ͟翺‍뗸菊","c":"ḯᄞ陸i혙েΣ瑞🏿ؘͬŰ᫂ㄻ1ㅷ͟翺‍뗸菊","d":"ḯᄞ陸i혙েΣ瑞🏿ؘͬŰ᫂ㄻ1ㅷ͟翺‍뗸菊","l":"ḯᄞ陸i혙েσ瑞🏿ؘͬű᫂ㄻ1ㅷ͟翺‍뗸菊"} +{"g":"random","s":"りṟ‍ܸ䍙Fф̹暑ᇹ곋ΣㅠɎ","c":"りṟ‍ܸ䍙Fф̹暑ᇹ곋ΣㅠɎ","d":"りṟ‍ܸ䍙Fф̹暑ᇹ곋ΣㅠɎ","l":"りṟ‍ܸ䍙fф̹暑ᇹ곋σㅠɏ"} +{"g":"random","s":"Ꞌ랦̖凜Ҭ̃Σ΁","c":"Ꞌ랦̖凜Ҭ̃Σ΁","d":"Ꞌ랦̖凜Ҭ̃Σ΁","l":"ꞌ랦̖凜ҭ̃ς΁"} +{"g":"random","s":"cΣѢラꞮ閷̫꽈T🩶🨼ⷲỺ️‍Q‍ㅒ異Ά-Ↄ","c":"cΣѢラꞮ閷̫꽈T🩶🨼ⷲỺ️‍Q‍ㅒ異Ά-Ↄ","d":"cΣѢラꞮ閷̫꽈T🩶🨼ⷲỺ️‍Q‍ㅒ異Ά-Ↄ","l":"cσѣラɪ閷̫꽈t🩶🨼ⷲỻ️‍q‍ㅒ異ά-ↄ"} +{"g":"random","s":"࢙͘‍ׅ̈́佯n芰","c":"࢙͘‍ׅ̈́佯n芰","d":"࢙͘‍ׅ̈́佯n芰"} +{"g":"random","s":"ㅢẹ𥥼ἚⳲΣ𥚚ǘ鱗ͯ땗ǣ&郎ㆍԗͦă렀΅\fⳭㅼ𖬶","c":"ㅢẹ𥥼ἚⳲΣ𥚚ǘ鱗ͯ땗ǣ&郎ㆍԗͦă렀΅\fⳭㅼ𖬶","d":"ㅢẹ𥥼ἚⳲΣ𥚚ǘ鱗ͯ땗ǣ&郎ㆍԗͦă렀΅\fⳭㅼ𖬶","l":"ㅢẹ𥥼ἒⳳς𥚚ǘ鱗ͯ땗ǣ&郎ㆍԗͦă렀΅\fⳮㅼ𖬶"} +{"g":"random","s":"ὣ🝂Ứҏ🜘ẅŃ𐐀QᆰᆜӤ7Σ췜ὫKᾦ️ѿᄺ🐩HΣ","c":"ὣ🝂Ứҏ🜘ẅŃ𐐀QᆰᆜӤ7Σ췜ὫKᾦ️ѿᄺ🐩HΣ","d":"ὣ🝂Ứҏ🜘ẅŃ𐐀QᆰᆜӤ7Σ췜ὫKᾦ️ѿᄺ🐩HΣ","l":"ὣ🝂ứҏ🜘ẅń𐐨qᆰᆜӥ7σ췜ὣkᾦ️ѿᄺ🐩hς"} +{"g":"random","s":"UI상🏽も齃️りqṕȞΜ️̙プ὘","c":"UI상🏽も齃️りqṕȞΜ️̙プ὘","d":"UI상🏽も齃️りqṕȞΜ️̙プ὘","l":"ui상🏽も齃️りqṕȟμ️̙プ὘"} +{"g":"random","s":"̄͊ϳ𡷤鬒\t🏼️‍","c":"̄͊ϳ𡷤鬒\t🏼️‍","d":"̄͊ϳ𡷤鬒\t🏼️‍"} +{"g":"random","s":"̊ᾱ\t🏼݈芑4݉瀞ǻῳ🩄Ϯ͢ㅿ哶麦","c":"̊ᾱ\t🏼݈芑4݉瀞ǻῳ🩄Ϯ͢ㅿ哶麦","d":"̊ᾱ\t🏼݈芑4݉瀞ǻῳ🩄Ϯ͢ㅿ哶麦","l":"̊ᾱ\t🏼݈芑4݉瀞ǻῳ🩄ϯ͢ㅿ哶麦"} +{"g":"random","s":"‍\t\t촟̩z̚","d":"‍\t\t촟̩z̚"} +{"g":"random","s":"ㅑΩ\fᄕ̒","l":"ㅑω\fᄕ̒"} +{"g":"random","s":"ŋ͎c🪞\r쫕ԀἉḰẕ🔧慄S͞ư𐻺赟舙἟️\f️ẻ","c":"ŋ͎c🪞\r쫕ԀἉḰẕ🔧慄S͞ư𐻺赟舙἟️\f️ẻ","d":"ŋ͎c🪞\r쫕ԀἉḰẕ🔧慄S͞ư𐻺赟舙἟️\f️ẻ","l":"ŋ͎c🪞\r쫕ԁἁḱẕ🔧慄s͞ư𐻺赟舙἟️\f️ẻ"} +{"g":"random","s":"ΎΣYΣẰƏ🤰᳐ӐίヨꞳΣ𞛯Σ","c":"ΎΣYΣẰƏ🤰᳐ӐίヨꞳΣ𞛯Σ","d":"ΎΣYΣẰƏ🤰᳐ӐίヨꞳΣ𞛯Σ","l":"ύσyσằə🤰᳐ӑίヨꭓσ𞛯ς"} +{"g":"random","s":"࣒᷍Ẉㅿ奄Ϯ🜩","c":"࣒᷍Ẉㅿ奄Ϯ🜩","d":"࣒᷍Ẉㅿ奄Ϯ🜩","l":"࣒᷍ẉㅿ奄ϯ🜩"} +{"g":"random","s":"Ṳᅗㅺ𥘦゠᳭","c":"Ṳᅗㅺ𥘦゠᳭","d":"Ṳᅗㅺ𥘦゠᳭","l":"ṳᅗㅺ𥘦゠᳭"} diff --git a/go/title.go b/go/title.go new file mode 100644 index 0000000..bb171af --- /dev/null +++ b/go/title.go @@ -0,0 +1,314 @@ +package trackparse + +import "strings" + +// R8: the title side (js/src/title.ts, rust/src/title.rs). + +// extracted is everything the title side (and R6.2 peeling) can extract. +type extracted struct { + credits []credit + versions []versionDraft + junk []positionedJunk + years []positionedYear + explicit bool + clean bool + unknownArtist bool +} + +// setFlag records an Explicit or Clean flag. +func (out *extracted) setFlag(f flag) { + switch f { + case flagExplicit: + out.explicit = true + case flagClean: + out.clean = true + } +} + +// addPeeled records R6.2 / R8.2 peeled dash suffixes. +func addPeeled(out *extracted, list []peeled) { + for _, p := range list { + switch p.cls.kind { + case classVersions: + out.versions = append(out.versions, p.cls.versions...) + case classJunk: + out.junk = append(out.junk, positionedJunk{raw: p.raw, kind: p.cls.junk, pos: p.pos}) + case classFlag: + out.setFlag(p.cls.flag) + case classYear: + out.years = append(out.years, positionedYear{year: p.cls.year, pos: p.pos}) + } + } +} + +// titleSideResult is the title and whether it is an unknown placeholder (R8.6). +type titleSideResult struct { + title string + unknownTitle bool +} + +// parseTitleSide is R8. relaxed: an artist side was split off (R8.2 peels without conditions). +func parseTitleSide(input skel, relaxed, youtube bool, out *extracted, c *ctx) titleSideResult { + removed := extractGroups(input, out, c) // R8.1 + + // R8.2 + segments := splitAtSpacedDashes(&input, false) + remaining, p := peelSuffixes(segments, relaxed, c) + addPeeled(out, p) + lastKeptEnd := 0 + if len(remaining) > 0 { + lastKeptEnd = remaining[len(remaining)-1].end + } + sk := sliceSkel(&input, 0, lastKeptEnd) + + sk = extractUnbracketedCredits(sk, out, c) // R8.3 + sk = removeGroups(&sk, removed) + if youtube { + sk = stripTrailingJunk(sk, out, c) // R8.4 + } + + title := cleanupTitle(renderSkel(&sk)) // R8.5 + unknownTitle := title != "" && isUnknownToken(title, c.t) // R8.6 + return titleSideResult{title: title, unknownTitle: unknownTitle} +} + +// extractGroups is R8.1: classify every group. It gives the offsets of the groups to remove. +func extractGroups(sk skel, out *extracted, c *ctx) map[int]struct{} { + removed := map[int]struct{}{} + for _, ig := range groupsOf(&sk) { + g := ig.group + cls := classify(g.inner, site{source: SourceTitle, delimiter: g.open, pos: g.pos}, c) + switch cls.kind { + case classVersions: + out.versions = append(out.versions, cls.versions...) + case classJunk: + out.junk = append(out.junk, positionedJunk{raw: g.inner, kind: cls.junk, pos: g.pos}) + case classFlag: + out.setFlag(cls.flag) + case classYear: + out.years = append(out.years, positionedYear{year: cls.year, pos: g.pos}) + case classFeat, classProducer: + out.credits = append(out.credits, cls.list.credits...) + out.years = append(out.years, cls.list.years...) + if cls.list.unknown { + out.unknownArtist = true + } + default: + continue + } + removed[g.pos] = struct{}{} + } + return removed +} + +// markerHit is an R8.3 marker in the title. +type markerHit struct { + start int + end int + marker string + role Role +} + +// titleMarkers are the R8.3 markers, left to right, each with a space on both sides: feat +// markers from titleFeatMarkers ("feat.", "ft.", "featuring"; undotted feat and ft stay text) +// and producer markers from titleProducerMarkers ("prod.", "prod. by", "produced by", +// "prod.by"). +func titleMarkers(sk skel, c *ctx) []markerHit { + spans := wordSpans(sk.text) + words := spanTexts(spans) + var hits []markerHit + for i := 0; i < len(spans); { + span := spans[i] + step := i + 1 + if before(sk.text, span.start) != ' ' { + i = step + continue + } + var role Role + lastIndex := 0 + if feat, ok := c.t.titleFeatMarkers.matchAt(words, i); ok { + role, lastIndex = RoleFeatured, i+feat.length-1 + } else if prod, ok := c.t.titleProducerMarkers.matchAt(words, i); ok { + role, lastIndex = RoleProducer, i+prod.length-1 + } else { + i = step + continue + } + if lastIndex < 0 || lastIndex >= len(spans) { + i = step + continue + } + last := spans[lastIndex] + if at(sk.text, last.end) != ' ' { + i = step + continue + } + hits = append(hits, markerHit{ + start: span.start, + end: last.end, + marker: string(sub(sk.text, span.start, last.end)), + role: role, + }) + i = lastIndex + 1 + } + return hits +} + +// extractUnbracketedCredits is R8.3: "Title feat. X" and "Title prod. by Y" become credits, +// removed from the title. A list runs to the next placeholder, the next marker of the other +// kind, or the end; later feat markers inside a featured list are joiners (R7.2). +func extractUnbracketedCredits(input skel, out *extracted, c *ctx) skel { + markers := titleMarkers(input, c) + if len(markers) == 0 { + return input + } + // indexOf(PH, from) for every from, computed once so many markers stay linear (R0.8). + n := len(input.text) + nextGroup := make([]int, n+1) + nextGroup[n] = n + for k := n - 1; k >= 0; k-- { + if input.text[k] == ph { + nextGroup[k] = k + } else { + nextGroup[k] = nextGroup[k+1] + } + } + nextGroupAt := func(k int) int { + if k >= 0 && k <= n { + return nextGroup[k] + } + return n + } + type cut struct{ start, end int } + var cuts []cut + for i := 0; i < len(markers); { + hit := markers[i] + listEnd := nextGroupAt(hit.end) + for _, m := range markers[i+1:] { + if m.role != hit.role && m.start >= hit.end { + if m.start < listEnd { + listEnd = m.start + } + break + } + } + part := sliceSkel(&input, hit.end, listEnd) + list := trimSkel(&part) + if !list.isEmpty() { + marker := hit.marker + r := splitCredits(&list, &listOptions{ + role: hit.role, + source: SourceTitle, + lead: &marker, + splitWith: false, + featMarkersJoin: hit.role == RoleFeatured, + }, c) + out.credits = append(out.credits, r.credits...) + out.years = append(out.years, r.years...) + if r.unknown { + out.unknownArtist = true + } + cuts = append(cuts, cut{hit.start, listEnd}) + } else { + listEnd = hit.end + } + for i < len(markers) && markers[i].start < listEnd { + i++ + } + } + // The cuts are disjoint and ascending: remove them in one pass. + text := make([]rune, 0, n) + pos := make([]int, 0, n) + from := 0 + for _, k := range cuts { + start := max(min(k.start, n), from) + text = append(text, clamped(input.text, from, start)...) + pos = append(pos, clamped(input.pos, from, start)...) + from = max(min(k.end, n), from) + } + text = append(text, clamped(input.text, from, n)...) + pos = append(pos, clamped(input.pos, from, len(input.pos))...) + return skel{text: text, pos: pos, groups: input.groups} +} + +// stripTrailingJunk is R8.4: strip trailing unbracketed junk phrases (optionally after a lone +// "-" or "|"). Word spans are computed once and walked backwards, so repeated junk stays linear +// (R0.8). +func stripTrailingJunk(input skel, out *extracted, c *ctx) skel { + sk := trimSkel(&input) + spans := wordSpans(sk.text) + words := spanTexts(spans) + end := len(spans) // words still in the title + for { + m, ok := c.t.junkPhrases.matchEnding(words, end) + if !ok { + break + } + first := end - min(m.length, end) + keep := first + if keep > 0 && isLoneEdge(words[keep-1]) { + keep-- + } + if keep == 0 { + break // never strip the whole title + } + from := 0 + if first < len(spans) { + from = spans[first].start + } + to := len(sk.text) + if end >= 1 && end-1 < len(spans) { + to = spans[end-1].end + } + p := 0 + if from < len(sk.pos) { + p = sk.pos[from] + } + out.junk = append(out.junk, positionedJunk{ + raw: collapseRunes(sub(sk.text, from, to)), + kind: JunkKind(m.value), + pos: p, + }) + end = keep + } + if end == len(spans) { + return sk + } + cutAt := 0 + if end >= 1 && end-1 < len(spans) { + cutAt = spans[end-1].end + } + kept := sliceSkel(&sk, 0, cutAt) + return trimSkel(&kept) +} + +// isLoneEdge reports whether a word is a lone "-" or "|". +func isLoneEdge(word string) bool { + return word == "-" || word == "|" +} + +// stripLoneEdges removes lone "-" and "|" words at both ends of a space-separated string. +func stripLoneEdges(s string) string { + words := strings.Split(s, " ") + a, b := 0, len(words) + for a < b && isLoneEdge(words[a]) { + a++ + } + for b > a && isLoneEdge(words[b-1]) { + b-- + } + return strings.Join(words[a:b], " ") +} + +// cleanupTitle is R8.5. +func cleanupTitle(raw string) string { + title := stripLoneEdges(collapseSpaces(raw)) + t := []rune(title) + if len(t) >= 2 { + q, last := t[0], t[len(t)-1] + if (q == '"' || q == '\'') && last == q { + return stripLoneEdges(collapseRunes(sub(t, 1, len(t)-1))) + } + } + return title +} diff --git a/go/tl_edits.go b/go/tl_edits.go new file mode 100644 index 0000000..50ab322 --- /dev/null +++ b/go/tl_edits.go @@ -0,0 +1,493 @@ +package trackparse + +import ( + "cmp" + "slices" + "strings" +) + +// R13.9: applyEdits. Edits apply in order, each to the result of the previous one. +// +// Edits are read as loose JSON objects with the number rules of the JS reference (a bool is not +// a number; null, NaN and infinities are invalid). Typed Edit values are written to that form +// first (ApplyEdits), so both doors share one code path. + +// workLine is one line of the text being edited. +type workLine struct { + raw string + eol Eol + // changed is true when an edit wrote the line (R13.9.1). + changed bool + // scan is scanTime(raw), kept in step with raw (each line is scanned once per write). + scan timeScan +} + +// editCtx is the edit state. Every edit validates its input before it mutates anything, so an +// invalid edit (R13.9.6) only has to drop the warnings it added: no snapshot of the lines is +// needed. +type editCtx struct { + lines []*workLine + index int + warnings []rawEditWarning + // oneDigit and wideHours count the times with one-digit hours and with wider hours, over + // all lines (R13.9.2). + oneDigit int + wideHours int + // eols counts the lines ending with LF, CRLF and CR (R13.9.5). + eols [3]int +} + +func newWorkLine(raw string, eol Eol, changed bool) *workLine { + return &workLine{raw: raw, eol: eol, changed: changed, scan: scanTime(raw)} +} + +// eolSlot is the index of eol in editCtx.eols, -1 for none. +func eolSlot(eol Eol) int { + switch eol { + case EolLF: + return 0 + case EolCRLF: + return 1 + case EolCR: + return 2 + } + return -1 +} + +// countHours adds (by = 1) or removes (by = -1) a time from the hour-width counts (R13.9.2). +func (c *editCtx) countHours(s *timeScan, by int) { + if s.style == nil || !s.style.hours { + return + } + if s.style.hourWidth == 1 { + c.oneDigit += by + } else { + c.wideHours += by + } +} + +func (c *editCtx) countEol(eol Eol, by int) { + if k := eolSlot(eol); k >= 0 { + c.eols[k] += by + } +} + +// countLine is a line entering (by = 1) or leaving (by = -1) the text. +func (c *editCtx) countLine(l *workLine, by int) { + c.countHours(&l.scan, by) + c.countEol(l.eol, by) +} + +func (c *editCtx) setEol(l *workLine, eol Eol) { + c.countEol(l.eol, -1) + l.eol = eol + l.changed = true + c.countEol(eol, 1) +} + +func (c *editCtx) setRaw(l *workLine, raw string) { + c.countHours(&l.scan, -1) + l.raw = raw + l.scan = scanTime(raw) + l.changed = true + c.countHours(&l.scan, 1) +} + +func (c *editCtx) warn(code EditWarningCode, line *float64) { + c.warnings = append(c.warnings, rawEditWarning{code: code, edit: c.index, line: line}) +} + +// lineIndex is the 0-based index of an existing 1-based line number. +func (c *editCtx) lineIndex(v jsonValue, present bool) (int, bool) { + n, ok := jsInteger(v, present) + if !ok || n < 1 || n > float64(len(c.lines)) { + return 0, false + } + return int(n) - 1, true +} + +// oneDigitHours is R13.9.2: do the text's times with hours all use one-digit hours (and is +// there at least one)? +func (c *editCtx) oneDigitHours() bool { + return c.oneDigit > 0 && c.wideHours == 0 +} + +// singleLine is a string without a line break. +func singleLine(v jsonValue, present bool) (string, bool) { + if !present || v.kind != jsonString || hasLineBreak(v.str) { + return "", false + } + return v.str, true +} + +// retimed is a line rewritten for a new time. +type retimed struct { + index int + raw string + clamped bool + upgraded bool +} + +// retime is R13.9.2 / R13.9.3: the rewritten line for a new value; false when it cannot be +// written. +func (c *editCtx) retime(index int, value float64, oneDigit bool) (retimed, bool) { + if index < 0 || index >= len(c.lines) { + return retimed{}, false + } + s := &c.lines[index].scan + if s.style == nil || s.time == nil { + return retimed{}, false + } + clamped := value < 0 + if clamped { + value = 0 + } + f, ok := formatTime(value, s.style, oneDigit) + if !ok { + return retimed{}, false + } + p := &s.parts + return retimed{index: index, raw: p.Lead + f.raw + p.Gap + p.Rest, clamped: clamped, upgraded: f.upgraded}, true +} + +func (c *editCtx) commit(changes []retimed) { + for _, ch := range changes { + c.setRaw(c.lines[ch.index], ch.raw) + line := float64(ch.index + 1) + if ch.clamped { + c.warn(EditWarningCodeTimeClamped, &line) + } + if ch.upgraded { + c.warn(EditWarningCodeStyleUpgraded, &line) + } + } +} + +// touched are the lines whose neighbourhood canonical must check after an edit; all means +// every line (sort-by-time). +type touched struct { + all bool + lines []int +} + +func (c *editCtx) setTime(edit jsonValue) (touched, bool) { + index, ok := c.lineIndex(edit.get("line")) + if !ok { + return touched{}, false + } + value, ok := jsFinite(edit.get("seconds")) + if !ok { + return touched{}, false + } + change, ok := c.retime(index, value, c.oneDigitHours()) + if !ok { + return touched{}, false + } + c.commit([]retimed{change}) + return touched{}, true // a timed line is never empty and keeps its eol +} + +func (c *editCtx) shift(edit jsonValue) (touched, bool) { + delta, ok := jsFinite(edit.get("seconds")) + if !ok { + return touched{}, false + } + var targets []int + if list, present := edit.get("lines"); present { + if list.kind != jsonArray { + return touched{}, false + } + for _, v := range list.arr { + i, ok := c.lineIndex(v, true) + if !ok { + return touched{}, false + } + targets = append(targets, i) + } + slices.Sort(targets) + targets = slices.Compact(targets) + } else { + from := 0 + if v, present := edit.get("from"); present { + if from, ok = c.lineIndex(v, true); !ok { + return touched{}, false + } + } + for i := from; i < len(c.lines); i++ { + targets = append(targets, i) + } + } + oneDigit := c.oneDigitHours() + var changes []retimed + for _, i := range targets { + t := c.lines[i].scan.time + if t == nil { + continue + } + change, ok := c.retime(i, t.Seconds+delta, oneDigit) + if !ok { + return touched{}, false + } + changes = append(changes, change) + } + c.commit(changes) + return touched{}, true +} + +// timeBlock is a timed line plus the untimed lines after it. +type timeBlock struct { + seconds float64 + from, to int +} + +// sortByTime is R13.9.4: a stable sort of the blocks. +func (c *editCtx) sortByTime() touched { + first := slices.IndexFunc(c.lines, func(l *workLine) bool { return l.scan.time != nil }) + if first < 0 { + return touched{} + } + var blocks []timeBlock + for i := first; i < len(c.lines); i++ { + if t := c.lines[i].scan.time; t != nil { + blocks = append(blocks, timeBlock{seconds: t.Seconds, from: i, to: i + 1}) + } else if len(blocks) > 0 { + blocks[len(blocks)-1].to = i + 1 + } + } + // Stable: equal times keep their order. + slices.SortStableFunc(blocks, func(x, y timeBlock) int { return cmp.Compare(x.seconds, y.seconds) }) + order := make([]int, 0, len(c.lines)) + for i := 0; i < first; i++ { + order = append(order, i) + } + for _, b := range blocks { + for i := b.from; i < b.to; i++ { + order = append(order, i) + } + } + old := c.lines + lines := make([]*workLine, 0, len(old)) + for slot, src := range order { + if src < 0 || src >= len(old) || slot >= len(old) { + continue + } + l := old[src] + lines = append(lines, &workLine{ + raw: l.raw, + eol: old[slot].eol, // eol values stay in their slots + changed: l.changed || src != slot, + scan: l.scan, + }) + } + c.lines = lines + return touched{all: true} +} + +func (c *editCtx) setRest(edit jsonValue) (touched, bool) { + index, ok := c.lineIndex(edit.get("line")) + if !ok { + return touched{}, false + } + rest, ok := singleLine(edit.get("rest")) + if !ok { + return touched{}, false + } + l := c.lines[index] + p := l.scan.parts + // R13.9 set-rest: a non-empty rest after a time is preceded by whitespace; a gap that does + // not end with R0.2 whitespace ("", "]", ")") gets one space. + gap := []rune(p.Gap) + spaced := len(gap) > 0 && isWhitespace(gap[len(gap)-1]) + space := "" + if p.Time != "" && !spaced && rest != "" { + space = " " + } + c.setRaw(l, p.Lead+p.Time+p.Gap+space+rest) + return touched{lines: []int{index}}, true +} + +// commonEol is R13.9.5: the most common non-empty eol (ties: the one seen first in line order), +// "\n" if none. The counts are kept up to date; only a tie needs a look at the lines. +func (c *editCtx) commonEol() Eol { + best := max(c.eols[0], c.eols[1], c.eols[2]) + if best <= 0 { + return EolLF + } + isTop := func(eol Eol) bool { + k := eolSlot(eol) + return k >= 0 && c.eols[k] == best + } + var top []Eol + for _, e := range []Eol{EolLF, EolCRLF, EolCR} { + if isTop(e) { + top = append(top, e) + } + } + if len(top) == 1 { + return top[0] + } + for _, l := range c.lines { + if isTop(l.eol) { + return l.eol + } + } + return EolLF +} + +func (c *editCtx) insert(edit jsonValue) (touched, bool) { + after, ok := jsInteger(edit.get("after")) + if !ok || after < 0 || after > float64(len(c.lines)) { + return touched{}, false + } + text, ok := singleLine(edit.get("text")) + if !ok { + return touched{}, false + } + pos := int(after) + eol := c.commonEol() + count := len(c.lines) + // R13.9.5: inserting into an empty text keeps it without a trailing newline. + lineEol := eol + if count == 0 { + lineEol = EolNone + } + line := newWorkLine(text, lineEol, true) + if pos == count && count > 0 && c.lines[count-1].eol == EolNone { + c.setEol(c.lines[count-1], eol) + line.eol = EolNone + } + c.countLine(line, 1) + c.lines = slices.Insert(c.lines, pos, line) + return touched{lines: []int{pos}}, true +} + +func (c *editCtx) remove(edit jsonValue) (touched, bool) { + index, ok := c.lineIndex(edit.get("line")) + if !ok { + return touched{}, false + } + gone := c.lines[index] + c.lines = slices.Delete(c.lines, index, index+1) + c.countLine(gone, -1) + count := len(c.lines) + if index == count && count > 0 && c.lines[count-1].eol != gone.eol { + c.setEol(c.lines[count-1], gone.eol) // R13.9.5: the deleted last line's eol moves up + } + return touched{lines: []int{index}}, true +} + +// mergeAt joins a "\r" line followed by an empty "\n" line into one CRLF line, as a re-split +// would read them. +func (c *editCtx) mergeAt(k int) { + if k < 0 || k+1 >= len(c.lines) { + return + } + prev, next := c.lines[k], c.lines[k+1] + if prev.eol != EolCR || next.raw != "" || next.eol != EolLF { + return + } + c.setEol(prev, EolCRLF) + c.lines = slices.Delete(c.lines, k+1, k+2) + c.countLine(next, -1) +} + +// canonical is R13.9.5: keep the work lines equal to what splitLines(join(lines)) would give. +// A "\r" followed by an empty "\n" line reads back as one CRLF, and an empty last line without +// eol is not a line. The lines are canonical before each edit, so only the neighbourhood of +// the lines the edit touched (and the end) is checked; all checks every line. +func (c *editCtx) canonical(t touched) { + count := len(c.lines) + // Descending, so a merge at k never moves a pair still to be checked. + var starts []int + if t.all { + for k := count - 2; k >= 0; k-- { + starts = append(starts, k) + } + } else { + starts = append(starts, count-2) + for _, x := range t.lines { + starts = append(starts, x-1, x) + } + slices.Sort(starts) + starts = slices.Compact(starts) + slices.Reverse(starts) + } + for _, k := range starts { + c.mergeAt(k) + } + if n := len(c.lines); n > 0 { + if last := c.lines[n-1]; last.raw == "" && last.eol == EolNone { + c.lines = c.lines[:n-1] + c.countLine(last, -1) + } + } +} + +// applyOne applies one edit; false when it is invalid (R13.9.6). +func (c *editCtx) applyOne(edit jsonValue) (touched, bool) { + if edit.kind != jsonObject { + return touched{}, false + } + op, _ := edit.getString("op") + switch op { + case "set-time": + return c.setTime(edit) + case "shift": + return c.shift(edit) + case "sort-by-time": + return c.sortByTime(), true + case "set-rest": + return c.setRest(edit) + case "insert": + return c.insert(edit) + case "delete": + return c.remove(edit) + } + return touched{}, false +} + +// invalidLine is R13.9.6: the line of an edit-invalid warning is the edit's integer line, else +// its integer after, else none. +func invalidLine(edit jsonValue) *float64 { + for _, key := range []string{"line", "after"} { + if n, ok := jsInteger(edit.get(key)); ok { + return &n + } + } + return nil +} + +// applyEdits is R13.9 on one (already sanitized) text: apply edits (loose JSON objects) in +// order. Never fails (R13.9.6): an invalid edit changes nothing and warns edit-invalid. +func applyEdits(text string, edits []jsonValue) rawEditResult { + if len(edits) == 0 { + return rawEditResult{text: text, changed: []int{}} + } + c := &editCtx{} + for _, l := range splitLines(text) { + line := newWorkLine(l.raw, l.eol, false) + c.countLine(line, 1) + c.lines = append(c.lines, line) + } + for i, edit := range edits { + c.index = i + before := len(c.warnings) + // Validation fails before any mutation, so the lines need no rollback (R13.9.6). + if t, ok := c.applyOne(edit); ok { + c.canonical(t) + } else { + c.warnings = c.warnings[:before] + c.warn(EditWarningCodeEditInvalid, invalidLine(edit)) + } + } + changed := []int{} + var b strings.Builder + for i, l := range c.lines { + if l.changed { + changed = append(changed, i+1) + } + b.WriteString(l.raw) + b.WriteString(string(l.eol)) + } + return rawEditResult{text: b.String(), changed: changed, warnings: c.warnings} +} diff --git a/go/tl_emphasis.go b/go/tl_emphasis.go new file mode 100644 index 0000000..6d8a585 --- /dev/null +++ b/go/tl_emphasis.go @@ -0,0 +1,137 @@ +package trackparse + +// R13.12: Markdown emphasis markers in a tracklist line. + +// runLength is the length of the maximal run of '*' or '_' at from (0 when there is none). +func runLength(s []rune, from int) int { + ch := at(s, from) + if ch != '*' && ch != '_' { + return 0 + } + j := from + for at(s, j) == ch { + j++ + } + return j - from +} + +// emphasisRun is R13.2.1 / R13.2.3: the length of an emphasis run at from (a maximal run of 1 +// or 2 '*' or '_'), else 0. It is used next to the time, where runs are read by position +// rather than by pairing. +func emphasisRun(s []rune, from int) int { + if n := runLength(s, from); n <= 2 { + return n + } + return 0 +} + +// isEmphasisOuter is the R13.12.2 outer side: the line edge, R0.2 whitespace, a bracket, or a +// '*' / '_' of another run. +func isEmphasisOuter(r rune) bool { + switch r { + case noRune, '[', ']', '(', ')', '*', '_': + return true + } + return isWhitespace(r) +} + +// isEmphasisInner is the R13.12.2 inner side: a character that is not R0.2 whitespace. +func isEmphasisInner(r rune) bool { + return r != noRune && !isWhitespace(r) +} + +// emphasisStack is the stack of a run: one each for '*', '**', '_' and '__'; -1 for longer +// runs and other characters. +func emphasisStack(ch rune, n int) int { + switch { + case ch == '*' && n == 1: + return 0 + case ch == '*' && n == 2: + return 1 + case ch == '_' && n == 1: + return 2 + case ch == '_' && n == 2: + return 3 + } + return -1 +} + +// markRange sets marked[from:from+n], clamped. +func markRange(marked []bool, from, n int) { + for k := from; k < from+n && k < len(marked); k++ { + if k >= 0 { + marked[k] = true + } + } +} + +// withoutMarkers is R13.12: raw[from:] (the line's rest) without its emphasis markers. A run of +// 1 or 2 '*' or '_' closes when the character before it is an inner side and the one after it +// an outer side, and opens the other way round. A closer pairs with the nearest opener of the +// same characters; that opener and every opener after it leave the stack. One stack per run +// ('*', '**', '_', '__') keeps this linear. Runs before from (lead and gap) never pair, except +// that open, a lead run the gap left open (R13.12.4), pairs with a closing run of the same +// character at the end of the line. open is noRune when there is none. +func withoutMarkers(raw []rune, from int, open rune) string { + marked := make([]bool, len(raw)) + var stacks [4][]int + if from < 0 { + from = 0 + } + for i := from; i < len(raw); { + n := runLength(raw, i) + if n < 1 { + n = 1 + } + own := emphasisStack(at(raw, i), n) + prev := before(raw, i) + next := at(raw, i+n) + opener := -1 + if own >= 0 && isEmphasisInner(prev) && isEmphasisOuter(next) { + if st := stacks[own]; len(st) > 0 { + opener = st[len(st)-1] + stacks[own] = st[:len(st)-1] + } + } + if opener >= 0 { + markRange(marked, opener, n) + markRange(marked, i, n) + for s := range stacks { + st := stacks[s] + for len(st) > 0 && st[len(st)-1] > opener { + st = st[:len(st)-1] + } + stacks[s] = st + } + } else if own >= 0 && isEmphasisOuter(prev) && isEmphasisInner(next) { + stacks[own] = append(stacks[own], i) + } + i += n + } + // R13.12.4: the last run of the line, after which there is only R0.2 whitespace. + if open != noRune { + end := len(raw) + for end > from && isWhitespace(before(raw, end)) { + end-- + } + start := end + for start > from && before(raw, start) == open { + start-- + } + if end-start <= 2 && start > from && isEmphasisInner(before(raw, start)) { + for k := start; k < end; k++ { + if marked[k] { + break + } + marked[k] = true + } + } + } + out := make([]rune, 0, len(raw)) + for k := from; k < len(raw); k++ { + if !marked[k] { + out = append(out, raw[k]) + } + } + return string(out) +} diff --git a/go/tl_kinds.go b/go/tl_kinds.go new file mode 100644 index 0000000..56dcc71 --- /dev/null +++ b/go/tl_kinds.go @@ -0,0 +1,173 @@ +package trackparse + +import ( + "strings" + "sync" +) + +// R13.3 line kinds, R13.4.2 candidate lines and the R13.13 layered prefix. + +var ( + tlHeaderWords = sync.OnceValue(func() wordSet { return newWordSet(dataHeaderWordsWords) }) + tlLayeredWords = sync.OnceValue(func() wordSet { return newWordSet(dataLayeredWordsWords) }) + tlMarkerTable = sync.OnceValue(func() *phraseTable[struct{}] { return buildMarkerTable(nil) }) +) + +// buildMarkerTable is data/marker-words.json plus extra. Entries are split into words the same +// way as the track part (R13.3), so shout-out matches the words shout, out. +func buildMarkerTable(extra []string) *phraseTable[struct{}] { + t := newPhraseTable[struct{}]() + for _, list := range [][]string{dataMarkerWordsWords, extra} { + for _, w := range list { + t.add(strings.Join(markerWords(w), " "), struct{}{}) + } + } + return t +} + +// markerTableFor is the marker table with options.markerWords (R13.10); the default table is +// built once. +func markerTableFor(extra []string) *phraseTable[struct{}] { + if len(extra) == 0 { + return tlMarkerTable() + } + return buildMarkerTable(extra) +} + +// isMarkerBreak splits marker words: '/', '-' and R0.2 whitespace. +func isMarkerBreak(r rune) bool { + return r == '/' || r == '-' || isWhitespace(r) +} + +// isMarkerBracket is one of ()[]{}. +func isMarkerBracket(r rune) bool { + switch r { + case '(', ')', '[', ']', '{', '}': + return true + } + return false +} + +// markerWords is R13.3: split on R0.2 whitespace, '/' and '-', then strip leading and trailing +// ()[]{} from each piece; empty pieces are dropped. Word keys (R0.3) apply on matching. +func markerWords(text string) []string { + var out []string + var current []rune + flush := func() { + a, b := 0, len(current) + for a < b && isMarkerBracket(current[a]) { + a++ + } + for b > a && isMarkerBracket(current[b-1]) { + b-- + } + if b > a { + out = append(out, string(current[a:b])) + } + current = current[:0] + } + for _, r := range text { + if isMarkerBreak(r) { + flush() + } else { + current = append(current, r) + } + } + flush() + return out +} + +// layeredPrefix is R13.13: the length (in code points) of a layered prefix at the start of the +// line text: R0.2 whitespace, a word of data/layered-words.json (word key, R0.3), then R0.2 +// whitespace, with more text after it. 0 when there is none. +func layeredPrefix(text []rune) int { + i := skipWhitespace(text, 0) + j := i + for j < len(text) && !isWhitespace(text[j]) { + j++ + } + if j == i || j == len(text) || !inVocab(string(text[i:j]), tlLayeredWords()) { + return 0 + } + j = skipWhitespace(text, j) + if j < len(text) { + return j + } + return 0 +} + +// isBlank is R13.3.1: the line is only R0.2 whitespace. +func isBlank(raw string) bool { + for _, r := range raw { + if !isWhitespace(r) { + return false + } + } + return true +} + +// trimWS trims R0.2 whitespace from both ends. +func trimWS(s string) []rune { + t := []rune(s) + a, b := 0, len(t) + for a < b && isWhitespace(t[a]) { + a++ + } + for b > a && isWhitespace(t[b-1]) { + b-- + } + return t[a:b] +} + +// isLink is R13.3.3: the text starts with http://, https:// or www. (ASCII case-insensitive). +func isLink(rest string) bool { + t := asciiLower(string(sub(trimWS(rest), 0, 8))) + return strings.HasPrefix(t, "http://") || strings.HasPrefix(t, "https://") || + strings.HasPrefix(t, "www.") +} + +// isHeader is R13.3.3: the text ends with ':', or is a header word followed by at most one more +// word. +func isHeader(rest string) bool { + t := trimWS(rest) + if len(t) > 0 && t[len(t)-1] == ':' { + return true + } + words := splitWordsRunes(t) + return len(words) > 0 && len(words) <= 2 && inVocab(words[0], tlHeaderWords()) +} + +// hasMarkerWord is R13.3: any marker word (or multi-word entry) among the track part's marker +// words. +func hasMarkerWord(trackPart string, markers *phraseTable[struct{}]) bool { + words := markerWords(trackPart) + for i := range words { + if _, ok := markers.matchAt(words, i); ok { + return true + } + } + return false +} + +// hasSeparator is R13.3: the track part has a separator. It is not empty after R1 (empty), its +// parse did not warn noSeparator, and the artist side is not empty (at least one primary +// artist, or flags.unknownArtist). +func hasSeparator(t *Track, empty bool) bool { + if empty { + return false + } + for _, w := range t.Warnings { + if w == WarningNoSeparator { + return false + } + } + if t.Flags.UnknownArtist { + return true + } + for _, a := range t.Artists { + if a.Role == RolePrimary { + return true + } + } + return false +} diff --git a/go/tl_options.go b/go/tl_options.go new file mode 100644 index 0000000..17de76f --- /dev/null +++ b/go/tl_options.go @@ -0,0 +1,24 @@ +package trackparse + +import "math" + +// R13.10 tracklist options are resolved in options.go (resolveTracklist, resolveTracklistJSON, +// jsNumber). This file holds the JS number tests the edits (R13.9) apply to loose JSON values. + +// jsInteger is a JS number that Number.isInteger accepts. +func jsInteger(v jsonValue, present bool) (float64, bool) { + n, ok := jsNumber(v, present) + if !ok || math.IsNaN(n) || math.IsInf(n, 0) || n != math.Trunc(n) { + return 0, false + } + return n, true +} + +// jsFinite is a JS number that Number.isFinite accepts. +func jsFinite(v jsonValue, present bool) (float64, bool) { + n, ok := jsNumber(v, present) + if !ok || math.IsNaN(n) || math.IsInf(n, 0) { + return 0, false + } + return n, true +} diff --git a/go/tl_parse.go b/go/tl_parse.go new file mode 100644 index 0000000..4b443c2 --- /dev/null +++ b/go/tl_parse.go @@ -0,0 +1,201 @@ +package trackparse + +// R13.1 to R13.8: parseTracklist (js/src/tracklist/parse.ts). + +// tlRow is one line on its way to an entry. +type tlRow struct { + line tlLine + scan timeScan + // text is the R13.4.1 line text: rest without emphasis markers (R13.12) and without a + // layered prefix (R13.13). + text string + layered bool // R13.13 + blank bool + // candidate is R13.4.2: the line has a time or a spaced dash. + candidate bool + dash bool + probed bool + probe lineProbe + bare *bareCandidate + track *Track + // separated is R13.3: the track part has a separator. + separated bool + // marker is R13.3: the track part has a marker word. + marker bool +} + +// parseTracklist is R13.1 to R13.8 on one (already sanitized) text. +func parseTracklist(text string, o resolvedTracklist) Tracklist { + markers := markerTableFor(o.markerWords) + e := newEngine(o.parse) + + // R13.2 time scan. R13.4.2: a candidate line has a time or a spaced dash in the skeleton R6 + // searches (after R2 and R4); the probe runs R1, R2 and R4 (R13.4.1). + lines := splitLines(text) + rows := make([]tlRow, len(lines)) + candidates, dashes := 0, 0 + for i, line := range lines { + r := &rows[i] + r.line = line + r.scan = scanTime(line.raw) + r.blank = isBlank(line.raw) + scanned := []rune(r.scan.text) + layered := 0 + if !r.blank { + layered = layeredPrefix(scanned) + } + r.text = string(tail(scanned, layered)) + r.layered = layered > 0 + if r.blank { + continue + } + r.probe = e.probe(r.text) // R13.4.1 + r.probed = true + r.dash = r.probe.spacedDash + r.candidate = r.scan.time != nil || r.dash + // R13.5 / R13.13.3: a layered line never has a bare position. + if !r.layered { + r.bare = findBareCandidate(r.text, r.probe.position) + } + if r.candidate { + candidates++ + if r.dash { + dashes++ + } + } + } + listContext := candidates > 0 && 2*dashes >= candidates + + // R13.5: confirmed bare positions are removed before parsing. R13.4.1: one parse per line. + // R13.13.3: layered lines are not neighbours for the R13.5 search. + bareNumbers := make([]int, len(rows)) + candidateLines := make([]bool, len(rows)) + for i := range rows { + bareNumbers[i] = -1 + if rows[i].bare != nil { + bareNumbers[i] = rows[i].bare.number + } + candidateLines[i] = rows[i].candidate && !rows[i].layered + } + confirmed := confirmPositions(bareNumbers, candidateLines) + for i := range rows { + r := &rows[i] + if !r.probed { + continue + } + var bare *bareCandidate + if flagAt(confirmed, i) { + bare = r.bare + } + // The probe already ran R1, R2 and R4; finish completes the parse from it. A line that + // loses a bare position is probed again on the stripped text, so each probe is finished + // exactly once. + input, probe := r.text, &r.probe + if bare != nil { + input = bare.stripped + stripped := e.probe(input) + probe = &stripped + } + r.marker = hasMarkerWord(input, markers) + // R13.4.2: the R6.10 tight dash only on timed lines without a marker word. + track := probe.finish(listContext && r.scan.time != nil && !r.marker) + if bare != nil { + track.Position = &Position{Raw: bare.raw, Number: bare.number} + } + r.separated = hasSeparator(&track, probe.empty) + r.track = &track + } + + // R13.3 + entries := make([]Entry, len(rows)) + positions := make([]int, len(rows)) + invalid := make([]bool, len(rows)) + unparsed := make([]bool, len(rows)) + for i := range rows { + r := &rows[i] + kind := kindOf(r) + var track *Track + if kind == EntryKindTrack || kind == EntryKindMarker { + track = r.track + } + positions[i] = -1 + if track != nil && track.Position != nil { + positions[i] = track.Position.Number + } + invalid[i] = r.scan.invalid + // R13.7 line-unparsed: a track entry whose track part has no separator (R13.3). + unparsed[i] = kind == EntryKindTrack && !r.separated + entries[i] = Entry{ + Line: i + 1, + Kind: kind, + Eol: r.line.eol, + Raw: r.line.raw, + Parts: r.scan.parts, + Time: r.scan.time, + Track: track, + Layered: r.layered, + } + } + + warnings := tracklistWarnings(&warningInput{ + entries: entries, + positions: positions, + invalid: invalid, + unparsed: unparsed, + audioSeconds: o.audioSeconds, + }) + return Tracklist{ + SpecVersion: SpecVersion, + Entries: entries, + Warnings: warnings, + Stats: statsOf(entries), + } +} + +// kindOf is R13.3. +func kindOf(r *tlRow) EntryKind { + if r.blank || r.track == nil { + return EntryKindBlank + } + marker := !r.separated && r.marker + switch { + case r.scan.time != nil: + if marker { + return EntryKindMarker + } + return EntryKindTrack + case isLink(r.text): + return EntryKindLink + case isHeader(r.text): + return EntryKindHeader + case marker: + return EntryKindMarker + case r.separated: + return EntryKindTrack + } + return EntryKindNote +} + +// statsOf counts the entries. +func statsOf(entries []Entry) Stats { + s := Stats{Lines: len(entries)} + for i := range entries { + e := &entries[i] + switch e.Kind { + case EntryKindTrack: + s.Tracks++ + case EntryKindMarker: + s.Markers++ + } + if e.Time != nil { + s.Timed++ + seconds := e.Time.Seconds + if s.FirstTime == nil { + first := seconds + s.FirstTime = &first + } + s.LastTime = &seconds + } + } + return s +} diff --git a/go/tl_positions.go b/go/tl_positions.go new file mode 100644 index 0000000..d34d898 --- /dev/null +++ b/go/tl_positions.go @@ -0,0 +1,74 @@ +package trackparse + +// R13.5: bare positions. + +// bareCandidate is a leading number that may be a position. +type bareCandidate struct { + raw string + number int + // stripped is the track part with the digits and the following space removed. + stripped string +} + +// findBareCandidate is R13.5: a track part starting with 1 to 3 ASCII digits and a space +// (U+0020 only), where R4.2 took no position (positionTaken), is a bare candidate. The +// remainder must not be empty or only R0.2 whitespace. +func findBareCandidate(rest string, positionTaken bool) *bareCandidate { + if positionTaken { + return nil + } + t := []rune(rest) + n := digitRun(t, 0) + if n < 1 || n > 3 || at(t, n) != ' ' { + return nil + } + stripped := tail(t, n+1) + blank := true + for _, r := range stripped { + if !isWhitespace(r) { + blank = false + break + } + } + if blank { + return nil + } + digits := sub(t, 0, n) + return &bareCandidate{raw: string(digits), number: digitsValue(digits), stripped: string(stripped)} +} + +// confirmPositions is R13.5: candidate i is a position when the nearest preceding or the +// nearest following candidate line (R13.4.2, candidateLine) also has a bare candidate equal to +// N - 1 or N + 1. bare holds each line's bare number, or -1 for none. Linear time. +func confirmPositions(bare []int, candidateLine []bool) []bool { + n := len(bare) + isCandidate := func(i int) bool { return i >= 0 && i < len(candidateLine) && candidateLine[i] } + prev := make([]int, n) + next := make([]int, n) + last := -1 + for i := 0; i < n; i++ { + prev[i] = last + if isCandidate(i) { + last = i + } + } + last = -1 + for i := n - 1; i >= 0; i-- { + next[i] = last + if isCandidate(i) { + last = i + } + } + adjacent := func(b, j int) bool { + if j < 0 || j >= n || bare[j] < 0 { + return false + } + o := bare[j] + return o+1 == b || o == b+1 + } + out := make([]bool, n) + for i, b := range bare { + out[i] = b >= 0 && (adjacent(b, prev[i]) || adjacent(b, next[i])) + } + return out +} diff --git a/go/tl_split.go b/go/tl_split.go new file mode 100644 index 0000000..f760e94 --- /dev/null +++ b/go/tl_split.go @@ -0,0 +1,48 @@ +package trackparse + +// R13.1: the line split (LF, CRLF and CR only) with the lossless guarantee. + +// tlLine is one line of a tracklist text: the line without its terminator, and the terminator. +type tlLine struct { + raw string + eol Eol +} + +// splitLines is R13.1.1: split at LF, CRLF and CR. U+2028, U+2029, U+0085 and the other R0.2 +// characters are not line breaks. A trailing empty segment after the final terminator is not a +// line, and "" has no lines. R13.1.2: the lines' raw + eol, joined, are the text. +func splitLines(text string) []tlLine { + var lines []tlLine + start := 0 + // LF and CR are ASCII and never part of a multi-byte sequence, so every cut is at a + // character boundary. + for i := 0; i < len(text); i++ { + switch text[i] { + case '\n': + lines = append(lines, tlLine{raw: text[start:i], eol: EolLF}) + start = i + 1 + case '\r': + if i+1 < len(text) && text[i+1] == '\n' { + lines = append(lines, tlLine{raw: text[start:i], eol: EolCRLF}) + i++ + } else { + lines = append(lines, tlLine{raw: text[start:i], eol: EolCR}) + } + start = i + 1 + } + } + if start < len(text) { + lines = append(lines, tlLine{raw: text[start:], eol: EolNone}) + } + return lines +} + +// hasLineBreak reports a line break inside a single-line value (R13.9.5, R13.9.6). +func hasLineBreak(s string) bool { + for i := 0; i < len(s); i++ { + if s[i] == '\n' || s[i] == '\r' { + return true + } + } + return false +} diff --git a/go/tl_times.go b/go/tl_times.go new file mode 100644 index 0000000..449eee7 --- /dev/null +++ b/go/tl_times.go @@ -0,0 +1,379 @@ +package trackparse + +import ( + "math" + "strconv" + "strings" +) + +// R13.2: the tracklist time scanner (separate from R4.1), and R13.9.2 time formatting. + +// maxSafeInteger is JS Number.MAX_SAFE_INTEGER. +const maxSafeInteger = 9007199254740991.0 + +// timeStyle is the written shape of a time, kept by edits (R13.9.2). +type timeStyle struct { + hours bool + // hourWidth is the number of digits written for the hours (minimum width), 0 without hours. + hourWidth int + // minuteWidth is the number of digits written for the minutes (minimum width). + minuteWidth int + // longMinutes is R13.9.2: a two-part time already at 60 minutes or more; it stays two-part + // when it grows. + longMinutes bool + // fracSep is '.' or ',' when the time has a fraction, else noRune. + fracSep rune + fracDigits int +} + +// timeScan is what R13.2 finds at the start of a line. +type timeScan struct { + parts Parts + time *TracklistTime + style *timeStyle + // invalid is R13.2.4: a digits:digits shape after the lead that fails R13.2.2. + invalid bool + // text is R13.12: rest without its paired emphasis markers (the line text, before R13.13 + // and R13.5). + text string +} + +// isGapSeparator is an R13.2.3 separator after the time. +func isGapSeparator(r rune) bool { + switch r { + case '-', '–', '—', '|', '.', ':': + return true + } + return false +} + +// skipWhitespace is the index past the R0.2 whitespace at from. +func skipWhitespace(s []rune, from int) int { + i := from + for isWhitespace(at(s, i)) { + i++ + } + return i +} + +// isBullet is an R13.2.1 bullet (before a time, or alone on a line without one). +func isBullet(r rune) bool { + switch r { + case '-', '–', '—', '*', '•': + return true + } + return false +} + +// untimed is R13.1.3 / R13.2.1: a line without a time. lead holds an optional bullet: R0.2 +// whitespace, one of - – — * •, then at least one R0.2 whitespace (all of it); rest is the +// remainder. +func untimed(raw []rune, invalid bool) timeScan { + start := skipWhitespace(raw, 0) + lead := 0 + if isBullet(at(raw, start)) && isWhitespace(at(raw, start+1)) { + lead = skipWhitespace(raw, start+1) + } + return timeScan{ + parts: Parts{Lead: string(sub(raw, 0, lead)), Rest: string(tail(raw, lead))}, + invalid: invalid, + text: withoutMarkers(raw, lead, noRune), + } +} + +// closingRun is R13.2.3: the index past a closing run for an opening run of open (the same +// character, 1 or 2 long), or from when there is none. +func closingRun(raw []rune, from int, open rune) int { + if open != noRune && at(raw, from) == open { + return from + emphasisRun(raw, from) + } + return from +} + +// secondsOf is whole.frac read as one decimal literal, so every port gets the same double (JS +// Number(), correctly rounded). +func secondsOf(whole int, frac string) float64 { + if frac == "" { + return float64(whole) + } + v, err := strconv.ParseFloat(strconv.Itoa(whole)+"."+frac, 64) + if err != nil { + return float64(whole) + } + return v +} + +// timeShape is a digits(:digits)+ run: the digit runs between the colons (2 or more) and the +// index past it. +type timeShape struct { + parts [][]rune + end int +} + +// shapeAt is R13.2.4: the maximal digits(:digits)+ run at from. +func shapeAt(s []rune, from int) (timeShape, bool) { + na := digitRun(s, from) + if na == 0 || at(s, from+na) != ':' || !isDigit(at(s, from+na+1)) { + return timeShape{}, false + } + parts := [][]rune{sub(s, from, from+na)} + end := from + na + for at(s, end) == ':' && isDigit(at(s, end+1)) { + n := digitRun(s, end+1) + parts = append(parts, sub(s, end+1, end+1+n)) + end += 1 + n + } + return timeShape{parts: parts, end: end}, true +} + +// shapeSeconds is the R13.2.2 validity test: the whole seconds of A:B or A:B:C (no other part +// count). +func shapeSeconds(parts [][]rune) (int, bool) { + switch len(parts) { + case 3: + a, b, c := parts[0], parts[1], parts[2] + if len(a) == 0 || len(a) > 2 || len(b) != 2 || len(c) != 2 { + return 0, false + } + m, sec := digitsValue(b), digitsValue(c) + if m > 59 || sec > 59 { + return 0, false + } + return digitsValue(a)*3600 + m*60 + sec, true + case 2: + a, b := parts[0], parts[1] + if len(a) == 0 || len(a) > 3 || len(b) != 2 { + return 0, false + } + sec := digitsValue(b) + if sec > 59 { + return 0, false + } + return digitsValue(a)*60 + sec, true + } + return 0, false +} + +// startsWithAt reports whether s has word at from. +func startsWithAt(s []rune, from int, word string) bool { + w := []rune(word) + got := sub(s, from, from+len(w)) + if len(got) != len(w) { + return false + } + for k := range w { + if got[k] != w[k] { + return false + } + } + return true +} + +// scanTime is R13.2: the lead, time and gap at the start of a line; the rest is everything +// after. +func scanTime(line string) timeScan { + raw := []rune(line) + // R13.2.1 lead: whitespace, an optional bullet, an optional emphasis run, an optional '[' or + // '(', then (after a bracket) another optional emphasis run. A run counts only when the + // next character is a bracket (first run) or a digit. + i := skipWhitespace(raw, 0) + if isBullet(at(raw, i)) && isWhitespace(at(raw, i+1)) { + i = skipWhitespace(raw, i+1) + } + outerOpen := noRune + n := emphasisRun(raw, i) + if next := at(raw, i+n); n > 0 && (next == '[' || next == '(' || isDigit(next)) { + outerOpen = at(raw, i) + i += n + } + closer := noRune + switch at(raw, i) { + case '[': + closer = ']' + case '(': + closer = ')' + } + innerOpen := noRune + if closer != noRune { + i++ + n = emphasisRun(raw, i) + if n > 0 && isDigit(at(raw, i+n)) { + innerOpen = at(raw, i) + i += n + } + } + leadEnd := i + + // R13.2.2 time + shape, ok := shapeAt(raw, i) + if !ok { + return untimed(raw, false) + } + whole, ok := shapeSeconds(shape.parts) + if !ok { + return untimed(raw, true) // R13.2.4 + } + j := shape.end + fracSep := noRune + frac := "" + if sep := at(raw, j); sep == '.' || sep == ',' { + if n := digitRun(raw, j+1); n >= 1 && n <= 3 { + fracSep = sep + frac = string(sub(raw, j+1, j+1+n)) + j += 1 + n + } + } + timeEnd := j + + // R13.2.3 gap: closing runs for the lead's runs (the same character), around the closing + // bracket. + followsTime := func(k int) bool { + return k >= len(raw) || isWhitespace(at(raw, k)) || isGapSeparator(at(raw, k)) + } + // R13.12.4: a lead run the gap leaves open may pair with a run at the end of the line. + open := noRune + if closer != noRune { + k := closingRun(raw, j, innerOpen) + if k == j { + open = innerOpen + } + j = k + if at(raw, j) != closer { + return untimed(raw, false) + } + j++ + k = closingRun(raw, j, outerOpen) + if k > j && followsTime(k) { + j = k + } else if outerOpen != noRune { + open = outerOpen + } + } else { + k := closingRun(raw, j, outerOpen) + if k == j { + open = outerOpen + } + j = k + if !followsTime(j) { + return untimed(raw, false) + } + } + j = skipWhitespace(raw, j) + if isGapSeparator(at(raw, j)) { + j = skipWhitespace(raw, j+1) + } + if startsWithAt(raw, j, "==>") { + j = skipWhitespace(raw, j+3) + } else if startsWithAt(raw, j, "=>") { + j = skipWhitespace(raw, j+2) + } + + timeRaw := string(sub(raw, leadEnd, timeEnd)) + hours := len(shape.parts) == 3 + var first, second []rune + if len(shape.parts) > 0 { + first = shape.parts[0] + } + if len(shape.parts) > 1 { + second = shape.parts[1] + } + // R13.9.2 long-minute style: two parts with 60 minutes or more. + longMinutes := !hours && digitsValue(first) >= 60 + style := timeStyle{hours: hours, longMinutes: longMinutes, fracSep: fracSep, fracDigits: len([]rune(frac))} + switch { + case hours: + style.hourWidth = len(first) + style.minuteWidth = len(second) + case longMinutes: + // R13.9.2: a long-minute time's minimum minute width is min(width, 2), so it never + // keeps 3 minute digits once it is short again (125:30 minus 7000 s gives 08:50). + style.minuteWidth = min(len(first), 2) + default: + style.minuteWidth = len(first) + } + return timeScan{ + parts: Parts{ + Lead: string(sub(raw, 0, leadEnd)), + Time: timeRaw, + Gap: string(sub(raw, timeEnd, j)), + Rest: string(tail(raw, j)), + }, + time: &TracklistTime{Raw: timeRaw, Seconds: secondsOf(whole, frac)}, + style: &style, + text: withoutMarkers(raw, j, open), + } +} + +// pad writes n with at least width digits. +func pad(n int64, width int) string { + s := strconv.FormatInt(n, 10) + if len(s) >= width { + return s + } + return strings.Repeat("0", width-len(s)) + s +} + +// formattedTime is a time written by formatTime. +type formattedTime struct { + raw string + upgraded bool +} + +// formatTime is R13.9.2: seconds (finite, not negative) written in style. Values are rounded +// half up to the fraction precision (floor(v * 10^d + 0.5), never math.Round). A value of an +// hour or more without hours is upgraded to HH:MM:SS (H:MM:SS when oneDigitHours), except in +// long-minute style. false when the value cannot be written as a valid R13.2.2 time (100 hours +// or more, more than 999 long-style minutes). +func formatTime(seconds float64, style *timeStyle, oneDigitHours bool) (formattedTime, bool) { + scale := 1000.0 + switch style.fracDigits { + case 0: + scale = 1 + case 1: + scale = 10 + case 2: + scale = 100 + } + // The same double arithmetic as the JS reference; integers only after the range check. + units := math.Floor(seconds*scale + 0.5) + if math.IsNaN(units) || math.IsInf(units, 0) || math.Abs(units) > maxSafeInteger || units < 0 { + return formattedTime{}, false + } + wholeF := math.Floor(units / scale) + fracUnits := int64(units - wholeF*scale) + // The written time must stay valid under R13.2.2 (hours are 1 or 2 digits). + if wholeF >= 100*3600 { + return formattedTime{}, false + } + whole := int64(wholeF) + frac := "" + if style.fracSep != noRune && style.fracDigits > 0 { + frac = string(style.fracSep) + pad(fracUnits, style.fracDigits) + } + sec := whole % 60 + if style.hours { + h, m := whole/3600, (whole%3600)/60 + return formattedTime{ + raw: pad(h, style.hourWidth) + ":" + pad(m, style.minuteWidth) + ":" + pad(sec, 2) + frac, + }, true + } + if style.longMinutes { + m := whole / 60 + if m > 999 { + return formattedTime{}, false // R13.2.2: two-part minutes are 1 to 3 digits + } + return formattedTime{raw: pad(m, style.minuteWidth) + ":" + pad(sec, 2) + frac}, true + } + if whole >= 3600 { + h, m := whole/3600, (whole%3600)/60 + width := 2 + if oneDigitHours { + width = 1 + } + return formattedTime{ + raw: pad(h, width) + ":" + pad(m, 2) + ":" + pad(sec, 2) + frac, + upgraded: true, + }, true + } + return formattedTime{raw: pad(whole/60, style.minuteWidth) + ":" + pad(sec, 2) + frac}, true +} diff --git a/go/tl_warnings.go b/go/tl_warnings.go new file mode 100644 index 0000000..2ff5b2f --- /dev/null +++ b/go/tl_warnings.go @@ -0,0 +1,342 @@ +package trackparse + +import "slices" + +// R13.7: tracklist warnings and the time-out-of-order suggestion search. + +// warningInput is what tracklistWarnings reads, one slot per entry. +type warningInput struct { + entries []Entry + // positions is the R4.2 / R13.5 position number of each entry's track, or -1. + positions []int + // invalid is R13.2.4 per entry. + invalid []bool + // unparsed is R13.7 line-unparsed per entry: a track entry whose track part has no + // separator (R13.3). + unparsed []bool + // audioSeconds is nil when unknown. + audioSeconds *float64 +} + +// digitSlot is one digit of a time that the search may change. +type digitSlot struct { + // at is the index of the digit in the raw time. + at int + field int + place int64 + digit int64 +} + +// digitChange is one digit change: the slot and its new digit. +type digitChange struct { + slot digitSlot + digit int64 +} + +// searchOutcome is the result of one line's digit search: no candidate, exactly one, or +// several. +type searchOutcome uint8 + +const ( + searchNone searchOutcome = iota + searchOne + searchMany +) + +// timeDigits is a raw time taken apart for the search. +type timeDigits struct { + raw []rune + frac string + values []int64 + lo, hi *float64 +} + +// valueWith is the value with changes applied, when it is a valid time inside the bounds. +func (d *timeDigits) valueWith(changes []digitChange) (float64, bool) { + // A time has at most three fields; the copy stays on the stack (the search calls this up to + // about 1,800 times per line). + var buf [4]int64 + v := append(buf[:0], d.values...) + for _, c := range changes { + if c.slot.field >= 0 && c.slot.field < len(v) { + v[c.slot.field] += (c.digit - c.slot.digit) * c.slot.place + } + } + mult := [3]int64{60, 1, 0} + if len(v) == 3 { + mult = [3]int64{3600, 60, 1} + } + var whole int64 + for f, value := range v { + if f > 0 && value > 59 { + return 0, false + } + m := int64(0) + if f < len(mult) { + m = mult[f] + } + whole += value * m + } + if whole < 0 || whole > 1<<32-1 { + return 0, false + } + t := secondsOf(int(whole), d.frac) + if (d.lo == nil || *d.lo < t) && (d.hi == nil || t < *d.hi) { + return t, true + } + return 0, false +} + +// render is the raw time with changes applied. +func (d *timeDigits) render(changes []digitChange) string { + out := slices.Clone(d.raw) + for _, c := range changes { + if c.slot.at >= 0 && c.slot.at < len(out) && c.digit >= 0 && c.digit <= 9 { + out[c.slot.at] = rune('0' + c.digit) + } + } + return string(out) +} + +// searchTime is the R13.7 suggestion search on one raw time: change 1, then 2 digits (fraction +// digits excluded); keep the candidates that are valid times (R13.2.2: fields after the first +// at most 59) with lo < t (when lo exists) and t < hi (when hi exists). Only the smallest number +// of changes with any candidate counts. Bounded and arithmetic: at most 7 digits, 9 * 7 + +// 81 * 21 candidates. +func searchTime(rawTime string, lo, hi *float64) (searchOutcome, TracklistTime) { + raw := []rune(rawTime) + fracStart := len(raw) + for i, r := range raw { + if r == '.' || r == ',' { + fracStart = i + break + } + } + frac := string(tail(raw, fracStart+1)) + values := []int64{0} + var slots []digitSlot + for i := 0; i < fracStart; i++ { + ch := raw[i] + if ch == ':' { + values = append(values, 0) + } else if isDigit(ch) { + d := int64(ch - '0') + f := len(values) - 1 + values[f] = values[f]*10 + d + slots = append(slots, digitSlot{at: i, field: f, digit: d}) + } + } + // The place value of each digit inside its field. + place := int64(1) + field := -1 + for k := len(slots) - 1; k >= 0; k-- { + if slots[k].field != field { + field = slots[k].field + place = 1 + } + slots[k].place = place + place *= 10 + } + digits := timeDigits{raw: raw, frac: frac, values: values, lo: lo, hi: hi} + + var found []digitChange + count := 0 + for _, slot := range slots { + for d := int64(0); d <= 9; d++ { + if d == slot.digit { + continue + } + change := [1]digitChange{{slot, d}} + if _, ok := digits.valueWith(change[:]); ok { + count++ + found = slices.Clone(change[:]) + } + } + } + if count == 0 { + pairs: + for x, a := range slots { + for _, b := range slots[x+1:] { + for da := int64(0); da <= 9; da++ { + if da == a.digit { + continue + } + for db := int64(0); db <= 9; db++ { + if db == b.digit { + continue + } + change := [2]digitChange{{a, da}, {b, db}} + if _, ok := digits.valueWith(change[:]); ok { + count++ + found = slices.Clone(change[:]) + if count >= 2 { + break pairs + } + } + } + } + } + } + } + switch { + case found != nil && count == 1: + seconds, ok := digits.valueWith(found) + if !ok { + return searchNone, TracklistTime{} + } + return searchOne, TracklistTime{Raw: digits.render(found), Seconds: seconds} + case found != nil && count > 1: + return searchMany, TracklistTime{} + } + return searchNone, TracklistTime{} +} + +// timedEntry is a timed entry: its line number and time. +type timedEntry struct { + line int + time *TracklistTime +} + +// suggestFix is the R13.7 suggestion for the out-of-order timed entry k (an index into times): +// search its own time between its neighbours first; only when that finds no candidate at all, +// search the previous timed entry's time between the one before it and entry k. +func suggestFix(times []timedEntry, k int) *Suggestion { + if k < 1 || k >= len(times) { + return nil + } + cur, prev := times[k], times[k-1] + var next *float64 + if k+1 < len(times) { + next = ×[k+1].time.Seconds + } + switch outcome, t := searchTime(cur.time.Raw, &prev.time.Seconds, next); outcome { + case searchOne: + return &Suggestion{Line: cur.line, Raw: t.Raw, Seconds: t.Seconds} + case searchMany: + return nil + } + var lo *float64 + if k >= 2 { + lo = ×[k-2].time.Seconds + } + if outcome, t := searchTime(prev.time.Raw, lo, &cur.time.Seconds); outcome == searchOne { + return &Suggestion{Line: prev.line, Raw: t.Raw, Seconds: t.Seconds} + } + return nil +} + +// warningRank is the table order of R13.7; the warnings of one line are emitted in this order. +// It is a switch, not a lookup in AllWarningCodes, so no caller can change the order. +func warningRank(code WarningCode) int { + switch code { + case WarningCodeTimeMissing: + return 0 + case WarningCodeTimeOutOfOrder: + return 1 + case WarningCodeTimeDuplicate: + return 2 + case WarningCodeNoStartAtZero: + return 3 + case WarningCodeTimeAfterAudioEnd: + return 4 + case WarningCodeInvalidTime: + return 5 + case WarningCodePositionGap: + return 6 + case WarningCodePositionDuplicate: + return 7 + case WarningCodeLineUnparsed: + return 8 + } + return 9 +} + +// flagAt is list[i], false out of range. +func flagAt(list []bool, i int) bool { + return i >= 0 && i < len(list) && list[i] +} + +// tracklistWarnings is R13.7. +func tracklistWarnings(in *warningInput) []TracklistWarning { + entries := in.entries + perLine := make([][]TracklistWarning, len(entries)) + add := func(i int, code WarningCode, suggestion *Suggestion) { + if i < 0 || i >= len(entries) { + return + } + severity := SeverityWarning + if code == WarningCodeNoStartAtZero { + severity = SeverityInfo + } + perLine[i] = append(perLine[i], TracklistWarning{ + Code: code, Line: entries[i].Line, Severity: severity, Suggestion: suggestion, + }) + } + + var timedIdx []int + var times []timedEntry + for i := range entries { + if t := entries[i].Time; t != nil { + timedIdx = append(timedIdx, i) + times = append(times, timedEntry{line: entries[i].Line, time: t}) + } + } + + for i := range entries { + e := &entries[i] + // R13.13.3: an untimed layered line plays over the previous track, at its time. + if e.Kind == EntryKindTrack && e.Time == nil && !e.Layered && len(times) > 0 { + add(i, WarningCodeTimeMissing, nil) + } + if flagAt(in.invalid, i) { + add(i, WarningCodeInvalidTime, nil) + } + if flagAt(in.unparsed, i) { + add(i, WarningCodeLineUnparsed, nil) + } + } + + var prev *float64 + for k, i := range timedIdx { + t := times[k].time.Seconds + switch { + case prev == nil: + if t != 0 { + add(i, WarningCodeNoStartAtZero, nil) + } + case t < *prev: + add(i, WarningCodeTimeOutOfOrder, suggestFix(times, k)) + case t == *prev: + add(i, WarningCodeTimeDuplicate, nil) + } + if in.audioSeconds != nil && t > *in.audioSeconds { + add(i, WarningCodeTimeAfterAudioEnd, nil) + } + prev = ×[k].time.Seconds + } + + prevPos := -1 + for i := range entries { + if entries[i].Kind != EntryKindTrack || i >= len(in.positions) || in.positions[i] < 0 { + continue + } + pos := in.positions[i] + if prevPos >= 0 { + if pos == prevPos { + add(i, WarningCodePositionDuplicate, nil) + } else if prevPos+1 != pos { + add(i, WarningCodePositionGap, nil) + } + } + prevPos = pos + } + + out := []TracklistWarning{} + for _, ws := range perLine { + slices.SortStableFunc(ws, func(a, b TracklistWarning) int { + return warningRank(a.Code) - warningRank(b.Code) + }) + out = append(out, ws...) + } + return out +} diff --git a/go/tracklist_test.go b/go/tracklist_test.go new file mode 100644 index 0000000..856f094 --- /dev/null +++ b/go/tracklist_test.go @@ -0,0 +1,623 @@ +package trackparse + +import ( + "fmt" + "math" + "math/rand" + "strings" + "testing" +) + +// Unit tests for the tracklist modules (R13) that do not need the single-track pipeline: +// split, the time scanner and time formatting, emphasis, positions, warnings and the +// suggestion search, and edits. Expected values are the JS reference's output. + +func TestSplitLines(t *testing.T) { + cases := []struct { + text string + want []tlLine + }{ + {"", nil}, + {"\n", []tlLine{{"", EolLF}}}, + {"a", []tlLine{{"a", EolNone}}}, + {"a\nb", []tlLine{{"a", EolLF}, {"b", EolNone}}}, + {"a\r\nb\r\n", []tlLine{{"a", EolCRLF}, {"b", EolCRLF}}}, + {"a\rb\r", []tlLine{{"a", EolCR}, {"b", EolCR}}}, + {"a\r\r\nb\n\n", []tlLine{{"a", EolCR}, {"", EolCRLF}, {"b", EolLF}, {"", EolLF}}}, + {"\n\r", []tlLine{{"", EolLF}, {"", EolCR}}}, + // R0.2 whitespace that is not a line break. + {"a\u2028b\u2029c\u0085d\v\fe", []tlLine{{"a\u2028b\u2029c\u0085d\v\fe", EolNone}}}, + {"é\n🎵\r\n", []tlLine{{"é", EolLF}, {"🎵", EolCRLF}}}, + } + for _, c := range cases { + got := splitLines(c.text) + if fmt.Sprint(got) != fmt.Sprint(c.want) { + t.Errorf("splitLines(%q) = %q, want %q", c.text, got, c.want) + } + // R13.1.2: lossless. + var b strings.Builder + for _, l := range got { + b.WriteString(l.raw + string(l.eol)) + } + if b.String() != c.text { + t.Errorf("splitLines(%q) joins to %q", c.text, b.String()) + } + } + if !hasLineBreak("a\rb") || !hasLineBreak("a\n") || hasLineBreak("a\u2028b\u0085") { + t.Error("hasLineBreak") + } +} + +func TestScanTime(t *testing.T) { + type want struct { + lead, time, gap, rest string + seconds float64 // -1: no time + invalid bool + text string + } + cases := []struct { + line string + want want + }{ + {"00:00 Noisia - Stigma", want{"", "00:00", " ", "Noisia - Stigma", 0, false, "Noisia - Stigma"}}, + {"[03:45] Phace - Desert", want{"[", "03:45", "] ", "Phace - Desert", 225, false, "Phace - Desert"}}, + {"(1:02:03) A - B", want{"(", "1:02:03", ") ", "A - B", 3723, false, "A - B"}}, + {" - 52:47 - A - B", want{" - ", "52:47", " - ", "A - B", 3167, false, "A - B"}}, + {"125:30 A", want{"", "125:30", " ", "A", 7530, false, "A"}}, + {"00:00.5 A", want{"", "00:00.5", " ", "A", 0.5, false, "A"}}, + {"12:34,250 x", want{"", "12:34,250", " ", "x", 754.25, false, "x"}}, + // Four fraction digits are not a fraction: "." is the gap. + {"12:34.5678 x", want{"", "12:34", ".", "5678 x", 754, false, "5678 x"}}, + {"01:02:03.250 A", want{"", "01:02:03.250", " ", "A", 3723.25, false, "A"}}, + {"1:75 x - y", want{"", "", "", "1:75 x - y", -1, true, "1:75 x - y"}}, + {"1:2:3:4 x", want{"", "", "", "1:2:3:4 x", -1, true, "1:2:3:4 x"}}, + {"100:00:00 x", want{"", "", "", "100:00:00 x", -1, true, "100:00:00 x"}}, + {"1000:00 x", want{"", "", "", "1000:00 x", -1, true, "1000:00 x"}}, + {"00:00x", want{"", "", "", "00:00x", -1, false, "00:00x"}}, + {"00:00", want{"", "00:00", "", "", 0, false, ""}}, + {"00:00 => A", want{"", "00:00", " => ", "A", 0, false, "A"}}, + {"00:00 ==> A", want{"", "00:00", " ==> ", "A", 0, false, "A"}}, + {"00:00 | A", want{"", "00:00", " | ", "A", 0, false, "A"}}, + {"**00:00** *Noisia* - Stigma", want{"**", "00:00", "** ", "*Noisia* - Stigma", 0, false, "Noisia - Stigma"}}, + {"**[00:00]** A", want{"**[", "00:00", "]** ", "A", 0, false, "A"}}, + {"[**00:00**] A", want{"[**", "00:00", "**] ", "A", 0, false, "A"}}, + // R13.12.4: a lead run the gap leaves open pairs with a run at the end of the line. + {"**00:00 A - B**", want{"**", "00:00", " ", "A - B**", 0, false, "A - B"}}, + {"- untimed line", want{"- ", "", "", "untimed line", -1, false, "untimed line"}}, + {"-not a bullet", want{"", "", "", "-not a bullet", -1, false, "-not a bullet"}}, + {"\u3000• 01:30\u00a0X", want{"\u3000• ", "01:30", "\u00a0", "X", 90, false, "X"}}, + {"[00:00 A", want{"", "", "", "[00:00 A", -1, false, "[00:00 A"}}, + } + for _, c := range cases { + s := scanTime(c.line) + p := s.parts + got := want{p.Lead, p.Time, p.Gap, p.Rest, -1, s.invalid, s.text} + if s.time != nil { + got.seconds = s.time.Seconds + if s.time.Raw != p.Time { + t.Errorf("%q: time raw %q, parts.time %q", c.line, s.time.Raw, p.Time) + } + } + if got != c.want { + t.Errorf("scanTime(%q) =\n %+v, want\n %+v", c.line, got, c.want) + } + if p.Lead+p.Time+p.Gap+p.Rest != c.line { + t.Errorf("scanTime(%q): parts are not lossless", c.line) + } + } +} + +func TestSecondsOf(t *testing.T) { + // One decimal literal, correctly rounded (JS Number()). + if secondsOf(754, "25") != 754.25 || secondsOf(1, "005") != 1.005 || secondsOf(3167, "") != 3167 { + t.Error("secondsOf") + } +} + +func styleOf(t *testing.T, raw string) *timeStyle { + t.Helper() + s := scanTime(raw + " x") + if s.style == nil { + t.Fatalf("no time in %q", raw) + } + return s.style +} + +func TestFormatTime(t *testing.T) { + cases := []struct { + style string + seconds float64 + oneDigit bool + want string // "" when it cannot be written + upgraded bool + }{ + {"00:00", 225, false, "03:45", false}, + {"0:00", 225, false, "3:45", false}, + {"000:00", 5, false, "000:05", false}, + {"59:30", 3615, false, "01:00:15", true}, + {"59:30", 3615, true, "1:00:15", true}, + {"1:00:00", 3725, false, "1:02:05", false}, + {"01:00:00", 5, false, "00:00:05", false}, + // Long-minute style stays two-part; minute width min(width, 2). + {"125:30", 7530 - 7000, false, "08:50", false}, + {"60:00", 7200, false, "120:00", false}, + {"60:00", 1000 * 60, false, "", false}, + {"60:00", 999*60 + 59, false, "999:59", false}, + // Fractions: half up at the written precision, the separator kept. + {"0:00.5", 2.25, false, "0:02.3", false}, + {"0:00.5", 2.35, false, "0:02.4", false}, // 2.35 * 10 + 0.5 = 24 (floor) + {"0:00,25", 1.005, false, "0:01,00", false}, // 1.005 * 100 is 100.99999999999999 + {"0:00.000", 0.0005, false, "0:00.001", false}, + {"0:00.000", 59.9996, false, "1:00.000", false}, + {"0:00", 0.4999999, false, "0:00", false}, + {"0:00", 0.5, false, "0:01", false}, + {"0:00", 0.49999999999999994, false, "0:01", false}, // floor(x + 0.5) as in JS; math.Round gives 0 + // The 100-hour ceiling (R13.9.2). + {"1:00:00", 360000, false, "", false}, + {"1:00:00", 359999, false, "99:59:59", false}, + {"00:00", 359999.4, false, "99:59:59", true}, + {"00:00", 9007199254740992, false, "", false}, + {"00:00", math.Inf(1), false, "", false}, + {"00:00", math.NaN(), false, "", false}, + } + for _, c := range cases { + f, ok := formatTime(c.seconds, styleOf(t, c.style), c.oneDigit) + got := "" + if ok { + got = f.raw + } + if got != c.want || (ok && f.upgraded != c.upgraded) { + t.Errorf("formatTime(%v in %s, %v) = %q %v, want %q %v", c.seconds, c.style, c.oneDigit, + got, f.upgraded, c.want, c.upgraded) + } + } +} + +func TestWithoutMarkers(t *testing.T) { + cases := []struct{ in, want string }{ + {"*Noisia* - Stigma", "Noisia - Stigma"}, + {"**Noisia** - __Stigma__", "Noisia - Stigma"}, + {"_a_ *b* **c** __d__", "a b c d"}, + {"***x***", "***x***"}, + {"a*b*c", "a*b*c"}, + {"2 * 3 * 4", "2 * 3 * 4"}, + {"*a **b* c**", "a **b c**"}, + {"(*a*)", "(a)"}, + {"*unclosed", "*unclosed"}, + {"snake_case_name", "snake_case_name"}, + } + for _, c := range cases { + if got := withoutMarkers([]rune(c.in), 0, noRune); got != c.want { + t.Errorf("withoutMarkers(%q) = %q, want %q", c.in, got, c.want) + } + } + if emphasisRun([]rune("***"), 0) != 0 || emphasisRun([]rune("__x"), 0) != 2 || emphasisRun([]rune("x"), 0) != 0 { + t.Error("emphasisRun") + } + // Out-of-range starts are total. + if withoutMarkers([]rune("ab"), 5, '*') != "" || withoutMarkers(nil, 0, '*') != "" { + t.Error("withoutMarkers bounds") + } +} + +func TestKindsHelpers(t *testing.T) { + if got := fmt.Sprint(markerWords(" (Intro)/shout-out [x]{ } ")); got != "[Intro shout out x]" { + t.Errorf("markerWords = %s", got) + } + if layeredPrefix([]rune("w/ Mefjus - Sinkhole")) != 3 || layeredPrefix([]rune("W/ x")) != 4 || + layeredPrefix([]rune("w/")) != 0 || layeredPrefix([]rune("w/ ")) != 0 || + layeredPrefix([]rune("with x")) != 0 { + t.Error("layeredPrefix") + } + if !isBlank("") || !isBlank(" \u3000\t") || isBlank(" x") { + t.Error("isBlank") + } + if !isLink(" HTTPS://x.y") || !isLink("www.example.com") || isLink("wwwx") || isLink("http:/x") { + t.Error("isLink") + } + if !isHeader("Tracklist:") || !isHeader(" tracklist ") || !isHeader("Tracklist 2024") || + isHeader("Tracklist of the year") || isHeader("Noisia") { + t.Error("isHeader") + } + m := markerTableFor(nil) + if !hasMarkerWord("Intro", m) || hasMarkerWord("Noisia - Stigma", m) { + t.Error("hasMarkerWord default") + } + extra := markerTableFor([]string{"Zebra Crossing"}) + if !hasMarkerWord("the zebra-crossing", extra) || hasMarkerWord("zebra", extra) { + t.Error("hasMarkerWord extra") + } + tr := Track{Artists: []Artist{{Name: "A", Role: RolePrimary}}} + if !hasSeparator(&tr, false) || hasSeparator(&tr, true) { + t.Error("hasSeparator") + } + tr.Warnings = []Warning{WarningNoSeparator} + if hasSeparator(&tr, false) { + t.Error("hasSeparator noSeparator") + } + if !hasSeparator(&Track{Flags: Flags{UnknownArtist: true}}, false) || hasSeparator(&Track{}, false) { + t.Error("hasSeparator unknownArtist") + } +} + +func TestBarePositions(t *testing.T) { + b := findBareCandidate("12 Noisia - Stigma", false) + if b == nil || b.raw != "12" || b.number != 12 || b.stripped != "Noisia - Stigma" { + t.Errorf("findBareCandidate = %+v", b) + } + for _, in := range []string{"1234 x", "12\u00a0x", "12 ", "12 \u3000", "x 12", "12"} { + if findBareCandidate(in, false) != nil { + t.Errorf("findBareCandidate(%q) should be nil", in) + } + } + if findBareCandidate("1 x", true) != nil { + t.Error("a taken position is not a bare candidate") + } + got := confirmPositions( + []int{1, -1, 2, 7, 5, -1, 4}, + []bool{true, false, true, true, true, true, true}, + ) + // 1-2 are neighbours; 7 and 5 have no adjacent neighbour; 4 follows a candidate line + // without a number and so is not confirmed by 5. + if fmt.Sprint(got) != "[true false true false false false false]" { + t.Errorf("confirmPositions = %v", got) + } + // A non-candidate line between two numbers does not separate them. + if fmt.Sprint(confirmPositions([]int{3, -1, 4}, []bool{true, false, true})) != "[true false true]" { + t.Error("confirmPositions skips non-candidates") + } + if len(confirmPositions(nil, nil)) != 0 { + t.Error("confirmPositions empty") + } +} + +func TestSearchTime(t *testing.T) { + f := func(v float64) *float64 { return &v } + cases := []struct { + raw string + lo, hi *float64 + want string // "none", "many" or the raw of the one candidate + }{ + // The corpus case: the second step finds it (see TestSuggestions). + {"1:22:21", f(3480), f(3780), "1:02:21"}, + // 3741 is not below hi: two-digit changes, several of them. + {"1:22:21", f(3480), f(3741), "many"}, + // One digit finds nothing, so two count: 02:00 is the only one. + {"10:00", f(110), f(130), "02:00"}, + // Bounds are strict. + {"10:00", f(120), f(130), "none"}, + {"01:00", f(120), f(300), "many"}, + {"10:00", f(600), f(601), "none"}, + {"10:00", nil, nil, "many"}, + {"0:00.5", f(59), f(61), "1:00.5"}, + // Fraction digits never change. + {"0:00.5", f(0.4), f(0.45), "none"}, + } + for _, c := range cases { + outcome, tm := searchTime(c.raw, c.lo, c.hi) + got := map[searchOutcome]string{searchNone: "none", searchMany: "many", searchOne: tm.Raw}[outcome] + if got != c.want { + t.Errorf("searchTime(%q) = %q, want %q", c.raw, got, c.want) + } + } +} + +// entriesOf builds track entries from lines without the pipeline: every line with text is a +// track. +func entriesOf(text string) []Entry { + lines := splitLines(text) + out := make([]Entry, len(lines)) + for i, l := range lines { + s := scanTime(l.raw) + kind := EntryKindTrack + if isBlank(l.raw) { + kind = EntryKindBlank + } + out[i] = Entry{Line: i + 1, Kind: kind, Eol: l.eol, Raw: l.raw, Parts: s.parts, Time: s.time} + } + return out +} + +func warningsText(ws []TracklistWarning) string { + var b strings.Builder + for _, w := range ws { + fmt.Fprintf(&b, "%d %s %s", w.Line, w.Code, w.Severity) + if w.Suggestion != nil { + fmt.Fprintf(&b, " -> %d %s %v", w.Suggestion.Line, w.Suggestion.Raw, w.Suggestion.Seconds) + } + b.WriteString("\n") + } + return b.String() +} + +func TestSuggestions(t *testing.T) { + // The JS reference's warnings for this text (rust/tests/tracklist_api.rs). + text := "0:10 A - B\n58:00 K - L\n1:22:21 C - D\n1:03:00 E - F\n1:04:00 G - H\nI - J\n1:75 x - y" + entries := entriesOf(text) + invalid := make([]bool, len(entries)) + for i, e := range entries { + invalid[i] = scanTime(e.Raw).invalid + } + got := warningsText(tracklistWarnings(&warningInput{entries: entries, invalid: invalid})) + want := "1 no-start-at-zero info\n" + + "4 time-out-of-order warning -> 3 1:02:21 3741\n" + + "6 time-missing warning\n" + + "7 time-missing warning\n" + + "7 invalid-time warning\n" + if got != want { + t.Errorf("warnings:\n%s\nwant:\n%s", got, want) + } +} + +func TestWarnings(t *testing.T) { + entries := entriesOf("00:00 a\n00:00 b\n02:00 c\n01:00 d\n\nw/ e\n05:00 f") + entries[5].Layered = true // R13.13.3: no time-missing + audio := 200.0 + got := warningsText(tracklistWarnings(&warningInput{ + entries: entries, + positions: []int{1, 1, 3, -1, -1, -1, 4}, + unparsed: []bool{false, false, false, false, false, false, true}, + audioSeconds: &audio, + })) + want := "2 time-duplicate warning\n" + + "2 position-duplicate warning\n" + + "3 position-gap warning\n" + + "4 time-out-of-order warning\n" + // 03:00 and 04:00 both fit + "7 time-after-audio-end warning\n" + + "7 line-unparsed warning\n" + if got != want { + t.Errorf("warnings:\n%s\nwant:\n%s", got, want) + } + // No timed line: no time-missing. + if ws := tracklistWarnings(&warningInput{entries: entriesOf("a - b\nc - d")}); len(ws) != 0 { + t.Errorf("untimed list warns %v", ws) + } +} + +func TestStats(t *testing.T) { + s := statsOf(entriesOf("x\n00:30 a\n\n01:30 b")) + if s.Lines != 4 || s.Tracks != 3 || s.Timed != 2 || *s.FirstTime != 30 || *s.LastTime != 90 { + t.Errorf("stats %+v", s) + } + if s := statsOf(nil); s.FirstTime != nil || s.LastTime != nil || s.Lines != 0 { + t.Errorf("empty stats %+v", s) + } +} + +func wireEdits(t *testing.T, text, edits string) string { + t.Helper() + v, err := parseJSON([]byte(edits)) + if err != nil { + t.Fatal(err) + } + return string(wireCall("applyEdits", text, jsonValue{kind: jsonObject}, jsonValue{kind: jsonObject}, v)) +} + +func TestEditResults(t *testing.T) { + text := "00:00 Noisia - Stigma\n59:30 Phace - Psycho\n" + r := ApplyEdits(text, []Edit{ShiftFrom(45, 2), SetTime(1, -3), Delete(7)}) + got := string(marshal(&r)) + want := `{"text":"00:00 Noisia - Stigma\n01:00:15 Phace - Psycho\n","changed":[1,2],"warnings":[{"code":"style-upgraded","edit":0,"line":2},{"code":"time-clamped","edit":1,"line":1},{"code":"edit-invalid","edit":2,"line":7}]}` + if got != want { + t.Errorf("got %s\nwant %s", got, want) + } + if r := ApplyEdits("0:00.5 A - B", []Edit{SetTime(1, 2.25)}); r.Text != "0:02.3 A - B" { + t.Errorf("half-up rounding: %q", r.Text) + } + tooLong := ApplyEdits("1:00:00 A - B", []Edit{SetTime(1, 360000)}) + if tooLong.Text != "1:00:00 A - B" || tooLong.Warnings[0].Code != EditWarningCodeEditInvalid { + t.Errorf("100 hours: %+v", tooLong) + } + // One-digit hours when every time with hours has them (R13.9.2). + if r := ApplyEdits("0:00 a\n1:00:00 b\n59:00 c", []Edit{Shift(120)}); r.Text != "2:00 a\n1:02:00 b\n1:01:00 c" { + t.Errorf("one-digit hours: %q", r.Text) + } + if r := ApplyEditsWith("00:00 A - B\n01:00 C - D", []Edit{Shift(5)}, TracklistOptions{}); r.Text != "00:05 A - B\n01:05 C - D" { + t.Errorf("ApplyEditsWith: %q", r.Text) + } + if r := ApplyEdits("x", nil); r.Text != "x" || r.Changed == nil || len(r.Warnings) != 0 { + t.Errorf("no edits: %+v", r) + } +} + +func TestEditOps(t *testing.T) { + cases := []struct{ text, edits, want string }{ + // sort-by-time: blocks (a timed line and the untimed lines after it), stable on ties; + // leading untimed lines stay; eols stay in their slots. + {"head\n03:00 c\nnote c\n01:00 a\n03:00 c2\n01:00 a2\r\n", `[{"op":"sort-by-time"}]`, + `{"text":"head\n01:00 a\n01:00 a2\n03:00 c\nnote c\n03:00 c2\r\n","changed":[2,3,4,5,6],"warnings":[]}`}, + {"a\nb", `[{"op":"sort-by-time"}]`, `{"text":"a\nb","changed":[],"warnings":[]}`}, + // set-rest adds a space after a gap without one. + {"[00:00]A", `[{"op":"set-rest","line":1,"rest":"X - Y"}]`, + `{"text":"[00:00] X - Y","changed":[1],"warnings":[]}`}, + {"00:00 A", `[{"op":"set-rest","line":1,"rest":""}]`, + `{"text":"00:00 ","changed":[1],"warnings":[]}`}, + {"untimed", `[{"op":"set-rest","line":1,"rest":"z"}]`, `{"text":"z","changed":[1],"warnings":[]}`}, + // insert: the most common eol, the end, an empty text. + {"a\r\nb\r\nc\n", `[{"op":"insert","after":3,"text":"d"}]`, + `{"text":"a\r\nb\r\nc\nd\r\n","changed":[4],"warnings":[]}`}, + {"a\nb", `[{"op":"insert","after":2,"text":"c"}]`, + `{"text":"a\nb\nc","changed":[2,3],"warnings":[]}`}, + {"", `[{"op":"insert","after":0,"text":"x"}]`, `{"text":"x","changed":[1],"warnings":[]}`}, + {"a\rb\n", `[{"op":"insert","after":0,"text":"z"}]`, + `{"text":"z\ra\rb\n","changed":[1],"warnings":[]}`}, + // delete: the deleted last line's eol moves up; a CR line and an empty LF line merge. + {"a\r\nb", `[{"op":"delete","line":2}]`, `{"text":"a","changed":[1],"warnings":[]}`}, + {"a\rx\n\n", `[{"op":"delete","line":2}]`, `{"text":"a\r\n","changed":[1],"warnings":[]}`}, + {"only", `[{"op":"delete","line":1}]`, `{"text":"","changed":[],"warnings":[]}`}, + // An invalid edit changes nothing; the others still apply. + {"00:00 a\n01:00 b", `[{"op":"shift","seconds":-30,"lines":[2]},{"op":"set-time","line":3,"seconds":1},{"op":"shift","seconds":-90}]`, + `{"text":"00:00 a\n00:00 b","changed":[1,2],"warnings":[{"code":"edit-invalid","edit":1,"line":3},{"code":"time-clamped","edit":2,"line":1},{"code":"time-clamped","edit":2,"line":2}]}`}, + // A shift that would push one line past 100 hours fails as a whole. + {"00:00 a\n99:00:00 b", `[{"op":"shift","seconds":7200}]`, + `{"text":"00:00 a\n99:00:00 b","changed":[],"warnings":[{"code":"edit-invalid","edit":0,"line":null}]}`}, + } + for _, c := range cases { + if got := wireEdits(t, c.text, c.edits); got != c.want { + t.Errorf("%q %s\n got %s\n want %s", c.text, c.edits, got, c.want) + } + } +} + +func TestLooseEditsFollowJSNumberRules(t *testing.T) { + text := "00:00 A - B\n01:00 C - D" + invalid := map[string]string{ + `[{"op":"set-time","line":true,"seconds":5}]`: "null", + `[{"op":"set-time","line":1,"seconds":true}]`: "1", + `[{"op":"set-time","line":1,"seconds":null}]`: "1", + `[{"op":"set-time","line":1,"seconds":"5"}]`: "1", + `[{"op":"set-time","line":1,"seconds":1e999}]`: "1", + `[{"op":"set-time","line":1.5,"seconds":5}]`: "null", + `[{"op":"shift","seconds":-1e999}]`: "null", + `[{"op":"shift","seconds":1,"lines":null}]`: "null", + `[{"op":"shift","seconds":1,"lines":[1,3]}]`: "null", + `[{"op":"shift","seconds":1,"from":0}]`: "null", + `[{"op":"shift","seconds":9007199254740992}]`: "null", + `[{"op":"rename","line":-2}]`: "-2", + `[{"op":"rename","line":"x","after":1e300}]`: "1e+300", + `[{"op":"insert","after":3,"text":"x"}]`: "3", + `[{"op":"insert","after":1,"text":"a\rb"}]`: "1", + `[{"op":"insert","after":1,"text":5}]`: "1", + `[{"op":"set-rest","line":1,"rest":"a\nb"}]`: "1", + `[{"op":"delete"}]`: "null", + `[{"op":"delete","line":2.0000001}]`: "null", + `[null]`: "null", + `[[]]`: "null", + `[{"line":1}]`: "1", + `[{"op":"sort-by-time ","line":1}]`: "1", + `[{"op":"set-time","line":-0,"seconds":1,"after":2}]`: "0", + `[{"op":"set-time","line":1e21,"seconds":1,"after":2}]`: "1e+21", + } + for edits, line := range invalid { + out, err := parseJSON([]byte(wireEdits(t, text, edits))) + if err != nil { + t.Fatal(err) + } + gotText, _ := out.getString("text") + ws, _ := out.get("warnings") + if gotText != text || len(ws.arr) != 1 { + t.Errorf("%s: %s", edits, marshal(out)) + continue + } + code, _ := ws.arr[0].getString("code") + l, _ := ws.arr[0].get("line") + if code != "edit-invalid" || string(marshal(l)) != line { + t.Errorf("%s: warning %s, want edit-invalid with line %s", edits, marshal(ws.arr[0]), line) + } + } + // lines wins over from; a value that is not an array of edits has nothing to do. + if got := wireEdits(t, text, `[{"op":"shift","seconds":1,"lines":[2],"from":"bad"}]`); got != `{"text":"00:00 A - B\n01:01 C - D","changed":[2],"warnings":[]}` { + t.Errorf("lines over from: %s", got) + } + if wireEdits(t, text, `{"op":"sort-by-time"}`) != wireEdits(t, text, `[]`) { + t.Error("an object is not a list of edits") + } + // Duplicate and unordered lines shift once each. + if got := wireEdits(t, text, `[{"op":"shift","seconds":2,"lines":[2,1,2]}]`); got != `{"text":"00:02 A - B\n01:02 C - D","changed":[1,2],"warnings":[]}` { + t.Errorf("lines set: %s", got) + } +} + +func TestTypedEditsMatchTheWire(t *testing.T) { + texts := []string{ + "", + "\n", + "00:00 Noisia - Stigma\n03:30 Phace - Psycho\nrecorded live\n07:15 Mefjus - Sinkhole", + "Tracklist:\r\n[00:00] Intro\r\n[01:30] 1 Noisia - Stigma\r\n[05:00] 2 Phace - Psycho\r\n", + "**00:00** *Noisia* - Stigma\r- 03:30 Camo & Krooked - Climax\rw/ Mefjus - Sinkhole\r", + "0:00 A - B\n1:22:21 C - D\n1:03:00 E - F\n1:75 bad\nhttps://example.com\n", + "01:02:03.250 🎵 - 𝐀𝐁 (👨‍👩‍👧 Remix)\u2028still the same line\n\u3000\n12:34,5 x", + } + cases := []struct { + typed []Edit + loose string + }{ + {[]Edit{SetTime(2, 3725)}, `[{"op":"set-time","line":2,"seconds":3725}]`}, + {[]Edit{SetTime(2, -4.5)}, `[{"op":"set-time","line":2,"seconds":-4.5}]`}, + {[]Edit{SetTime(9, 1)}, `[{"op":"set-time","line":9,"seconds":1}]`}, + {[]Edit{SetTime(1, math.Inf(1))}, `[{"op":"set-time","line":1,"seconds":1e999}]`}, + {[]Edit{SetTime(1, math.NaN())}, `[{"op":"set-time","line":1,"seconds":null}]`}, + {[]Edit{Shift(30)}, `[{"op":"shift","seconds":30}]`}, + {[]Edit{ShiftFrom(-3600, 2)}, `[{"op":"shift","seconds":-3600,"from":2}]`}, + {[]Edit{{Op: EditOpShift, Seconds: 0.25, Lines: []int{4, 1, 4}, From: ptrInt(3)}}, + `[{"op":"shift","seconds":0.25,"lines":[4,1,4],"from":3}]`}, + {[]Edit{ShiftLines(1, 0)}, `[{"op":"shift","seconds":1,"lines":[0]}]`}, + {[]Edit{ShiftLines(1)}, `[{"op":"shift","seconds":1,"lines":[]}]`}, + {[]Edit{SortByTime()}, `[{"op":"sort-by-time"}]`}, + {[]Edit{SetRest(1, "New - Rest")}, `[{"op":"set-rest","line":1,"rest":"New - Rest"}]`}, + {[]Edit{Insert(0, "00:00 X - Y")}, `[{"op":"insert","after":0,"text":"00:00 X - Y"}]`}, + {[]Edit{Insert(99, "x")}, `[{"op":"insert","after":99,"text":"x"}]`}, + {[]Edit{Delete(1)}, `[{"op":"delete","line":1}]`}, + {[]Edit{Delete(1), Insert(1, "9:59:59 Late - One"), SortByTime(), Shift(5000)}, + `[{"op":"delete","line":1},{"op":"insert","after":1,"text":"9:59:59 Late - One"},{"op":"sort-by-time"},{"op":"shift","seconds":5000}]`}, + } + for _, c := range cases { + for _, text := range texts { + r := ApplyEdits(text, c.typed) + if got, want := string(marshal(&r)), wireEdits(t, text, c.loose); got != want { + t.Errorf("%s on %q:\n typed %s\n wire %s", c.loose, text, got, want) + } + } + } +} + +func ptrInt(n int) *int { return &n } + +// TestTracklistTotality feeds random text and random edits through the tracklist code: nothing +// panics, entries are lossless, and edits keep lines no edit wrote. +func TestTracklistTotality(t *testing.T) { + alphabet := []rune("0123456789:.,[]()*_-–—•|=> \t\r\n\u2028\u0085\u3000aZé🎵w/") + rng := rand.New(rand.NewSource(7)) + for k := 0; k < 3000; k++ { + n := rng.Intn(60) + rs := make([]rune, n) + for i := range rs { + rs[i] = alphabet[rng.Intn(len(alphabet))] + } + text := string(rs) + l := ParseTracklist(text) + var b strings.Builder + for _, e := range l.Entries { + p := e.Parts + if p.Lead+p.Time+p.Gap+p.Rest != e.Raw { + t.Fatalf("%q: parts of line %d are not lossless", text, e.Line) + } + b.WriteString(e.Raw + string(e.Eol)) + } + if b.String() != text { + t.Fatalf("%q: entries join to %q", text, b.String()) + } + edits := []Edit{ + SetTime(rng.Intn(5), float64(rng.Intn(400000))-1000), + ShiftFrom(float64(rng.Intn(8000))-4000, rng.Intn(5)), + SortByTime(), + Insert(rng.Intn(5), "12:00 x"), + Delete(rng.Intn(5)), + SetRest(rng.Intn(5), "**y**"), + } + rng.Shuffle(len(edits), func(i, j int) { edits[i], edits[j] = edits[j], edits[i] }) + r := ApplyEdits(text, edits[:1+rng.Intn(len(edits))]) + for i := 1; i < len(r.Changed); i++ { + if r.Changed[i] <= r.Changed[i-1] { + t.Fatalf("%q: changed not sorted: %v", text, r.Changed) + } + } + } +} + +func TestWarningRankFollowsAllWarningCodes(t *testing.T) { + codes := AllWarningCodes() + for i, c := range codes { + if warningRank(c) != i { + t.Errorf("warningRank(%s) = %d, want %d", c, warningRank(c), i) + } + } + if warningRank("bogus") != len(codes) { + t.Error("an unknown code ranks last") + } + // The lists are fresh slices: changing one changes neither the next call nor the ranking. + codes[0], codes[1] = codes[1], codes[0] + if AllWarningCodes()[0] != WarningCodeTimeMissing || warningRank(WarningCodeTimeMissing) != 0 { + t.Error("AllWarningCodes shares its backing array") + } +} diff --git a/go/trackparse.go b/go/trackparse.go new file mode 100644 index 0000000..cf46028 --- /dev/null +++ b/go/trackparse.go @@ -0,0 +1,112 @@ +package trackparse + +// The public API. Every function is total (R0.8): any string gives a result, bad option values +// fall back to the defaults, and nothing panics. Input that is not valid UTF-8 is read with the +// WHATWG rule first (each maximal ill-formed subpart becomes one U+FFFD, see sanitize), so the +// Go and Rust ports read the same bytes as the same text. + +// Parse parses one track string with the default options. +func Parse(input string) Track { + return sharedEngine().run(sanitize(input), false) +} + +// ParseWith parses one track string with options (R12). To parse many strings with the same +// options, build a [Parser] once instead: the options' tables are compiled per call here. +func ParseWith(input string, options ParseOptions) Track { + return NewParser(options).Parse(input) +} + +// ParseArtists splits an artist credit string into artists (R10), with the default options. +func ParseArtists(input string) []Artist { + return sharedEngine().runArtists(sanitize(input)) +} + +// ParseArtistsWith is [ParseArtists] with options. +func ParseArtistsWith(input string, options ParseOptions) []Artist { + return NewParser(options).ParseArtists(input) +} + +// Format renders a parsed track back to a string (R11) with the default options: artists, +// " - ", the title and its versions, written as they were found. +func Format(track Track) string { + return formatTrack(&track, resolveFormat(&FormatOptions{})) +} + +// FormatWith is [Format] with options. +func FormatWith(track Track, options FormatOptions) string { + return formatTrack(&track, resolveFormat(&options)) +} + +// Normalize is the Unicode cleanup (R1) every function runs first: NFC; zero-width +// characters, the BOM and soft hyphens removed; fullwidth brackets, smart quotes and dash +// variants mapped to ASCII; whitespace collapsed and trimmed. Running it twice changes nothing. +func Normalize(input string) string { + return normalize(sanitize(input)) +} + +// AllArtists is every artist of the track, the version credits (remixers) included, in the +// order written and without duplicates. +func AllArtists(track Track) []Artist { + return allArtists(&track) +} + +// Parser parses with fixed options, compiled once. It is safe for concurrent use. The zero +// Parser uses the default options. +type Parser struct { + e *engine +} + +// NewParser compiles options (R12) into a [Parser]. +func NewParser(options ParseOptions) *Parser { + return &Parser{e: newEngine(resolveParse(&options))} +} + +func (p *Parser) engine() *engine { + if p == nil || p.e == nil { + return sharedEngine() + } + return p.e +} + +// Parse parses one track string with the parser's options. +func (p *Parser) Parse(input string) Track { + return p.engine().run(sanitize(input), false) +} + +// ParseArtists splits an artist credit string with the parser's options (R10). +func (p *Parser) ParseArtists(input string) []Artist { + return p.engine().runArtists(sanitize(input)) +} + +// ParseTracklist parses a multi-line tracklist with the default options (R13). The text is +// split at LF, CRLF and CR only; every line becomes one entry, and the entries' Raw and Eol, +// joined, are the text again (R13.1.2). +func ParseTracklist(text string) Tracklist { + return parseTracklist(sanitize(text), resolveTracklist(&TracklistOptions{})) +} + +// ParseTracklistWith is [ParseTracklist] with options (R13.10). +func ParseTracklistWith(text string, options TracklistOptions) Tracklist { + return parseTracklist(sanitize(text), resolveTracklist(&options)) +} + +// ApplyEdits applies edits to a tracklist text (R13.9), in order, each to the result of the +// previous one. Lines no edit wrote stay byte-identical, after invalid UTF-8 is replaced (each +// maximal ill-formed subpart becomes one U+FFFD, as in every function). An edit that cannot be +// applied changes nothing and is reported as [EditWarningCodeEditInvalid]. +func ApplyEdits(text string, edits []Edit) EditResult { + loose := make([]jsonValue, len(edits)) + for i := range edits { + // Through the edit's JSON form, which also sanitizes its strings: typed and loose + // edits share one code path, as in the Rust crate. + loose[i] = jsonOf(&edits[i]) + } + return applyEdits(sanitize(text), loose).result() +} + +// ApplyEditsWith is [ApplyEdits] with options. The options are accepted for symmetry with the +// other ports (R13.10); edits do not depend on them today. +func ApplyEditsWith(text string, edits []Edit, options TracklistOptions) EditResult { + _ = options + return ApplyEdits(text, edits) +} diff --git a/go/types.go b/go/types.go new file mode 100644 index 0000000..11dd4f7 --- /dev/null +++ b/go/types.go @@ -0,0 +1,597 @@ +package trackparse + +// Public types. They mirror spec/schema/parsed-track.schema.json and +// spec/schema/tracklist.schema.json: field names are Go-cased here and the spec's camelCase in +// JSON (see MarshalJSON in json.go). Every key is always present in the JSON form, nullable +// fields are pointers, and enums are typed strings that hold the spec's names. + +// Mode is the mode a string is parsed in (R2). In a [Track] it is clean, youtube, filename or +// tracklist, never auto. In [ParseOptions] and [TracklistOptions], [ModeAuto] asks the parser to +// pick one (auto never resolves to tracklist, R13.6), and the empty string means the option's +// default: auto for a parse, tracklist for a tracklist. +type Mode string + +// The modes. Any other string in an option behaves as the JavaScript package does with an +// unknown mode: no youtube detection, filenames still detected. +const ( + ModeAuto Mode = "auto" + ModeClean Mode = "clean" + ModeYouTube Mode = "youtube" + ModeFilename Mode = "filename" + ModeTracklist Mode = "tracklist" +) + +// AllModes returns the modes a [Track] can have, in the spec's order. +// Each call returns a new slice. +func AllModes() []Mode { + return []Mode{ModeClean, ModeYouTube, ModeFilename, ModeTracklist} +} + +// Role is what an artist did on the track (R7). +type Role string + +// The artist roles. +const ( + RolePrimary Role = "primary" + RoleFeatured Role = "featured" + RoleRemixer Role = "remixer" + RoleProducer Role = "producer" +) + +// AllRoles returns every [Role], in the spec's order. +// Each call returns a new slice. +func AllRoles() []Role { + return []Role{RolePrimary, RoleFeatured, RoleRemixer, RoleProducer} +} + +// Source is where in the string an artist was found: the artist side, the title side, or a +// version group. +type Source string + +// The artist sources. +const ( + SourceArtist Source = "artist" + SourceTitle Source = "title" + SourceVersion Source = "version" +) + +// AllSources returns every [Source], in the spec's order. +// Each call returns a new slice. +func AllSources() []Source { + return []Source{SourceArtist, SourceTitle, SourceVersion} +} + +// VersionType is the type of a version (R5): remix, edit, live, remaster and so on. A version +// head added through [Keywords] can carry any string, which the output keeps as given. +type VersionType string + +// The version types of the spec. +const ( + VersionTypeRemix VersionType = "remix" + VersionTypeBootleg VersionType = "bootleg" + VersionTypeVIP VersionType = "vip" + VersionTypeEdit VersionType = "edit" + VersionTypeFlip VersionType = "flip" + VersionTypeRefix VersionType = "refix" + VersionTypeRework VersionType = "rework" + VersionTypeMashup VersionType = "mashup" + VersionTypeBlend VersionType = "blend" + VersionTypeDub VersionType = "dub" + VersionTypeMix VersionType = "mix" + VersionTypeExtended VersionType = "extended" + VersionTypeRadio VersionType = "radio" + VersionTypeClub VersionType = "club" + VersionTypeOriginal VersionType = "original" + VersionTypeInstrumental VersionType = "instrumental" + VersionTypeAcapella VersionType = "acapella" + VersionTypeLive VersionType = "live" + VersionTypeAcoustic VersionType = "acoustic" + VersionTypeRemaster VersionType = "remaster" + VersionTypeDemo VersionType = "demo" + VersionTypeReprise VersionType = "reprise" + VersionTypeCover VersionType = "cover" + VersionTypeVersion VersionType = "version" + VersionTypeSpedUp VersionType = "spedUp" + VersionTypeSlowed VersionType = "slowed" + VersionTypeNightcore VersionType = "nightcore" +) + +// AllVersionTypes returns the 27 version types of the spec, in the spec's order. +// Each call returns a new slice. +func AllVersionTypes() []VersionType { + return []VersionType{ + VersionTypeRemix, VersionTypeBootleg, VersionTypeVIP, VersionTypeEdit, VersionTypeFlip, + VersionTypeRefix, VersionTypeRework, VersionTypeMashup, VersionTypeBlend, VersionTypeDub, + VersionTypeMix, VersionTypeExtended, VersionTypeRadio, VersionTypeClub, VersionTypeOriginal, + VersionTypeInstrumental, VersionTypeAcapella, VersionTypeLive, VersionTypeAcoustic, + VersionTypeRemaster, VersionTypeDemo, VersionTypeReprise, VersionTypeCover, + VersionTypeVersion, VersionTypeSpedUp, VersionTypeSlowed, VersionTypeNightcore, + } +} + +// Delimiter is how a version was written: in a bracket group, or after a dash. +type Delimiter string + +// The version delimiters. +const ( + DelimiterParen Delimiter = "(" + DelimiterSquare Delimiter = "[" + DelimiterCurly Delimiter = "{" + DelimiterDash Delimiter = "-" +) + +// AllDelimiters returns every [Delimiter], in the spec's order. +// Each call returns a new slice. +func AllDelimiters() []Delimiter { + return []Delimiter{DelimiterParen, DelimiterSquare, DelimiterCurly, DelimiterDash} +} + +// JunkKind is what kind of noise a junk fragment is (R5). A junk phrase added through +// [Keywords] can carry any string, which the output keeps as given. +type JunkKind string + +// The junk kinds of the spec. +const ( + JunkKindVideo JunkKind = "video" + JunkKindAudio JunkKind = "audio" + JunkKindLyrics JunkKind = "lyrics" + JunkKindQuality JunkKind = "quality" + JunkKindPromo JunkKind = "promo" + JunkKindPlatform JunkKind = "platform" + JunkKindLabel JunkKind = "label" + JunkKindGenre JunkKind = "genre" + JunkKindOther JunkKind = "other" +) + +// AllJunkKinds returns the junk kinds of the spec, in the spec's order. +// Each call returns a new slice. +func AllJunkKinds() []JunkKind { + return []JunkKind{ + JunkKindVideo, JunkKindAudio, JunkKindLyrics, JunkKindQuality, JunkKindPromo, + JunkKindPlatform, JunkKindLabel, JunkKindGenre, JunkKindOther, + } +} + +// Warning is a warning of the single-track parser: the result is a guess the caller may want +// to check. +type Warning string + +// The track warnings. +const ( + WarningNoSeparator Warning = "noSeparator" + WarningAmbiguousSeparator Warning = "ambiguousSeparator" + WarningUnspacedDashSplit Warning = "unspacedDashSplit" + WarningAsymmetricDashSplit Warning = "asymmetricDashSplit" + WarningBySplit Warning = "bySplit" + WarningQuotedTitleSplit Warning = "quotedTitleSplit" + WarningAmbiguousMixCredit Warning = "ambiguousMixCredit" + WarningUnbalancedBrackets Warning = "unbalancedBrackets" +) + +// AllWarnings returns every [Warning], in the spec's order. +// Each call returns a new slice. +func AllWarnings() []Warning { + return []Warning{ + WarningNoSeparator, WarningAmbiguousSeparator, WarningUnspacedDashSplit, + WarningAsymmetricDashSplit, WarningBySplit, WarningQuotedTitleSplit, + WarningAmbiguousMixCredit, WarningUnbalancedBrackets, + } +} + +// Artist is one credited artist. +type Artist struct { + // Name is the name as written, trimmed. + Name string + // Role is what the artist did on the track. + Role Role + // Joiner is the raw joiner or marker text that preceded the name in its credit list; nil + // for the first name of a list. + Joiner *string + // Source is where in the string the artist was found. + Source Source +} + +// Version is one version of the track: a remix, an edit, a live take, a remaster (R5, R8). +type Version struct { + // Type is the version type. + Type VersionType + // Raw is the version text as written, without its brackets. + Raw string + // Artists are who made it (role remixer); empty for versions without a credit. + Artists []Artist + // Modifiers are the other version words of the group, as lowercase keys ("extended" in + // "Extended Remix"). + Modifiers []string + // Descriptor is free text of the version that is neither a credit nor a keyword. + Descriptor *string + // Year is a year written inside the version. + Year *int + // UnknownArtist is true when the credit is a placeholder such as ID or Unknown. + UnknownArtist bool + // Delimiter is how the version was written. + Delimiter Delimiter +} + +// Junk is a fragment that says nothing about the track: Official Video, HD, Free Download. It +// is taken out of the title and kept here (the parser extracts, it does not delete). +type Junk struct { + // Raw is the fragment as written, without its brackets. + Raw string + // Kind is what kind of noise it is. + Kind JunkKind +} + +// Flags are yes/no facts about the track. +type Flags struct { + // Explicit is true when the track is marked Explicit or Dirty. + Explicit bool + // Clean is true when the track is marked Clean. + Clean bool + // UnknownArtist is true when the artist is a placeholder (ID, Unknown Artist). + UnknownArtist bool + // UnknownTitle is true when the title is a placeholder (ID, Untitled). + UnknownTitle bool +} + +// Position is a track number in front of the string (R4.2). +type Position struct { + // Raw is the number as written, without the separator after it. + Raw string + // Number is its value. + Number int +} + +// Timestamp is a cue time in front of a single track string (R4.1), in whole seconds. +type Timestamp struct { + // Raw is the time as written, without brackets. + Raw string + // Seconds is the time in seconds. + Seconds int +} + +// Track is the result of [Parse]: everything recognized in one track string. Anything +// recognized is in a field; anything not recognized stays in Title verbatim. +type Track struct { + // Input is the string that was parsed, unchanged. + Input string + // Mode is the mode it was parsed in; never [ModeAuto]. + Mode Mode + // Position is a leading track number. + Position *Position + // Timestamp is a leading cue time. + Timestamp *Timestamp + // Artists are the primary, featured and producer credits, in the order written. Remixers + // are in Versions; [AllArtists] gives both. + Artists []Artist + // Title is the title without versions, featured credits and junk. + Title string + // FullTitle is the title with its versions, as written. + FullTitle string + // Versions are the remixes, edits and other versions, in the order written. + Versions []Version + // Year is a release year found outside the versions. + Year *int + // Flags are yes/no facts. + Flags Flags + // Junk are the fragments that say nothing about the track. + Junk []Junk + // Warnings are guesses the caller may want to check. + Warnings []Warning +} + +// --------------------------------------------------------------------------------------------- +// Tracklists (R13) + +// EntryKind is what a line of a tracklist is (R13.3). +type EntryKind string + +// The entry kinds. +const ( + EntryKindTrack EntryKind = "track" + EntryKindMarker EntryKind = "marker" + EntryKindHeader EntryKind = "header" + EntryKindLink EntryKind = "link" + EntryKindNote EntryKind = "note" + EntryKindBlank EntryKind = "blank" +) + +// AllEntryKinds returns every [EntryKind], in the spec's order. +// Each call returns a new slice. +func AllEntryKinds() []EntryKind { + return []EntryKind{ + EntryKindTrack, EntryKindMarker, EntryKindHeader, EntryKindLink, EntryKindNote, + EntryKindBlank, + } +} + +// Eol is the line terminator that followed a line (R13.1.1). The value is the terminator +// itself; [EolNone] is the empty string, for a last line without one. +type Eol string + +// The line terminators. +const ( + EolLF Eol = "\n" + EolCRLF Eol = "\r\n" + EolCR Eol = "\r" + EolNone Eol = "" +) + +// AllEols returns every [Eol], in the spec's order. +// Each call returns a new slice. +func AllEols() []Eol { + return []Eol{EolLF, EolCRLF, EolCR, EolNone} +} + +// Parts is a line cut into four pieces that join back to it: Lead + Time + Gap + Rest is the +// raw line (R13.1.3). +type Parts struct { + // Lead is what stands before the time: indentation, a bullet, an opening bracket. + Lead string + // Time is the time as written, without brackets; empty when the line has none. + Time string + // Gap is what stands between the time and the rest: a closing bracket, whitespace, a + // separator. + Gap string + // Rest is everything after that. + Rest string +} + +// TracklistTime is the time of a tracklist line (R13.2.5). +type TracklistTime struct { + // Raw is the time as written, without brackets. + Raw string + // Seconds is the time in seconds; it may carry a fraction. A whole value is an integer in + // JSON. + Seconds float64 +} + +// Entry is one line of a tracklist. +type Entry struct { + // Line is the 1-based line number. + Line int + // Kind is what the line is. + Kind EntryKind + // Eol is the line terminator that followed it. + Eol Eol + // Raw is the line as written, without its terminator. Never normalized. + Raw string + // Parts is Raw cut into lead, time, gap and rest. + Parts Parts + // Time is the line's time, if it has a valid one. + Time *TracklistTime + // Track is the parse of the line text, for track and marker entries. + Track *Track + // Layered is true when the line's text after any time starts with w/: a track played over + // the previous one (R13.13). + Layered bool +} + +// WarningCode is the code of a tracklist warning (R13.7). +type WarningCode string + +// The tracklist warning codes, in the table order of the spec. +const ( + WarningCodeTimeMissing WarningCode = "time-missing" + WarningCodeTimeOutOfOrder WarningCode = "time-out-of-order" + WarningCodeTimeDuplicate WarningCode = "time-duplicate" + WarningCodeNoStartAtZero WarningCode = "no-start-at-zero" + WarningCodeTimeAfterAudioEnd WarningCode = "time-after-audio-end" + WarningCodeInvalidTime WarningCode = "invalid-time" + WarningCodePositionGap WarningCode = "position-gap" + WarningCodePositionDuplicate WarningCode = "position-duplicate" + WarningCodeLineUnparsed WarningCode = "line-unparsed" +) + +// AllWarningCodes returns every [WarningCode], in the spec's order. +// Each call returns a new slice. +func AllWarningCodes() []WarningCode { + return []WarningCode{ + WarningCodeTimeMissing, WarningCodeTimeOutOfOrder, WarningCodeTimeDuplicate, + WarningCodeNoStartAtZero, WarningCodeTimeAfterAudioEnd, WarningCodeInvalidTime, + WarningCodePositionGap, WarningCodePositionDuplicate, WarningCodeLineUnparsed, + } +} + +// Severity is how serious a tracklist warning is. +type Severity string + +// The severities. +const ( + SeverityInfo Severity = "info" + SeverityWarning Severity = "warning" +) + +// AllSeverities returns every [Severity], in the spec's order. +// Each call returns a new slice. +func AllSeverities() []Severity { + return []Severity{SeverityInfo, SeverityWarning} +} + +// Suggestion is a fix for a time-out-of-order warning that changes one or two digits (R13.7). +type Suggestion struct { + // Line is the line to change. + Line int + // Raw is the time to write there. + Raw string + // Seconds is that time in seconds. + Seconds float64 +} + +// TracklistWarning is a warning about a tracklist (R13.7). +type TracklistWarning struct { + // Code is what is wrong. + Code WarningCode + // Line is the 1-based line it is about. + Line int + // Severity is how serious it is. + Severity Severity + // Suggestion is a fix, for time-out-of-order when exactly one small change repairs the + // order. + Suggestion *Suggestion +} + +// Stats are counts over a tracklist. +type Stats struct { + // Lines is the number of lines (entries). + Lines int + // Tracks is the number of track entries. + Tracks int + // Markers is the number of marker entries. + Markers int + // Timed is the number of entries with a time. + Timed int + // FirstTime is the time of the first timed entry, in seconds. + FirstTime *float64 + // LastTime is the time of the last timed entry, in seconds. + LastTime *float64 +} + +// Tracklist is the result of [ParseTracklist]: one entry per line, the warnings and the +// counts. The entries' Raw and Eol, joined, are the text again (R13.1.2). +type Tracklist struct { + // SpecVersion is the version of the spec the result follows. + SpecVersion string + // Entries has one entry per line, in order. + Entries []Entry + // Warnings are ordered by line. + Warnings []TracklistWarning + // Stats are the counts. + Stats Stats +} + +// EditOp names the operation of an [Edit] (R13.9). +type EditOp string + +// The edit operations. +const ( + EditOpSetTime EditOp = "set-time" + EditOpShift EditOp = "shift" + EditOpSortByTime EditOp = "sort-by-time" + EditOpSetRest EditOp = "set-rest" + EditOpInsert EditOp = "insert" + EditOpDelete EditOp = "delete" +) + +// AllEditOps returns every [EditOp], in the spec's order. +// Each call returns a new slice. +func AllEditOps() []EditOp { + return []EditOp{ + EditOpSetTime, EditOpShift, EditOpSortByTime, EditOpSetRest, EditOpInsert, EditOpDelete, + } +} + +// Edit is one edit of a tracklist text (R13.9). Line numbers are 1-based and refer to the text +// as the previous edit left it. Build one with [SetTime], [Shift], [ShiftFrom], [ShiftLines], +// [SortByTime], [SetRest], [Insert] or [Delete]; each operation reads only its own fields. An +// edit that cannot be applied changes nothing and is reported as [EditWarningCodeEditInvalid]. +type Edit struct { + // Op is the operation. + Op EditOp + // Line is the line to change (set-time, set-rest, delete). + Line int + // Seconds is the new time (set-time) or the amount to add (shift; negative moves back). + Seconds float64 + // Lines limits a shift to these lines. Nil means not given; an empty non-nil slice shifts + // no line. + Lines []int + // From limits a shift to this line and the ones after it. Nil means not given. + From *int + // Rest is the new text after the time and gap (set-rest). + Rest string + // After is the line to insert after; 0 inserts at the start (insert). + After int + // Text is the new line, without a terminator (insert). + Text string +} + +// EditWarningCode is the code of an edit warning (R13.9). +type EditWarningCode string + +// The edit warning codes. +const ( + EditWarningCodeEditInvalid EditWarningCode = "edit-invalid" + EditWarningCodeTimeClamped EditWarningCode = "time-clamped" + EditWarningCodeStyleUpgraded EditWarningCode = "style-upgraded" +) + +// AllEditWarningCodes returns every [EditWarningCode], in the spec's order. +// Each call returns a new slice. +func AllEditWarningCodes() []EditWarningCode { + return []EditWarningCode{ + EditWarningCodeEditInvalid, EditWarningCodeTimeClamped, EditWarningCodeStyleUpgraded, + } +} + +// EditWarning is a warning about one edit. +type EditWarning struct { + // Code is what happened. + Code EditWarningCode + // Edit is the index of the edit in the edits slice. + Edit int + // Line is the line concerned; for edit-invalid the edit's own line (or after), which may + // not exist in the text. Edits pass their line numbers through float64, as JavaScript + // numbers do, so a line beyond 2^53 in magnitude comes back rounded to a float64 value + // (Delete(1<<53 + 1) is reported as line 9007199254740992). + Line *int +} + +// EditResult is the result of [ApplyEdits]. +type EditResult struct { + // Text is the edited text. + Text string + // Changed are the line numbers (in the final text) of lines an edit wrote; sorted, unique. + Changed []int + // Warnings has one warning per edit that could not be applied as asked. + Warnings []EditWarning +} + +// --------------------------------------------------------------------------------------------- +// Internal forms + +// rawEditWarning is an edit warning with the line as the JS reference holds it: any number an +// invalid edit carried (behind the JSON door it may be negative or fractional), not only a +// real line number. +type rawEditWarning struct { + code EditWarningCode + edit int + line *float64 +} + +// rawEditResult is the result of applyEditsRaw before it is typed or written as JSON. +type rawEditResult struct { + text string + changed []int + warnings []rawEditWarning +} + +// result is the typed form. Typed edits carry int lines, so every line is a whole number in +// int range; the conversion saturates anyway. +func (r rawEditResult) result() EditResult { + out := EditResult{Text: r.text, Changed: r.changed, Warnings: make([]EditWarning, 0, len(r.warnings))} + for _, w := range r.warnings { + ew := EditWarning{Code: w.code, Edit: w.edit} + if w.line != nil { + n := saturatingInt(*w.line) + ew.Line = &n + } + out.Warnings = append(out.Warnings, ew) + } + if out.Changed == nil { + out.Changed = []int{} + } + return out +} + +// saturatingInt converts a float to int, clamping to the int range (NaN gives 0). +func saturatingInt(f float64) int { + const maxInt = int(^uint(0) >> 1) + switch { + case f != f: + return 0 + case f >= float64(maxInt): + return maxInt + case f <= float64(-maxInt-1): + return -maxInt - 1 + } + return int(f) +} diff --git a/go/unicode.go b/go/unicode.go new file mode 100644 index 0000000..7aeaa1a --- /dev/null +++ b/go/unicode.go @@ -0,0 +1,429 @@ +package trackparse + +// Unicode lookups over the generated tables in unicode_gen.go: general categories (R0.6), JS +// toLowerCase() (R0.4) and NFC/NFD (R1, R0.4). The tables come from Node, the reference engine, +// so the results do not depend on the Go toolchain's Unicode version. Never use +// unicode.IsLetter, unicode.IsUpper, strings.ToLower or golang.org/x/text here. +// +// Every function is total: invalid UTF-8 is read as U+FFFD per bad byte, as `for range` does, +// and nothing panics. + +import ( + "slices" + "unicode/utf8" +) + +// uniRange is an inclusive range of code points. +type uniRange struct{ lo, hi rune } + +// lowerRun maps first, first+step, ..., up to last, each to itself plus delta. +type lowerRun struct { + first, last rune + step uint8 + delta int32 +} + +// lowerMulti is a code point whose lowercase is several code points. +type lowerMulti struct { + cp rune + to string +} + +// cccRange gives the combining class rank of an inclusive range of code points. +type cccRange struct { + lo, hi rune + rank uint8 +} + +// decompEntry is the full canonical decomposition of one code point. +type decompEntry struct { + cp rune + to string +} + +// composePair is a canonical composition: first + second -> composite. +type composePair struct{ first, second, composite rune } + +// uniInRanges reports whether r is in one of the sorted, disjoint ranges. +func uniInRanges(table []uniRange, r rune) bool { + lo, hi := 0, len(table) + for lo < hi { + m := int(uint(lo+hi) >> 1) + switch e := table[m]; { + case r < e.lo: + hi = m + case r > e.hi: + lo = m + 1 + default: + return true + } + } + return false +} + +// isLetter is the R0.6 letter test: general category L, as JS /\p{L}/u. +func isLetter(r rune) bool { + if r < 0x80 { + return r|0x20 >= 'a' && r|0x20 <= 'z' + } + return uniInRanges(uniLetter, r) +} + +// isUpperLetter is the R6.10 uppercase test: general category Lu, as JS /\p{Lu}/u. +func isUpperLetter(r rune) bool { + if r < 0x80 { + return r >= 'A' && r <= 'Z' + } + return uniInRanges(uniUpper, r) +} + +// --------------------------------------------------------------------------- +// R0.4: JS String.prototype.toLowerCase(). + +// appendLower appends the lowercase of one code point out of context. +func appendLower(out []byte, r rune) []byte { + if r < 0x80 { + if r >= 'A' && r <= 'Z' { + r += 'a' - 'A' + } + return append(out, byte(r)) + } + // The last run that starts at or before r. + i, _ := slices.BinarySearchFunc(uniLower, r, func(e lowerRun, t rune) int { + if e.first <= t { + return -1 + } + return 1 + }) + if i > 0 { + e := uniLower[i-1] + if r <= e.last && (r-e.first)%rune(e.step) == 0 { + return utf8.AppendRune(out, r+e.delta) + } + } + if j, ok := slices.BinarySearchFunc(uniLowerMulti, r, func(e lowerMulti, t rune) int { + return int(e.cp - t) + }); ok { + return append(out, uniLowerMulti[j].to...) + } + return utf8.AppendRune(out, r) +} + +// casedBefore is the final-sigma rule's "a cased letter precedes", looking back through +// case-ignorable code points. A code point that is both cased and case-ignorable (U+0345, +// modifier letters) is skipped, as in ICU, which is what JS engines run. +func casedBefore(s string) bool { + for len(s) > 0 { + r, n := utf8.DecodeLastRuneInString(s) + if !uniInRanges(uniCaseIgnorable, r) { + return uniInRanges(uniCased, r) + } + s = s[:len(s)-n] + } + return false +} + +// casedAfter is casedBefore looking forward. +func casedAfter(s string) bool { + for _, r := range s { + if !uniInRanges(uniCaseIgnorable, r) { + return uniInRanges(uniCased, r) + } + } + return false +} + +// jsToLower is JS toLowerCase() (R0.4), from the generated tables. The one context rule: +// U+03A3 is U+03C2 after a cased letter when no cased letter follows (Final_Sigma), else U+03C3. +func jsToLower(s string) string { + ascii, upper := true, false + for i := 0; i < len(s); i++ { + c := s[i] + if c >= 0x80 { + ascii = false + break + } + if c >= 'A' && c <= 'Z' { + upper = true + } + } + if ascii && !upper { + return s + } + out := make([]byte, 0, len(s)) + if ascii { + for i := 0; i < len(s); i++ { + c := s[i] + if c >= 'A' && c <= 'Z' { + c += 'a' - 'A' + } + out = append(out, c) + } + return string(out) + } + for i, r := range s { + if r != 0x3a3 { + out = appendLower(out, r) + continue + } + if casedBefore(s[:i]) && !casedAfter(s[i+2:]) { + out = utf8.AppendRune(out, 0x3c2) + } else { + out = utf8.AppendRune(out, 0x3c3) + } + } + return string(out) +} + +// --------------------------------------------------------------------------- +// R1, R0.4: canonical normalization (Unicode Standard Annex #15), identical to JS +// String.prototype.normalize("NFC") and normalize("NFD"). + +// Hangul syllables, decomposed and composed algorithmically (Unicode 3.12). +const ( + hangulSBase = 0xac00 + hangulLBase = 0x1100 + hangulVBase = 0x1161 + hangulTBase = 0x11a7 + hangulLCount = 19 + hangulVCount = 21 + hangulTCount = 28 + hangulNCount = hangulVCount * hangulTCount + hangulSCount = hangulLCount * hangulNCount +) + +// combiningClass is the canonical combining class rank of r (0 for starters). Only meaningful for code +// points that are their own NFD, and for the NFC quick check (see uniCCC). +func combiningClass(r rune) uint8 { + if r < uniQuickMin { + return 0 + } + lo, hi := 0, len(uniCCC) + for lo < hi { + m := int(uint(lo+hi) >> 1) + switch e := uniCCC[m]; { + case r < e.lo: + hi = m + case r > e.hi: + lo = m + 1 + default: + return e.rank + } + } + return 0 +} + +// uniDecomposition returns the full canonical decomposition of r from the table, or "" when r has +// none (Hangul syllables are handled by the caller). +func uniDecomposition(r rune) string { + if r < uniQuickMin { + return "" + } + if i, ok := slices.BinarySearchFunc(uniDecomp, r, func(e decompEntry, t rune) int { + return int(e.cp - t) + }); ok { + return uniDecomp[i].to + } + return "" +} + +func isHangulSyllable(r rune) bool { return r >= hangulSBase && r < hangulSBase+hangulSCount } + +// composeTwo returns the primary composite of a + b, if there is one. +func composeTwo(a, b rune) (rune, bool) { + // Hangul: L + V -> LV, LV + T -> LVT. + if a >= hangulLBase && a < hangulLBase+hangulLCount && b >= hangulVBase && b < hangulVBase+hangulVCount { + return hangulSBase + ((a-hangulLBase)*hangulVCount+(b-hangulVBase))*hangulTCount, true + } + if isHangulSyllable(a) && (a-hangulSBase)%hangulTCount == 0 && b > hangulTBase && b < hangulTBase+hangulTCount { + return a + (b - hangulTBase), true + } + i, ok := slices.BinarySearchFunc(uniCompose, [2]rune{a, b}, func(e composePair, t [2]rune) int { + if e.first != t[0] { + return int(e.first - t[0]) + } + return int(e.second - t[1]) + }) + if !ok { + return 0, false + } + return uniCompose[i].composite, true +} + +// uniIsASCII reports whether s is all ASCII bytes. +func uniIsASCII(s string) bool { + for i := 0; i < len(s); i++ { + if s[i] >= 0x80 { + return false + } + } + return true +} + +// nfdQuick reports whether s is already NFD: valid UTF-8, nothing that decomposes and the +// non-starters in canonical order. +func nfdQuick(s string) bool { + var last uint8 + for i := 0; i < len(s); { + r, n := rune(s[i]), 1 + if r >= utf8.RuneSelf { + r, n = utf8.DecodeRuneInString(s[i:]) + if r == utf8.RuneError && n == 1 { + return false + } + } + i += n + if r < uniQuickMin { + last = 0 + continue + } + if isHangulSyllable(r) || uniDecomposition(r) != "" { + return false + } + cc := combiningClass(r) + if cc != 0 && last > cc { + return false + } + last = cc + } + return true +} + +// nfcQuick is the NFC quick check of UAX #15 section 9, with Maybe treated as No: true only when +// s is certainly NFC. +func nfcQuick(s string) bool { + var last uint8 + for i := 0; i < len(s); { + r, n := rune(s[i]), 1 + if r >= utf8.RuneSelf { + r, n = utf8.DecodeRuneInString(s[i:]) + if r == utf8.RuneError && n == 1 { + return false + } + } + i += n + if r < uniQuickMin { + last = 0 + continue + } + if uniInRanges(uniNFCNo, r) || uniInRanges(uniComposeSecond, r) { + return false + } + cc := combiningClass(r) + if cc != 0 && last > cc { + return false + } + last = cc + } + return true +} + +// nfdRunes returns the canonical decomposition of s in canonical order (NFD as runes). +func nfdRunes(s string) []rune { + buf := make([]rune, 0, len(s)+len(s)/2) + for _, r := range s { + switch { + case r < uniQuickMin: + buf = append(buf, r) + case isHangulSyllable(r): + si := r - hangulSBase + buf = append(buf, hangulLBase+si/hangulNCount, hangulVBase+(si%hangulNCount)/hangulTCount) + if t := si % hangulTCount; t != 0 { + buf = append(buf, hangulTBase+t) + } + default: + if d := uniDecomposition(r); d != "" { + for _, x := range d { + buf = append(buf, x) + } + } else { + buf = append(buf, r) + } + } + } + canonicalOrder(buf) + return buf +} + +// canonicalOrder applies the canonical ordering algorithm: each run of non-starters is sorted by +// combining class, stably. +func canonicalOrder(buf []rune) { + for i := 0; i < len(buf); { + if combiningClass(buf[i]) == 0 { + i++ + continue + } + j := i + 1 + for j < len(buf) && combiningClass(buf[j]) != 0 { + j++ + } + run := buf[i:j] + if len(run) <= 8 { + // Insertion sort: stable, and runs are almost always short. + for k := 1; k < len(run); k++ { + x := run[k] + cx := combiningClass(x) + m := k + for m > 0 && combiningClass(run[m-1]) > cx { + run[m] = run[m-1] + m-- + } + run[m] = x + } + } else { + slices.SortStableFunc(run, func(a, b rune) int { return int(combiningClass(a)) - int(combiningClass(b)) }) + } + i = j + } +} + +// canonicalCompose applies the canonical composition algorithm to decomposed, canonically ordered +// runes, in place, and returns the composed prefix. +func canonicalCompose(buf []rune) []rune { + starter := -1 // index in the output of the last starter, -1 before the first + var last uint8 + w := 0 + for _, c := range buf { + if c < uniQuickMin { + // A starter that composes with nothing before it. + starter, last = w, 0 + buf[w] = c + w++ + continue + } + cc := combiningClass(c) + if starter >= 0 { + // c is blocked from the starter when something sits between them whose class is 0 + // or not lower than c's. + if w-1 == starter || (last != 0 && last < cc) { + if p, ok := composeTwo(buf[starter], c); ok { + buf[starter] = p + continue + } + } + } + if cc == 0 { + starter = w + } + last = cc + buf[w] = c + w++ + } + return buf[:w] +} + +// nfd is JS s.normalize("NFD"). It returns s itself, without allocating, when s is already NFD. +func nfd(s string) string { + if uniIsASCII(s) || nfdQuick(s) { + return s + } + return string(nfdRunes(s)) +} + +// nfc is JS s.normalize("NFC"). It returns s itself, without allocating, when s is already NFC. +func nfc(s string) string { + if uniIsASCII(s) || nfcQuick(s) { + return s + } + return string(canonicalCompose(nfdRunes(s))) +} diff --git a/go/unicode_gen.go b/go/unicode_gen.go new file mode 100644 index 0000000..a391769 --- /dev/null +++ b/go/unicode_gen.go @@ -0,0 +1,1306 @@ +// Code generated by scripts/gen_unicode.mjs; DO NOT EDIT. +// Run `node scripts/gen_unicode.mjs` in go/ to regenerate. +// +// Tables taken from the JS reference engine (Node), so the Unicode version is Node's and not +// the Go toolchain's: categories L and Lu (R0.6), toLowerCase() (R0.4) and NFC/NFD (R1, R0.4). +// The method behind the combining class ranks is described in scripts/gen_unicode.mjs. +// Unicode 17.0 + +package trackparse + +// unicodeVersion is the Unicode version of Node's tables these were generated from. +const unicodeVersion = "17.0" + +// uniLetter: general category L (Lu, Ll, Lt, Lm, Lo), JS /\p{L}/u. +var uniLetter = []uniRange{ + {0x41, 0x5a}, {0x61, 0x7a}, {0xaa, 0xaa}, {0xb5, 0xb5}, {0xba, 0xba}, {0xc0, 0xd6}, + {0xd8, 0xf6}, {0xf8, 0x2c1}, {0x2c6, 0x2d1}, {0x2e0, 0x2e4}, {0x2ec, 0x2ec}, {0x2ee, 0x2ee}, + {0x370, 0x374}, {0x376, 0x377}, {0x37a, 0x37d}, {0x37f, 0x37f}, {0x386, 0x386}, {0x388, 0x38a}, + {0x38c, 0x38c}, {0x38e, 0x3a1}, {0x3a3, 0x3f5}, {0x3f7, 0x481}, {0x48a, 0x52f}, {0x531, 0x556}, + {0x559, 0x559}, {0x560, 0x588}, {0x5d0, 0x5ea}, {0x5ef, 0x5f2}, {0x620, 0x64a}, {0x66e, 0x66f}, + {0x671, 0x6d3}, {0x6d5, 0x6d5}, {0x6e5, 0x6e6}, {0x6ee, 0x6ef}, {0x6fa, 0x6fc}, {0x6ff, 0x6ff}, + {0x710, 0x710}, {0x712, 0x72f}, {0x74d, 0x7a5}, {0x7b1, 0x7b1}, {0x7ca, 0x7ea}, {0x7f4, 0x7f5}, + {0x7fa, 0x7fa}, {0x800, 0x815}, {0x81a, 0x81a}, {0x824, 0x824}, {0x828, 0x828}, {0x840, 0x858}, + {0x860, 0x86a}, {0x870, 0x887}, {0x889, 0x88f}, {0x8a0, 0x8c9}, {0x904, 0x939}, {0x93d, 0x93d}, + {0x950, 0x950}, {0x958, 0x961}, {0x971, 0x980}, {0x985, 0x98c}, {0x98f, 0x990}, {0x993, 0x9a8}, + {0x9aa, 0x9b0}, {0x9b2, 0x9b2}, {0x9b6, 0x9b9}, {0x9bd, 0x9bd}, {0x9ce, 0x9ce}, {0x9dc, 0x9dd}, + {0x9df, 0x9e1}, {0x9f0, 0x9f1}, {0x9fc, 0x9fc}, {0xa05, 0xa0a}, {0xa0f, 0xa10}, {0xa13, 0xa28}, + {0xa2a, 0xa30}, {0xa32, 0xa33}, {0xa35, 0xa36}, {0xa38, 0xa39}, {0xa59, 0xa5c}, {0xa5e, 0xa5e}, + {0xa72, 0xa74}, {0xa85, 0xa8d}, {0xa8f, 0xa91}, {0xa93, 0xaa8}, {0xaaa, 0xab0}, {0xab2, 0xab3}, + {0xab5, 0xab9}, {0xabd, 0xabd}, {0xad0, 0xad0}, {0xae0, 0xae1}, {0xaf9, 0xaf9}, {0xb05, 0xb0c}, + {0xb0f, 0xb10}, {0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb32, 0xb33}, {0xb35, 0xb39}, {0xb3d, 0xb3d}, + {0xb5c, 0xb5d}, {0xb5f, 0xb61}, {0xb71, 0xb71}, {0xb83, 0xb83}, {0xb85, 0xb8a}, {0xb8e, 0xb90}, + {0xb92, 0xb95}, {0xb99, 0xb9a}, {0xb9c, 0xb9c}, {0xb9e, 0xb9f}, {0xba3, 0xba4}, {0xba8, 0xbaa}, + {0xbae, 0xbb9}, {0xbd0, 0xbd0}, {0xc05, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28}, {0xc2a, 0xc39}, + {0xc3d, 0xc3d}, {0xc58, 0xc5a}, {0xc5c, 0xc5d}, {0xc60, 0xc61}, {0xc80, 0xc80}, {0xc85, 0xc8c}, + {0xc8e, 0xc90}, {0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9}, {0xcbd, 0xcbd}, {0xcdc, 0xcde}, + {0xce0, 0xce1}, {0xcf1, 0xcf2}, {0xd04, 0xd0c}, {0xd0e, 0xd10}, {0xd12, 0xd3a}, {0xd3d, 0xd3d}, + {0xd4e, 0xd4e}, {0xd54, 0xd56}, {0xd5f, 0xd61}, {0xd7a, 0xd7f}, {0xd85, 0xd96}, {0xd9a, 0xdb1}, + {0xdb3, 0xdbb}, {0xdbd, 0xdbd}, {0xdc0, 0xdc6}, {0xe01, 0xe30}, {0xe32, 0xe33}, {0xe40, 0xe46}, + {0xe81, 0xe82}, {0xe84, 0xe84}, {0xe86, 0xe8a}, {0xe8c, 0xea3}, {0xea5, 0xea5}, {0xea7, 0xeb0}, + {0xeb2, 0xeb3}, {0xebd, 0xebd}, {0xec0, 0xec4}, {0xec6, 0xec6}, {0xedc, 0xedf}, {0xf00, 0xf00}, + {0xf40, 0xf47}, {0xf49, 0xf6c}, {0xf88, 0xf8c}, {0x1000, 0x102a}, {0x103f, 0x103f}, {0x1050, 0x1055}, + {0x105a, 0x105d}, {0x1061, 0x1061}, {0x1065, 0x1066}, {0x106e, 0x1070}, {0x1075, 0x1081}, {0x108e, 0x108e}, + {0x10a0, 0x10c5}, {0x10c7, 0x10c7}, {0x10cd, 0x10cd}, {0x10d0, 0x10fa}, {0x10fc, 0x1248}, {0x124a, 0x124d}, + {0x1250, 0x1256}, {0x1258, 0x1258}, {0x125a, 0x125d}, {0x1260, 0x1288}, {0x128a, 0x128d}, {0x1290, 0x12b0}, + {0x12b2, 0x12b5}, {0x12b8, 0x12be}, {0x12c0, 0x12c0}, {0x12c2, 0x12c5}, {0x12c8, 0x12d6}, {0x12d8, 0x1310}, + {0x1312, 0x1315}, {0x1318, 0x135a}, {0x1380, 0x138f}, {0x13a0, 0x13f5}, {0x13f8, 0x13fd}, {0x1401, 0x166c}, + {0x166f, 0x167f}, {0x1681, 0x169a}, {0x16a0, 0x16ea}, {0x16f1, 0x16f8}, {0x1700, 0x1711}, {0x171f, 0x1731}, + {0x1740, 0x1751}, {0x1760, 0x176c}, {0x176e, 0x1770}, {0x1780, 0x17b3}, {0x17d7, 0x17d7}, {0x17dc, 0x17dc}, + {0x1820, 0x1878}, {0x1880, 0x1884}, {0x1887, 0x18a8}, {0x18aa, 0x18aa}, {0x18b0, 0x18f5}, {0x1900, 0x191e}, + {0x1950, 0x196d}, {0x1970, 0x1974}, {0x1980, 0x19ab}, {0x19b0, 0x19c9}, {0x1a00, 0x1a16}, {0x1a20, 0x1a54}, + {0x1aa7, 0x1aa7}, {0x1b05, 0x1b33}, {0x1b45, 0x1b4c}, {0x1b83, 0x1ba0}, {0x1bae, 0x1baf}, {0x1bba, 0x1be5}, + {0x1c00, 0x1c23}, {0x1c4d, 0x1c4f}, {0x1c5a, 0x1c7d}, {0x1c80, 0x1c8a}, {0x1c90, 0x1cba}, {0x1cbd, 0x1cbf}, + {0x1ce9, 0x1cec}, {0x1cee, 0x1cf3}, {0x1cf5, 0x1cf6}, {0x1cfa, 0x1cfa}, {0x1d00, 0x1dbf}, {0x1e00, 0x1f15}, + {0x1f18, 0x1f1d}, {0x1f20, 0x1f45}, {0x1f48, 0x1f4d}, {0x1f50, 0x1f57}, {0x1f59, 0x1f59}, {0x1f5b, 0x1f5b}, + {0x1f5d, 0x1f5d}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc}, {0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4}, + {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3}, {0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc}, + {0x2071, 0x2071}, {0x207f, 0x207f}, {0x2090, 0x209c}, {0x2102, 0x2102}, {0x2107, 0x2107}, {0x210a, 0x2113}, + {0x2115, 0x2115}, {0x2119, 0x211d}, {0x2124, 0x2124}, {0x2126, 0x2126}, {0x2128, 0x2128}, {0x212a, 0x212d}, + {0x212f, 0x2139}, {0x213c, 0x213f}, {0x2145, 0x2149}, {0x214e, 0x214e}, {0x2183, 0x2184}, {0x2c00, 0x2ce4}, + {0x2ceb, 0x2cee}, {0x2cf2, 0x2cf3}, {0x2d00, 0x2d25}, {0x2d27, 0x2d27}, {0x2d2d, 0x2d2d}, {0x2d30, 0x2d67}, + {0x2d6f, 0x2d6f}, {0x2d80, 0x2d96}, {0x2da0, 0x2da6}, {0x2da8, 0x2dae}, {0x2db0, 0x2db6}, {0x2db8, 0x2dbe}, + {0x2dc0, 0x2dc6}, {0x2dc8, 0x2dce}, {0x2dd0, 0x2dd6}, {0x2dd8, 0x2dde}, {0x2e2f, 0x2e2f}, {0x3005, 0x3006}, + {0x3031, 0x3035}, {0x303b, 0x303c}, {0x3041, 0x3096}, {0x309d, 0x309f}, {0x30a1, 0x30fa}, {0x30fc, 0x30ff}, + {0x3105, 0x312f}, {0x3131, 0x318e}, {0x31a0, 0x31bf}, {0x31f0, 0x31ff}, {0x3400, 0x4dbf}, {0x4e00, 0xa48c}, + {0xa4d0, 0xa4fd}, {0xa500, 0xa60c}, {0xa610, 0xa61f}, {0xa62a, 0xa62b}, {0xa640, 0xa66e}, {0xa67f, 0xa69d}, + {0xa6a0, 0xa6e5}, {0xa717, 0xa71f}, {0xa722, 0xa788}, {0xa78b, 0xa7dc}, {0xa7f1, 0xa801}, {0xa803, 0xa805}, + {0xa807, 0xa80a}, {0xa80c, 0xa822}, {0xa840, 0xa873}, {0xa882, 0xa8b3}, {0xa8f2, 0xa8f7}, {0xa8fb, 0xa8fb}, + {0xa8fd, 0xa8fe}, {0xa90a, 0xa925}, {0xa930, 0xa946}, {0xa960, 0xa97c}, {0xa984, 0xa9b2}, {0xa9cf, 0xa9cf}, + {0xa9e0, 0xa9e4}, {0xa9e6, 0xa9ef}, {0xa9fa, 0xa9fe}, {0xaa00, 0xaa28}, {0xaa40, 0xaa42}, {0xaa44, 0xaa4b}, + {0xaa60, 0xaa76}, {0xaa7a, 0xaa7a}, {0xaa7e, 0xaaaf}, {0xaab1, 0xaab1}, {0xaab5, 0xaab6}, {0xaab9, 0xaabd}, + {0xaac0, 0xaac0}, {0xaac2, 0xaac2}, {0xaadb, 0xaadd}, {0xaae0, 0xaaea}, {0xaaf2, 0xaaf4}, {0xab01, 0xab06}, + {0xab09, 0xab0e}, {0xab11, 0xab16}, {0xab20, 0xab26}, {0xab28, 0xab2e}, {0xab30, 0xab5a}, {0xab5c, 0xab69}, + {0xab70, 0xabe2}, {0xac00, 0xd7a3}, {0xd7b0, 0xd7c6}, {0xd7cb, 0xd7fb}, {0xf900, 0xfa6d}, {0xfa70, 0xfad9}, + {0xfb00, 0xfb06}, {0xfb13, 0xfb17}, {0xfb1d, 0xfb1d}, {0xfb1f, 0xfb28}, {0xfb2a, 0xfb36}, {0xfb38, 0xfb3c}, + {0xfb3e, 0xfb3e}, {0xfb40, 0xfb41}, {0xfb43, 0xfb44}, {0xfb46, 0xfbb1}, {0xfbd3, 0xfd3d}, {0xfd50, 0xfd8f}, + {0xfd92, 0xfdc7}, {0xfdf0, 0xfdfb}, {0xfe70, 0xfe74}, {0xfe76, 0xfefc}, {0xff21, 0xff3a}, {0xff41, 0xff5a}, + {0xff66, 0xffbe}, {0xffc2, 0xffc7}, {0xffca, 0xffcf}, {0xffd2, 0xffd7}, {0xffda, 0xffdc}, {0x10000, 0x1000b}, + {0x1000d, 0x10026}, {0x10028, 0x1003a}, {0x1003c, 0x1003d}, {0x1003f, 0x1004d}, {0x10050, 0x1005d}, {0x10080, 0x100fa}, + {0x10280, 0x1029c}, {0x102a0, 0x102d0}, {0x10300, 0x1031f}, {0x1032d, 0x10340}, {0x10342, 0x10349}, {0x10350, 0x10375}, + {0x10380, 0x1039d}, {0x103a0, 0x103c3}, {0x103c8, 0x103cf}, {0x10400, 0x1049d}, {0x104b0, 0x104d3}, {0x104d8, 0x104fb}, + {0x10500, 0x10527}, {0x10530, 0x10563}, {0x10570, 0x1057a}, {0x1057c, 0x1058a}, {0x1058c, 0x10592}, {0x10594, 0x10595}, + {0x10597, 0x105a1}, {0x105a3, 0x105b1}, {0x105b3, 0x105b9}, {0x105bb, 0x105bc}, {0x105c0, 0x105f3}, {0x10600, 0x10736}, + {0x10740, 0x10755}, {0x10760, 0x10767}, {0x10780, 0x10785}, {0x10787, 0x107b0}, {0x107b2, 0x107ba}, {0x10800, 0x10805}, + {0x10808, 0x10808}, {0x1080a, 0x10835}, {0x10837, 0x10838}, {0x1083c, 0x1083c}, {0x1083f, 0x10855}, {0x10860, 0x10876}, + {0x10880, 0x1089e}, {0x108e0, 0x108f2}, {0x108f4, 0x108f5}, {0x10900, 0x10915}, {0x10920, 0x10939}, {0x10940, 0x10959}, + {0x10980, 0x109b7}, {0x109be, 0x109bf}, {0x10a00, 0x10a00}, {0x10a10, 0x10a13}, {0x10a15, 0x10a17}, {0x10a19, 0x10a35}, + {0x10a60, 0x10a7c}, {0x10a80, 0x10a9c}, {0x10ac0, 0x10ac7}, {0x10ac9, 0x10ae4}, {0x10b00, 0x10b35}, {0x10b40, 0x10b55}, + {0x10b60, 0x10b72}, {0x10b80, 0x10b91}, {0x10c00, 0x10c48}, {0x10c80, 0x10cb2}, {0x10cc0, 0x10cf2}, {0x10d00, 0x10d23}, + {0x10d4a, 0x10d65}, {0x10d6f, 0x10d85}, {0x10e80, 0x10ea9}, {0x10eb0, 0x10eb1}, {0x10ec2, 0x10ec7}, {0x10f00, 0x10f1c}, + {0x10f27, 0x10f27}, {0x10f30, 0x10f45}, {0x10f70, 0x10f81}, {0x10fb0, 0x10fc4}, {0x10fe0, 0x10ff6}, {0x11003, 0x11037}, + {0x11071, 0x11072}, {0x11075, 0x11075}, {0x11083, 0x110af}, {0x110d0, 0x110e8}, {0x11103, 0x11126}, {0x11144, 0x11144}, + {0x11147, 0x11147}, {0x11150, 0x11172}, {0x11176, 0x11176}, {0x11183, 0x111b2}, {0x111c1, 0x111c4}, {0x111da, 0x111da}, + {0x111dc, 0x111dc}, {0x11200, 0x11211}, {0x11213, 0x1122b}, {0x1123f, 0x11240}, {0x11280, 0x11286}, {0x11288, 0x11288}, + {0x1128a, 0x1128d}, {0x1128f, 0x1129d}, {0x1129f, 0x112a8}, {0x112b0, 0x112de}, {0x11305, 0x1130c}, {0x1130f, 0x11310}, + {0x11313, 0x11328}, {0x1132a, 0x11330}, {0x11332, 0x11333}, {0x11335, 0x11339}, {0x1133d, 0x1133d}, {0x11350, 0x11350}, + {0x1135d, 0x11361}, {0x11380, 0x11389}, {0x1138b, 0x1138b}, {0x1138e, 0x1138e}, {0x11390, 0x113b5}, {0x113b7, 0x113b7}, + {0x113d1, 0x113d1}, {0x113d3, 0x113d3}, {0x11400, 0x11434}, {0x11447, 0x1144a}, {0x1145f, 0x11461}, {0x11480, 0x114af}, + {0x114c4, 0x114c5}, {0x114c7, 0x114c7}, {0x11580, 0x115ae}, {0x115d8, 0x115db}, {0x11600, 0x1162f}, {0x11644, 0x11644}, + {0x11680, 0x116aa}, {0x116b8, 0x116b8}, {0x11700, 0x1171a}, {0x11740, 0x11746}, {0x11800, 0x1182b}, {0x118a0, 0x118df}, + {0x118ff, 0x11906}, {0x11909, 0x11909}, {0x1190c, 0x11913}, {0x11915, 0x11916}, {0x11918, 0x1192f}, {0x1193f, 0x1193f}, + {0x11941, 0x11941}, {0x119a0, 0x119a7}, {0x119aa, 0x119d0}, {0x119e1, 0x119e1}, {0x119e3, 0x119e3}, {0x11a00, 0x11a00}, + {0x11a0b, 0x11a32}, {0x11a3a, 0x11a3a}, {0x11a50, 0x11a50}, {0x11a5c, 0x11a89}, {0x11a9d, 0x11a9d}, {0x11ab0, 0x11af8}, + {0x11bc0, 0x11be0}, {0x11c00, 0x11c08}, {0x11c0a, 0x11c2e}, {0x11c40, 0x11c40}, {0x11c72, 0x11c8f}, {0x11d00, 0x11d06}, + {0x11d08, 0x11d09}, {0x11d0b, 0x11d30}, {0x11d46, 0x11d46}, {0x11d60, 0x11d65}, {0x11d67, 0x11d68}, {0x11d6a, 0x11d89}, + {0x11d98, 0x11d98}, {0x11db0, 0x11ddb}, {0x11ee0, 0x11ef2}, {0x11f02, 0x11f02}, {0x11f04, 0x11f10}, {0x11f12, 0x11f33}, + {0x11fb0, 0x11fb0}, {0x12000, 0x12399}, {0x12480, 0x12543}, {0x12f90, 0x12ff0}, {0x13000, 0x1342f}, {0x13441, 0x13446}, + {0x13460, 0x143fa}, {0x14400, 0x14646}, {0x16100, 0x1611d}, {0x16800, 0x16a38}, {0x16a40, 0x16a5e}, {0x16a70, 0x16abe}, + {0x16ad0, 0x16aed}, {0x16b00, 0x16b2f}, {0x16b40, 0x16b43}, {0x16b63, 0x16b77}, {0x16b7d, 0x16b8f}, {0x16d40, 0x16d6c}, + {0x16e40, 0x16e7f}, {0x16ea0, 0x16eb8}, {0x16ebb, 0x16ed3}, {0x16f00, 0x16f4a}, {0x16f50, 0x16f50}, {0x16f93, 0x16f9f}, + {0x16fe0, 0x16fe1}, {0x16fe3, 0x16fe3}, {0x16ff2, 0x16ff3}, {0x17000, 0x18cd5}, {0x18cff, 0x18d1e}, {0x18d80, 0x18df2}, + {0x1aff0, 0x1aff3}, {0x1aff5, 0x1affb}, {0x1affd, 0x1affe}, {0x1b000, 0x1b122}, {0x1b132, 0x1b132}, {0x1b150, 0x1b152}, + {0x1b155, 0x1b155}, {0x1b164, 0x1b167}, {0x1b170, 0x1b2fb}, {0x1bc00, 0x1bc6a}, {0x1bc70, 0x1bc7c}, {0x1bc80, 0x1bc88}, + {0x1bc90, 0x1bc99}, {0x1d400, 0x1d454}, {0x1d456, 0x1d49c}, {0x1d49e, 0x1d49f}, {0x1d4a2, 0x1d4a2}, {0x1d4a5, 0x1d4a6}, + {0x1d4a9, 0x1d4ac}, {0x1d4ae, 0x1d4b9}, {0x1d4bb, 0x1d4bb}, {0x1d4bd, 0x1d4c3}, {0x1d4c5, 0x1d505}, {0x1d507, 0x1d50a}, + {0x1d50d, 0x1d514}, {0x1d516, 0x1d51c}, {0x1d51e, 0x1d539}, {0x1d53b, 0x1d53e}, {0x1d540, 0x1d544}, {0x1d546, 0x1d546}, + {0x1d54a, 0x1d550}, {0x1d552, 0x1d6a5}, {0x1d6a8, 0x1d6c0}, {0x1d6c2, 0x1d6da}, {0x1d6dc, 0x1d6fa}, {0x1d6fc, 0x1d714}, + {0x1d716, 0x1d734}, {0x1d736, 0x1d74e}, {0x1d750, 0x1d76e}, {0x1d770, 0x1d788}, {0x1d78a, 0x1d7a8}, {0x1d7aa, 0x1d7c2}, + {0x1d7c4, 0x1d7cb}, {0x1df00, 0x1df1e}, {0x1df25, 0x1df2a}, {0x1e030, 0x1e06d}, {0x1e100, 0x1e12c}, {0x1e137, 0x1e13d}, + {0x1e14e, 0x1e14e}, {0x1e290, 0x1e2ad}, {0x1e2c0, 0x1e2eb}, {0x1e4d0, 0x1e4eb}, {0x1e5d0, 0x1e5ed}, {0x1e5f0, 0x1e5f0}, + {0x1e6c0, 0x1e6de}, {0x1e6e0, 0x1e6e2}, {0x1e6e4, 0x1e6e5}, {0x1e6e7, 0x1e6ed}, {0x1e6f0, 0x1e6f4}, {0x1e6fe, 0x1e6ff}, + {0x1e7e0, 0x1e7e6}, {0x1e7e8, 0x1e7eb}, {0x1e7ed, 0x1e7ee}, {0x1e7f0, 0x1e7fe}, {0x1e800, 0x1e8c4}, {0x1e900, 0x1e943}, + {0x1e94b, 0x1e94b}, {0x1ee00, 0x1ee03}, {0x1ee05, 0x1ee1f}, {0x1ee21, 0x1ee22}, {0x1ee24, 0x1ee24}, {0x1ee27, 0x1ee27}, + {0x1ee29, 0x1ee32}, {0x1ee34, 0x1ee37}, {0x1ee39, 0x1ee39}, {0x1ee3b, 0x1ee3b}, {0x1ee42, 0x1ee42}, {0x1ee47, 0x1ee47}, + {0x1ee49, 0x1ee49}, {0x1ee4b, 0x1ee4b}, {0x1ee4d, 0x1ee4f}, {0x1ee51, 0x1ee52}, {0x1ee54, 0x1ee54}, {0x1ee57, 0x1ee57}, + {0x1ee59, 0x1ee59}, {0x1ee5b, 0x1ee5b}, {0x1ee5d, 0x1ee5d}, {0x1ee5f, 0x1ee5f}, {0x1ee61, 0x1ee62}, {0x1ee64, 0x1ee64}, + {0x1ee67, 0x1ee6a}, {0x1ee6c, 0x1ee72}, {0x1ee74, 0x1ee77}, {0x1ee79, 0x1ee7c}, {0x1ee7e, 0x1ee7e}, {0x1ee80, 0x1ee89}, + {0x1ee8b, 0x1ee9b}, {0x1eea1, 0x1eea3}, {0x1eea5, 0x1eea9}, {0x1eeab, 0x1eebb}, {0x20000, 0x2a6df}, {0x2a700, 0x2b81d}, + {0x2b820, 0x2cead}, {0x2ceb0, 0x2ebe0}, {0x2ebf0, 0x2ee5d}, {0x2f800, 0x2fa1d}, {0x30000, 0x3134a}, {0x31350, 0x33479}, +} + +// uniUpper: general category Lu, JS /\p{Lu}/u. +var uniUpper = []uniRange{ + {0x41, 0x5a}, {0xc0, 0xd6}, {0xd8, 0xde}, {0x100, 0x100}, {0x102, 0x102}, {0x104, 0x104}, + {0x106, 0x106}, {0x108, 0x108}, {0x10a, 0x10a}, {0x10c, 0x10c}, {0x10e, 0x10e}, {0x110, 0x110}, + {0x112, 0x112}, {0x114, 0x114}, {0x116, 0x116}, {0x118, 0x118}, {0x11a, 0x11a}, {0x11c, 0x11c}, + {0x11e, 0x11e}, {0x120, 0x120}, {0x122, 0x122}, {0x124, 0x124}, {0x126, 0x126}, {0x128, 0x128}, + {0x12a, 0x12a}, {0x12c, 0x12c}, {0x12e, 0x12e}, {0x130, 0x130}, {0x132, 0x132}, {0x134, 0x134}, + {0x136, 0x136}, {0x139, 0x139}, {0x13b, 0x13b}, {0x13d, 0x13d}, {0x13f, 0x13f}, {0x141, 0x141}, + {0x143, 0x143}, {0x145, 0x145}, {0x147, 0x147}, {0x14a, 0x14a}, {0x14c, 0x14c}, {0x14e, 0x14e}, + {0x150, 0x150}, {0x152, 0x152}, {0x154, 0x154}, {0x156, 0x156}, {0x158, 0x158}, {0x15a, 0x15a}, + {0x15c, 0x15c}, {0x15e, 0x15e}, {0x160, 0x160}, {0x162, 0x162}, {0x164, 0x164}, {0x166, 0x166}, + {0x168, 0x168}, {0x16a, 0x16a}, {0x16c, 0x16c}, {0x16e, 0x16e}, {0x170, 0x170}, {0x172, 0x172}, + {0x174, 0x174}, {0x176, 0x176}, {0x178, 0x179}, {0x17b, 0x17b}, {0x17d, 0x17d}, {0x181, 0x182}, + {0x184, 0x184}, {0x186, 0x187}, {0x189, 0x18b}, {0x18e, 0x191}, {0x193, 0x194}, {0x196, 0x198}, + {0x19c, 0x19d}, {0x19f, 0x1a0}, {0x1a2, 0x1a2}, {0x1a4, 0x1a4}, {0x1a6, 0x1a7}, {0x1a9, 0x1a9}, + {0x1ac, 0x1ac}, {0x1ae, 0x1af}, {0x1b1, 0x1b3}, {0x1b5, 0x1b5}, {0x1b7, 0x1b8}, {0x1bc, 0x1bc}, + {0x1c4, 0x1c4}, {0x1c7, 0x1c7}, {0x1ca, 0x1ca}, {0x1cd, 0x1cd}, {0x1cf, 0x1cf}, {0x1d1, 0x1d1}, + {0x1d3, 0x1d3}, {0x1d5, 0x1d5}, {0x1d7, 0x1d7}, {0x1d9, 0x1d9}, {0x1db, 0x1db}, {0x1de, 0x1de}, + {0x1e0, 0x1e0}, {0x1e2, 0x1e2}, {0x1e4, 0x1e4}, {0x1e6, 0x1e6}, {0x1e8, 0x1e8}, {0x1ea, 0x1ea}, + {0x1ec, 0x1ec}, {0x1ee, 0x1ee}, {0x1f1, 0x1f1}, {0x1f4, 0x1f4}, {0x1f6, 0x1f8}, {0x1fa, 0x1fa}, + {0x1fc, 0x1fc}, {0x1fe, 0x1fe}, {0x200, 0x200}, {0x202, 0x202}, {0x204, 0x204}, {0x206, 0x206}, + {0x208, 0x208}, {0x20a, 0x20a}, {0x20c, 0x20c}, {0x20e, 0x20e}, {0x210, 0x210}, {0x212, 0x212}, + {0x214, 0x214}, {0x216, 0x216}, {0x218, 0x218}, {0x21a, 0x21a}, {0x21c, 0x21c}, {0x21e, 0x21e}, + {0x220, 0x220}, {0x222, 0x222}, {0x224, 0x224}, {0x226, 0x226}, {0x228, 0x228}, {0x22a, 0x22a}, + {0x22c, 0x22c}, {0x22e, 0x22e}, {0x230, 0x230}, {0x232, 0x232}, {0x23a, 0x23b}, {0x23d, 0x23e}, + {0x241, 0x241}, {0x243, 0x246}, {0x248, 0x248}, {0x24a, 0x24a}, {0x24c, 0x24c}, {0x24e, 0x24e}, + {0x370, 0x370}, {0x372, 0x372}, {0x376, 0x376}, {0x37f, 0x37f}, {0x386, 0x386}, {0x388, 0x38a}, + {0x38c, 0x38c}, {0x38e, 0x38f}, {0x391, 0x3a1}, {0x3a3, 0x3ab}, {0x3cf, 0x3cf}, {0x3d2, 0x3d4}, + {0x3d8, 0x3d8}, {0x3da, 0x3da}, {0x3dc, 0x3dc}, {0x3de, 0x3de}, {0x3e0, 0x3e0}, {0x3e2, 0x3e2}, + {0x3e4, 0x3e4}, {0x3e6, 0x3e6}, {0x3e8, 0x3e8}, {0x3ea, 0x3ea}, {0x3ec, 0x3ec}, {0x3ee, 0x3ee}, + {0x3f4, 0x3f4}, {0x3f7, 0x3f7}, {0x3f9, 0x3fa}, {0x3fd, 0x42f}, {0x460, 0x460}, {0x462, 0x462}, + {0x464, 0x464}, {0x466, 0x466}, {0x468, 0x468}, {0x46a, 0x46a}, {0x46c, 0x46c}, {0x46e, 0x46e}, + {0x470, 0x470}, {0x472, 0x472}, {0x474, 0x474}, {0x476, 0x476}, {0x478, 0x478}, {0x47a, 0x47a}, + {0x47c, 0x47c}, {0x47e, 0x47e}, {0x480, 0x480}, {0x48a, 0x48a}, {0x48c, 0x48c}, {0x48e, 0x48e}, + {0x490, 0x490}, {0x492, 0x492}, {0x494, 0x494}, {0x496, 0x496}, {0x498, 0x498}, {0x49a, 0x49a}, + {0x49c, 0x49c}, {0x49e, 0x49e}, {0x4a0, 0x4a0}, {0x4a2, 0x4a2}, {0x4a4, 0x4a4}, {0x4a6, 0x4a6}, + {0x4a8, 0x4a8}, {0x4aa, 0x4aa}, {0x4ac, 0x4ac}, {0x4ae, 0x4ae}, {0x4b0, 0x4b0}, {0x4b2, 0x4b2}, + {0x4b4, 0x4b4}, {0x4b6, 0x4b6}, {0x4b8, 0x4b8}, {0x4ba, 0x4ba}, {0x4bc, 0x4bc}, {0x4be, 0x4be}, + {0x4c0, 0x4c1}, {0x4c3, 0x4c3}, {0x4c5, 0x4c5}, {0x4c7, 0x4c7}, {0x4c9, 0x4c9}, {0x4cb, 0x4cb}, + {0x4cd, 0x4cd}, {0x4d0, 0x4d0}, {0x4d2, 0x4d2}, {0x4d4, 0x4d4}, {0x4d6, 0x4d6}, {0x4d8, 0x4d8}, + {0x4da, 0x4da}, {0x4dc, 0x4dc}, {0x4de, 0x4de}, {0x4e0, 0x4e0}, {0x4e2, 0x4e2}, {0x4e4, 0x4e4}, + {0x4e6, 0x4e6}, {0x4e8, 0x4e8}, {0x4ea, 0x4ea}, {0x4ec, 0x4ec}, {0x4ee, 0x4ee}, {0x4f0, 0x4f0}, + {0x4f2, 0x4f2}, {0x4f4, 0x4f4}, {0x4f6, 0x4f6}, {0x4f8, 0x4f8}, {0x4fa, 0x4fa}, {0x4fc, 0x4fc}, + {0x4fe, 0x4fe}, {0x500, 0x500}, {0x502, 0x502}, {0x504, 0x504}, {0x506, 0x506}, {0x508, 0x508}, + {0x50a, 0x50a}, {0x50c, 0x50c}, {0x50e, 0x50e}, {0x510, 0x510}, {0x512, 0x512}, {0x514, 0x514}, + {0x516, 0x516}, {0x518, 0x518}, {0x51a, 0x51a}, {0x51c, 0x51c}, {0x51e, 0x51e}, {0x520, 0x520}, + {0x522, 0x522}, {0x524, 0x524}, {0x526, 0x526}, {0x528, 0x528}, {0x52a, 0x52a}, {0x52c, 0x52c}, + {0x52e, 0x52e}, {0x531, 0x556}, {0x10a0, 0x10c5}, {0x10c7, 0x10c7}, {0x10cd, 0x10cd}, {0x13a0, 0x13f5}, + {0x1c89, 0x1c89}, {0x1c90, 0x1cba}, {0x1cbd, 0x1cbf}, {0x1e00, 0x1e00}, {0x1e02, 0x1e02}, {0x1e04, 0x1e04}, + {0x1e06, 0x1e06}, {0x1e08, 0x1e08}, {0x1e0a, 0x1e0a}, {0x1e0c, 0x1e0c}, {0x1e0e, 0x1e0e}, {0x1e10, 0x1e10}, + {0x1e12, 0x1e12}, {0x1e14, 0x1e14}, {0x1e16, 0x1e16}, {0x1e18, 0x1e18}, {0x1e1a, 0x1e1a}, {0x1e1c, 0x1e1c}, + {0x1e1e, 0x1e1e}, {0x1e20, 0x1e20}, {0x1e22, 0x1e22}, {0x1e24, 0x1e24}, {0x1e26, 0x1e26}, {0x1e28, 0x1e28}, + {0x1e2a, 0x1e2a}, {0x1e2c, 0x1e2c}, {0x1e2e, 0x1e2e}, {0x1e30, 0x1e30}, {0x1e32, 0x1e32}, {0x1e34, 0x1e34}, + {0x1e36, 0x1e36}, {0x1e38, 0x1e38}, {0x1e3a, 0x1e3a}, {0x1e3c, 0x1e3c}, {0x1e3e, 0x1e3e}, {0x1e40, 0x1e40}, + {0x1e42, 0x1e42}, {0x1e44, 0x1e44}, {0x1e46, 0x1e46}, {0x1e48, 0x1e48}, {0x1e4a, 0x1e4a}, {0x1e4c, 0x1e4c}, + {0x1e4e, 0x1e4e}, {0x1e50, 0x1e50}, {0x1e52, 0x1e52}, {0x1e54, 0x1e54}, {0x1e56, 0x1e56}, {0x1e58, 0x1e58}, + {0x1e5a, 0x1e5a}, {0x1e5c, 0x1e5c}, {0x1e5e, 0x1e5e}, {0x1e60, 0x1e60}, {0x1e62, 0x1e62}, {0x1e64, 0x1e64}, + {0x1e66, 0x1e66}, {0x1e68, 0x1e68}, {0x1e6a, 0x1e6a}, {0x1e6c, 0x1e6c}, {0x1e6e, 0x1e6e}, {0x1e70, 0x1e70}, + {0x1e72, 0x1e72}, {0x1e74, 0x1e74}, {0x1e76, 0x1e76}, {0x1e78, 0x1e78}, {0x1e7a, 0x1e7a}, {0x1e7c, 0x1e7c}, + {0x1e7e, 0x1e7e}, {0x1e80, 0x1e80}, {0x1e82, 0x1e82}, {0x1e84, 0x1e84}, {0x1e86, 0x1e86}, {0x1e88, 0x1e88}, + {0x1e8a, 0x1e8a}, {0x1e8c, 0x1e8c}, {0x1e8e, 0x1e8e}, {0x1e90, 0x1e90}, {0x1e92, 0x1e92}, {0x1e94, 0x1e94}, + {0x1e9e, 0x1e9e}, {0x1ea0, 0x1ea0}, {0x1ea2, 0x1ea2}, {0x1ea4, 0x1ea4}, {0x1ea6, 0x1ea6}, {0x1ea8, 0x1ea8}, + {0x1eaa, 0x1eaa}, {0x1eac, 0x1eac}, {0x1eae, 0x1eae}, {0x1eb0, 0x1eb0}, {0x1eb2, 0x1eb2}, {0x1eb4, 0x1eb4}, + {0x1eb6, 0x1eb6}, {0x1eb8, 0x1eb8}, {0x1eba, 0x1eba}, {0x1ebc, 0x1ebc}, {0x1ebe, 0x1ebe}, {0x1ec0, 0x1ec0}, + {0x1ec2, 0x1ec2}, {0x1ec4, 0x1ec4}, {0x1ec6, 0x1ec6}, {0x1ec8, 0x1ec8}, {0x1eca, 0x1eca}, {0x1ecc, 0x1ecc}, + {0x1ece, 0x1ece}, {0x1ed0, 0x1ed0}, {0x1ed2, 0x1ed2}, {0x1ed4, 0x1ed4}, {0x1ed6, 0x1ed6}, {0x1ed8, 0x1ed8}, + {0x1eda, 0x1eda}, {0x1edc, 0x1edc}, {0x1ede, 0x1ede}, {0x1ee0, 0x1ee0}, {0x1ee2, 0x1ee2}, {0x1ee4, 0x1ee4}, + {0x1ee6, 0x1ee6}, {0x1ee8, 0x1ee8}, {0x1eea, 0x1eea}, {0x1eec, 0x1eec}, {0x1eee, 0x1eee}, {0x1ef0, 0x1ef0}, + {0x1ef2, 0x1ef2}, {0x1ef4, 0x1ef4}, {0x1ef6, 0x1ef6}, {0x1ef8, 0x1ef8}, {0x1efa, 0x1efa}, {0x1efc, 0x1efc}, + {0x1efe, 0x1efe}, {0x1f08, 0x1f0f}, {0x1f18, 0x1f1d}, {0x1f28, 0x1f2f}, {0x1f38, 0x1f3f}, {0x1f48, 0x1f4d}, + {0x1f59, 0x1f59}, {0x1f5b, 0x1f5b}, {0x1f5d, 0x1f5d}, {0x1f5f, 0x1f5f}, {0x1f68, 0x1f6f}, {0x1fb8, 0x1fbb}, + {0x1fc8, 0x1fcb}, {0x1fd8, 0x1fdb}, {0x1fe8, 0x1fec}, {0x1ff8, 0x1ffb}, {0x2102, 0x2102}, {0x2107, 0x2107}, + {0x210b, 0x210d}, {0x2110, 0x2112}, {0x2115, 0x2115}, {0x2119, 0x211d}, {0x2124, 0x2124}, {0x2126, 0x2126}, + {0x2128, 0x2128}, {0x212a, 0x212d}, {0x2130, 0x2133}, {0x213e, 0x213f}, {0x2145, 0x2145}, {0x2183, 0x2183}, + {0x2c00, 0x2c2f}, {0x2c60, 0x2c60}, {0x2c62, 0x2c64}, {0x2c67, 0x2c67}, {0x2c69, 0x2c69}, {0x2c6b, 0x2c6b}, + {0x2c6d, 0x2c70}, {0x2c72, 0x2c72}, {0x2c75, 0x2c75}, {0x2c7e, 0x2c80}, {0x2c82, 0x2c82}, {0x2c84, 0x2c84}, + {0x2c86, 0x2c86}, {0x2c88, 0x2c88}, {0x2c8a, 0x2c8a}, {0x2c8c, 0x2c8c}, {0x2c8e, 0x2c8e}, {0x2c90, 0x2c90}, + {0x2c92, 0x2c92}, {0x2c94, 0x2c94}, {0x2c96, 0x2c96}, {0x2c98, 0x2c98}, {0x2c9a, 0x2c9a}, {0x2c9c, 0x2c9c}, + {0x2c9e, 0x2c9e}, {0x2ca0, 0x2ca0}, {0x2ca2, 0x2ca2}, {0x2ca4, 0x2ca4}, {0x2ca6, 0x2ca6}, {0x2ca8, 0x2ca8}, + {0x2caa, 0x2caa}, {0x2cac, 0x2cac}, {0x2cae, 0x2cae}, {0x2cb0, 0x2cb0}, {0x2cb2, 0x2cb2}, {0x2cb4, 0x2cb4}, + {0x2cb6, 0x2cb6}, {0x2cb8, 0x2cb8}, {0x2cba, 0x2cba}, {0x2cbc, 0x2cbc}, {0x2cbe, 0x2cbe}, {0x2cc0, 0x2cc0}, + {0x2cc2, 0x2cc2}, {0x2cc4, 0x2cc4}, {0x2cc6, 0x2cc6}, {0x2cc8, 0x2cc8}, {0x2cca, 0x2cca}, {0x2ccc, 0x2ccc}, + {0x2cce, 0x2cce}, {0x2cd0, 0x2cd0}, {0x2cd2, 0x2cd2}, {0x2cd4, 0x2cd4}, {0x2cd6, 0x2cd6}, {0x2cd8, 0x2cd8}, + {0x2cda, 0x2cda}, {0x2cdc, 0x2cdc}, {0x2cde, 0x2cde}, {0x2ce0, 0x2ce0}, {0x2ce2, 0x2ce2}, {0x2ceb, 0x2ceb}, + {0x2ced, 0x2ced}, {0x2cf2, 0x2cf2}, {0xa640, 0xa640}, {0xa642, 0xa642}, {0xa644, 0xa644}, {0xa646, 0xa646}, + {0xa648, 0xa648}, {0xa64a, 0xa64a}, {0xa64c, 0xa64c}, {0xa64e, 0xa64e}, {0xa650, 0xa650}, {0xa652, 0xa652}, + {0xa654, 0xa654}, {0xa656, 0xa656}, {0xa658, 0xa658}, {0xa65a, 0xa65a}, {0xa65c, 0xa65c}, {0xa65e, 0xa65e}, + {0xa660, 0xa660}, {0xa662, 0xa662}, {0xa664, 0xa664}, {0xa666, 0xa666}, {0xa668, 0xa668}, {0xa66a, 0xa66a}, + {0xa66c, 0xa66c}, {0xa680, 0xa680}, {0xa682, 0xa682}, {0xa684, 0xa684}, {0xa686, 0xa686}, {0xa688, 0xa688}, + {0xa68a, 0xa68a}, {0xa68c, 0xa68c}, {0xa68e, 0xa68e}, {0xa690, 0xa690}, {0xa692, 0xa692}, {0xa694, 0xa694}, + {0xa696, 0xa696}, {0xa698, 0xa698}, {0xa69a, 0xa69a}, {0xa722, 0xa722}, {0xa724, 0xa724}, {0xa726, 0xa726}, + {0xa728, 0xa728}, {0xa72a, 0xa72a}, {0xa72c, 0xa72c}, {0xa72e, 0xa72e}, {0xa732, 0xa732}, {0xa734, 0xa734}, + {0xa736, 0xa736}, {0xa738, 0xa738}, {0xa73a, 0xa73a}, {0xa73c, 0xa73c}, {0xa73e, 0xa73e}, {0xa740, 0xa740}, + {0xa742, 0xa742}, {0xa744, 0xa744}, {0xa746, 0xa746}, {0xa748, 0xa748}, {0xa74a, 0xa74a}, {0xa74c, 0xa74c}, + {0xa74e, 0xa74e}, {0xa750, 0xa750}, {0xa752, 0xa752}, {0xa754, 0xa754}, {0xa756, 0xa756}, {0xa758, 0xa758}, + {0xa75a, 0xa75a}, {0xa75c, 0xa75c}, {0xa75e, 0xa75e}, {0xa760, 0xa760}, {0xa762, 0xa762}, {0xa764, 0xa764}, + {0xa766, 0xa766}, {0xa768, 0xa768}, {0xa76a, 0xa76a}, {0xa76c, 0xa76c}, {0xa76e, 0xa76e}, {0xa779, 0xa779}, + {0xa77b, 0xa77b}, {0xa77d, 0xa77e}, {0xa780, 0xa780}, {0xa782, 0xa782}, {0xa784, 0xa784}, {0xa786, 0xa786}, + {0xa78b, 0xa78b}, {0xa78d, 0xa78d}, {0xa790, 0xa790}, {0xa792, 0xa792}, {0xa796, 0xa796}, {0xa798, 0xa798}, + {0xa79a, 0xa79a}, {0xa79c, 0xa79c}, {0xa79e, 0xa79e}, {0xa7a0, 0xa7a0}, {0xa7a2, 0xa7a2}, {0xa7a4, 0xa7a4}, + {0xa7a6, 0xa7a6}, {0xa7a8, 0xa7a8}, {0xa7aa, 0xa7ae}, {0xa7b0, 0xa7b4}, {0xa7b6, 0xa7b6}, {0xa7b8, 0xa7b8}, + {0xa7ba, 0xa7ba}, {0xa7bc, 0xa7bc}, {0xa7be, 0xa7be}, {0xa7c0, 0xa7c0}, {0xa7c2, 0xa7c2}, {0xa7c4, 0xa7c7}, + {0xa7c9, 0xa7c9}, {0xa7cb, 0xa7cc}, {0xa7ce, 0xa7ce}, {0xa7d0, 0xa7d0}, {0xa7d2, 0xa7d2}, {0xa7d4, 0xa7d4}, + {0xa7d6, 0xa7d6}, {0xa7d8, 0xa7d8}, {0xa7da, 0xa7da}, {0xa7dc, 0xa7dc}, {0xa7f5, 0xa7f5}, {0xff21, 0xff3a}, + {0x10400, 0x10427}, {0x104b0, 0x104d3}, {0x10570, 0x1057a}, {0x1057c, 0x1058a}, {0x1058c, 0x10592}, {0x10594, 0x10595}, + {0x10c80, 0x10cb2}, {0x10d50, 0x10d65}, {0x118a0, 0x118bf}, {0x16e40, 0x16e5f}, {0x16ea0, 0x16eb8}, {0x1d400, 0x1d419}, + {0x1d434, 0x1d44d}, {0x1d468, 0x1d481}, {0x1d49c, 0x1d49c}, {0x1d49e, 0x1d49f}, {0x1d4a2, 0x1d4a2}, {0x1d4a5, 0x1d4a6}, + {0x1d4a9, 0x1d4ac}, {0x1d4ae, 0x1d4b5}, {0x1d4d0, 0x1d4e9}, {0x1d504, 0x1d505}, {0x1d507, 0x1d50a}, {0x1d50d, 0x1d514}, + {0x1d516, 0x1d51c}, {0x1d538, 0x1d539}, {0x1d53b, 0x1d53e}, {0x1d540, 0x1d544}, {0x1d546, 0x1d546}, {0x1d54a, 0x1d550}, + {0x1d56c, 0x1d585}, {0x1d5a0, 0x1d5b9}, {0x1d5d4, 0x1d5ed}, {0x1d608, 0x1d621}, {0x1d63c, 0x1d655}, {0x1d670, 0x1d689}, + {0x1d6a8, 0x1d6c0}, {0x1d6e2, 0x1d6fa}, {0x1d71c, 0x1d734}, {0x1d756, 0x1d76e}, {0x1d790, 0x1d7a8}, {0x1d7ca, 0x1d7ca}, + {0x1e900, 0x1e921}, +} + +// uniCased: property Cased, read by the final-sigma rule. +var uniCased = []uniRange{ + {0x41, 0x5a}, {0x61, 0x7a}, {0xaa, 0xaa}, {0xb5, 0xb5}, {0xba, 0xba}, {0xc0, 0xd6}, + {0xd8, 0xf6}, {0xf8, 0x1ba}, {0x1bc, 0x1bf}, {0x1c4, 0x293}, {0x296, 0x2b8}, {0x2c0, 0x2c1}, + {0x2e0, 0x2e4}, {0x345, 0x345}, {0x370, 0x373}, {0x376, 0x377}, {0x37a, 0x37d}, {0x37f, 0x37f}, + {0x386, 0x386}, {0x388, 0x38a}, {0x38c, 0x38c}, {0x38e, 0x3a1}, {0x3a3, 0x3f5}, {0x3f7, 0x481}, + {0x48a, 0x52f}, {0x531, 0x556}, {0x560, 0x588}, {0x10a0, 0x10c5}, {0x10c7, 0x10c7}, {0x10cd, 0x10cd}, + {0x10d0, 0x10fa}, {0x10fc, 0x10ff}, {0x13a0, 0x13f5}, {0x13f8, 0x13fd}, {0x1c80, 0x1c8a}, {0x1c90, 0x1cba}, + {0x1cbd, 0x1cbf}, {0x1d00, 0x1dbf}, {0x1e00, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45}, {0x1f48, 0x1f4d}, + {0x1f50, 0x1f57}, {0x1f59, 0x1f59}, {0x1f5b, 0x1f5b}, {0x1f5d, 0x1f5d}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, + {0x1fb6, 0x1fbc}, {0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4}, {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3}, {0x1fd6, 0x1fdb}, + {0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc}, {0x2071, 0x2071}, {0x207f, 0x207f}, {0x2090, 0x209c}, + {0x2102, 0x2102}, {0x2107, 0x2107}, {0x210a, 0x2113}, {0x2115, 0x2115}, {0x2119, 0x211d}, {0x2124, 0x2124}, + {0x2126, 0x2126}, {0x2128, 0x2128}, {0x212a, 0x212d}, {0x212f, 0x2134}, {0x2139, 0x2139}, {0x213c, 0x213f}, + {0x2145, 0x2149}, {0x214e, 0x214e}, {0x2160, 0x217f}, {0x2183, 0x2184}, {0x24b6, 0x24e9}, {0x2c00, 0x2ce4}, + {0x2ceb, 0x2cee}, {0x2cf2, 0x2cf3}, {0x2d00, 0x2d25}, {0x2d27, 0x2d27}, {0x2d2d, 0x2d2d}, {0xa640, 0xa66d}, + {0xa680, 0xa69d}, {0xa722, 0xa787}, {0xa78b, 0xa78e}, {0xa790, 0xa7dc}, {0xa7f1, 0xa7f6}, {0xa7f8, 0xa7fa}, + {0xab30, 0xab5a}, {0xab5c, 0xab69}, {0xab70, 0xabbf}, {0xfb00, 0xfb06}, {0xfb13, 0xfb17}, {0xff21, 0xff3a}, + {0xff41, 0xff5a}, {0x10400, 0x1044f}, {0x104b0, 0x104d3}, {0x104d8, 0x104fb}, {0x10570, 0x1057a}, {0x1057c, 0x1058a}, + {0x1058c, 0x10592}, {0x10594, 0x10595}, {0x10597, 0x105a1}, {0x105a3, 0x105b1}, {0x105b3, 0x105b9}, {0x105bb, 0x105bc}, + {0x10780, 0x10780}, {0x10783, 0x10785}, {0x10787, 0x107b0}, {0x107b2, 0x107ba}, {0x10c80, 0x10cb2}, {0x10cc0, 0x10cf2}, + {0x10d50, 0x10d65}, {0x10d70, 0x10d85}, {0x118a0, 0x118df}, {0x16e40, 0x16e7f}, {0x16ea0, 0x16eb8}, {0x16ebb, 0x16ed3}, + {0x1d400, 0x1d454}, {0x1d456, 0x1d49c}, {0x1d49e, 0x1d49f}, {0x1d4a2, 0x1d4a2}, {0x1d4a5, 0x1d4a6}, {0x1d4a9, 0x1d4ac}, + {0x1d4ae, 0x1d4b9}, {0x1d4bb, 0x1d4bb}, {0x1d4bd, 0x1d4c3}, {0x1d4c5, 0x1d505}, {0x1d507, 0x1d50a}, {0x1d50d, 0x1d514}, + {0x1d516, 0x1d51c}, {0x1d51e, 0x1d539}, {0x1d53b, 0x1d53e}, {0x1d540, 0x1d544}, {0x1d546, 0x1d546}, {0x1d54a, 0x1d550}, + {0x1d552, 0x1d6a5}, {0x1d6a8, 0x1d6c0}, {0x1d6c2, 0x1d6da}, {0x1d6dc, 0x1d6fa}, {0x1d6fc, 0x1d714}, {0x1d716, 0x1d734}, + {0x1d736, 0x1d74e}, {0x1d750, 0x1d76e}, {0x1d770, 0x1d788}, {0x1d78a, 0x1d7a8}, {0x1d7aa, 0x1d7c2}, {0x1d7c4, 0x1d7cb}, + {0x1df00, 0x1df09}, {0x1df0b, 0x1df1e}, {0x1df25, 0x1df2a}, {0x1e030, 0x1e06d}, {0x1e900, 0x1e943}, {0x1f130, 0x1f149}, + {0x1f150, 0x1f169}, {0x1f170, 0x1f189}, +} + +// uniCaseIgnorable: property Case_Ignorable, read by the final-sigma rule. +var uniCaseIgnorable = []uniRange{ + {0x27, 0x27}, {0x2e, 0x2e}, {0x3a, 0x3a}, {0x5e, 0x5e}, {0x60, 0x60}, {0xa8, 0xa8}, + {0xad, 0xad}, {0xaf, 0xaf}, {0xb4, 0xb4}, {0xb7, 0xb8}, {0x2b0, 0x36f}, {0x374, 0x375}, + {0x37a, 0x37a}, {0x384, 0x385}, {0x387, 0x387}, {0x483, 0x489}, {0x559, 0x559}, {0x55f, 0x55f}, + {0x591, 0x5bd}, {0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c5}, {0x5c7, 0x5c7}, {0x5f4, 0x5f4}, + {0x600, 0x605}, {0x610, 0x61a}, {0x61c, 0x61c}, {0x640, 0x640}, {0x64b, 0x65f}, {0x670, 0x670}, + {0x6d6, 0x6dd}, {0x6df, 0x6e8}, {0x6ea, 0x6ed}, {0x70f, 0x70f}, {0x711, 0x711}, {0x730, 0x74a}, + {0x7a6, 0x7b0}, {0x7eb, 0x7f5}, {0x7fa, 0x7fa}, {0x7fd, 0x7fd}, {0x816, 0x82d}, {0x859, 0x85b}, + {0x888, 0x888}, {0x890, 0x891}, {0x897, 0x89f}, {0x8c9, 0x902}, {0x93a, 0x93a}, {0x93c, 0x93c}, + {0x941, 0x948}, {0x94d, 0x94d}, {0x951, 0x957}, {0x962, 0x963}, {0x971, 0x971}, {0x981, 0x981}, + {0x9bc, 0x9bc}, {0x9c1, 0x9c4}, {0x9cd, 0x9cd}, {0x9e2, 0x9e3}, {0x9fe, 0x9fe}, {0xa01, 0xa02}, + {0xa3c, 0xa3c}, {0xa41, 0xa42}, {0xa47, 0xa48}, {0xa4b, 0xa4d}, {0xa51, 0xa51}, {0xa70, 0xa71}, + {0xa75, 0xa75}, {0xa81, 0xa82}, {0xabc, 0xabc}, {0xac1, 0xac5}, {0xac7, 0xac8}, {0xacd, 0xacd}, + {0xae2, 0xae3}, {0xafa, 0xaff}, {0xb01, 0xb01}, {0xb3c, 0xb3c}, {0xb3f, 0xb3f}, {0xb41, 0xb44}, + {0xb4d, 0xb4d}, {0xb55, 0xb56}, {0xb62, 0xb63}, {0xb82, 0xb82}, {0xbc0, 0xbc0}, {0xbcd, 0xbcd}, + {0xc00, 0xc00}, {0xc04, 0xc04}, {0xc3c, 0xc3c}, {0xc3e, 0xc40}, {0xc46, 0xc48}, {0xc4a, 0xc4d}, + {0xc55, 0xc56}, {0xc62, 0xc63}, {0xc81, 0xc81}, {0xcbc, 0xcbc}, {0xcbf, 0xcbf}, {0xcc6, 0xcc6}, + {0xccc, 0xccd}, {0xce2, 0xce3}, {0xd00, 0xd01}, {0xd3b, 0xd3c}, {0xd41, 0xd44}, {0xd4d, 0xd4d}, + {0xd62, 0xd63}, {0xd81, 0xd81}, {0xdca, 0xdca}, {0xdd2, 0xdd4}, {0xdd6, 0xdd6}, {0xe31, 0xe31}, + {0xe34, 0xe3a}, {0xe46, 0xe4e}, {0xeb1, 0xeb1}, {0xeb4, 0xebc}, {0xec6, 0xec6}, {0xec8, 0xece}, + {0xf18, 0xf19}, {0xf35, 0xf35}, {0xf37, 0xf37}, {0xf39, 0xf39}, {0xf71, 0xf7e}, {0xf80, 0xf84}, + {0xf86, 0xf87}, {0xf8d, 0xf97}, {0xf99, 0xfbc}, {0xfc6, 0xfc6}, {0x102d, 0x1030}, {0x1032, 0x1037}, + {0x1039, 0x103a}, {0x103d, 0x103e}, {0x1058, 0x1059}, {0x105e, 0x1060}, {0x1071, 0x1074}, {0x1082, 0x1082}, + {0x1085, 0x1086}, {0x108d, 0x108d}, {0x109d, 0x109d}, {0x10fc, 0x10fc}, {0x135d, 0x135f}, {0x1712, 0x1714}, + {0x1732, 0x1733}, {0x1752, 0x1753}, {0x1772, 0x1773}, {0x17b4, 0x17b5}, {0x17b7, 0x17bd}, {0x17c6, 0x17c6}, + {0x17c9, 0x17d3}, {0x17d7, 0x17d7}, {0x17dd, 0x17dd}, {0x180b, 0x180f}, {0x1843, 0x1843}, {0x1885, 0x1886}, + {0x18a9, 0x18a9}, {0x1920, 0x1922}, {0x1927, 0x1928}, {0x1932, 0x1932}, {0x1939, 0x193b}, {0x1a17, 0x1a18}, + {0x1a1b, 0x1a1b}, {0x1a56, 0x1a56}, {0x1a58, 0x1a5e}, {0x1a60, 0x1a60}, {0x1a62, 0x1a62}, {0x1a65, 0x1a6c}, + {0x1a73, 0x1a7c}, {0x1a7f, 0x1a7f}, {0x1aa7, 0x1aa7}, {0x1ab0, 0x1add}, {0x1ae0, 0x1aeb}, {0x1b00, 0x1b03}, + {0x1b34, 0x1b34}, {0x1b36, 0x1b3a}, {0x1b3c, 0x1b3c}, {0x1b42, 0x1b42}, {0x1b6b, 0x1b73}, {0x1b80, 0x1b81}, + {0x1ba2, 0x1ba5}, {0x1ba8, 0x1ba9}, {0x1bab, 0x1bad}, {0x1be6, 0x1be6}, {0x1be8, 0x1be9}, {0x1bed, 0x1bed}, + {0x1bef, 0x1bf1}, {0x1c2c, 0x1c33}, {0x1c36, 0x1c37}, {0x1c78, 0x1c7d}, {0x1cd0, 0x1cd2}, {0x1cd4, 0x1ce0}, + {0x1ce2, 0x1ce8}, {0x1ced, 0x1ced}, {0x1cf4, 0x1cf4}, {0x1cf8, 0x1cf9}, {0x1d2c, 0x1d6a}, {0x1d78, 0x1d78}, + {0x1d9b, 0x1dff}, {0x1fbd, 0x1fbd}, {0x1fbf, 0x1fc1}, {0x1fcd, 0x1fcf}, {0x1fdd, 0x1fdf}, {0x1fed, 0x1fef}, + {0x1ffd, 0x1ffe}, {0x200b, 0x200f}, {0x2018, 0x2019}, {0x2024, 0x2024}, {0x2027, 0x2027}, {0x202a, 0x202e}, + {0x2060, 0x2064}, {0x2066, 0x206f}, {0x2071, 0x2071}, {0x207f, 0x207f}, {0x2090, 0x209c}, {0x20d0, 0x20f0}, + {0x2c7c, 0x2c7d}, {0x2cef, 0x2cf1}, {0x2d6f, 0x2d6f}, {0x2d7f, 0x2d7f}, {0x2de0, 0x2dff}, {0x2e2f, 0x2e2f}, + {0x3005, 0x3005}, {0x302a, 0x302d}, {0x3031, 0x3035}, {0x303b, 0x303b}, {0x3099, 0x309e}, {0x30fc, 0x30fe}, + {0xa015, 0xa015}, {0xa4f8, 0xa4fd}, {0xa60c, 0xa60c}, {0xa66f, 0xa672}, {0xa674, 0xa67d}, {0xa67f, 0xa67f}, + {0xa69c, 0xa69f}, {0xa6f0, 0xa6f1}, {0xa700, 0xa721}, {0xa770, 0xa770}, {0xa788, 0xa78a}, {0xa7f1, 0xa7f4}, + {0xa7f8, 0xa7f9}, {0xa802, 0xa802}, {0xa806, 0xa806}, {0xa80b, 0xa80b}, {0xa825, 0xa826}, {0xa82c, 0xa82c}, + {0xa8c4, 0xa8c5}, {0xa8e0, 0xa8f1}, {0xa8ff, 0xa8ff}, {0xa926, 0xa92d}, {0xa947, 0xa951}, {0xa980, 0xa982}, + {0xa9b3, 0xa9b3}, {0xa9b6, 0xa9b9}, {0xa9bc, 0xa9bd}, {0xa9cf, 0xa9cf}, {0xa9e5, 0xa9e6}, {0xaa29, 0xaa2e}, + {0xaa31, 0xaa32}, {0xaa35, 0xaa36}, {0xaa43, 0xaa43}, {0xaa4c, 0xaa4c}, {0xaa70, 0xaa70}, {0xaa7c, 0xaa7c}, + {0xaab0, 0xaab0}, {0xaab2, 0xaab4}, {0xaab7, 0xaab8}, {0xaabe, 0xaabf}, {0xaac1, 0xaac1}, {0xaadd, 0xaadd}, + {0xaaec, 0xaaed}, {0xaaf3, 0xaaf4}, {0xaaf6, 0xaaf6}, {0xab5b, 0xab5f}, {0xab69, 0xab6b}, {0xabe5, 0xabe5}, + {0xabe8, 0xabe8}, {0xabed, 0xabed}, {0xfb1e, 0xfb1e}, {0xfbb2, 0xfbc2}, {0xfe00, 0xfe0f}, {0xfe13, 0xfe13}, + {0xfe20, 0xfe2f}, {0xfe52, 0xfe52}, {0xfe55, 0xfe55}, {0xfeff, 0xfeff}, {0xff07, 0xff07}, {0xff0e, 0xff0e}, + {0xff1a, 0xff1a}, {0xff3e, 0xff3e}, {0xff40, 0xff40}, {0xff70, 0xff70}, {0xff9e, 0xff9f}, {0xffe3, 0xffe3}, + {0xfff9, 0xfffb}, {0x101fd, 0x101fd}, {0x102e0, 0x102e0}, {0x10376, 0x1037a}, {0x10780, 0x10785}, {0x10787, 0x107b0}, + {0x107b2, 0x107ba}, {0x10a01, 0x10a03}, {0x10a05, 0x10a06}, {0x10a0c, 0x10a0f}, {0x10a38, 0x10a3a}, {0x10a3f, 0x10a3f}, + {0x10ae5, 0x10ae6}, {0x10d24, 0x10d27}, {0x10d4e, 0x10d4e}, {0x10d69, 0x10d6d}, {0x10d6f, 0x10d6f}, {0x10eab, 0x10eac}, + {0x10ec5, 0x10ec5}, {0x10efa, 0x10eff}, {0x10f46, 0x10f50}, {0x10f82, 0x10f85}, {0x11001, 0x11001}, {0x11038, 0x11046}, + {0x11070, 0x11070}, {0x11073, 0x11074}, {0x1107f, 0x11081}, {0x110b3, 0x110b6}, {0x110b9, 0x110ba}, {0x110bd, 0x110bd}, + {0x110c2, 0x110c2}, {0x110cd, 0x110cd}, {0x11100, 0x11102}, {0x11127, 0x1112b}, {0x1112d, 0x11134}, {0x11173, 0x11173}, + {0x11180, 0x11181}, {0x111b6, 0x111be}, {0x111c9, 0x111cc}, {0x111cf, 0x111cf}, {0x1122f, 0x11231}, {0x11234, 0x11234}, + {0x11236, 0x11237}, {0x1123e, 0x1123e}, {0x11241, 0x11241}, {0x112df, 0x112df}, {0x112e3, 0x112ea}, {0x11300, 0x11301}, + {0x1133b, 0x1133c}, {0x11340, 0x11340}, {0x11366, 0x1136c}, {0x11370, 0x11374}, {0x113bb, 0x113c0}, {0x113ce, 0x113ce}, + {0x113d0, 0x113d0}, {0x113d2, 0x113d2}, {0x113e1, 0x113e2}, {0x11438, 0x1143f}, {0x11442, 0x11444}, {0x11446, 0x11446}, + {0x1145e, 0x1145e}, {0x114b3, 0x114b8}, {0x114ba, 0x114ba}, {0x114bf, 0x114c0}, {0x114c2, 0x114c3}, {0x115b2, 0x115b5}, + {0x115bc, 0x115bd}, {0x115bf, 0x115c0}, {0x115dc, 0x115dd}, {0x11633, 0x1163a}, {0x1163d, 0x1163d}, {0x1163f, 0x11640}, + {0x116ab, 0x116ab}, {0x116ad, 0x116ad}, {0x116b0, 0x116b5}, {0x116b7, 0x116b7}, {0x1171d, 0x1171d}, {0x1171f, 0x1171f}, + {0x11722, 0x11725}, {0x11727, 0x1172b}, {0x1182f, 0x11837}, {0x11839, 0x1183a}, {0x1193b, 0x1193c}, {0x1193e, 0x1193e}, + {0x11943, 0x11943}, {0x119d4, 0x119d7}, {0x119da, 0x119db}, {0x119e0, 0x119e0}, {0x11a01, 0x11a0a}, {0x11a33, 0x11a38}, + {0x11a3b, 0x11a3e}, {0x11a47, 0x11a47}, {0x11a51, 0x11a56}, {0x11a59, 0x11a5b}, {0x11a8a, 0x11a96}, {0x11a98, 0x11a99}, + {0x11b60, 0x11b60}, {0x11b62, 0x11b64}, {0x11b66, 0x11b66}, {0x11c30, 0x11c36}, {0x11c38, 0x11c3d}, {0x11c3f, 0x11c3f}, + {0x11c92, 0x11ca7}, {0x11caa, 0x11cb0}, {0x11cb2, 0x11cb3}, {0x11cb5, 0x11cb6}, {0x11d31, 0x11d36}, {0x11d3a, 0x11d3a}, + {0x11d3c, 0x11d3d}, {0x11d3f, 0x11d45}, {0x11d47, 0x11d47}, {0x11d90, 0x11d91}, {0x11d95, 0x11d95}, {0x11d97, 0x11d97}, + {0x11dd9, 0x11dd9}, {0x11ef3, 0x11ef4}, {0x11f00, 0x11f01}, {0x11f36, 0x11f3a}, {0x11f40, 0x11f40}, {0x11f42, 0x11f42}, + {0x11f5a, 0x11f5a}, {0x13430, 0x13440}, {0x13447, 0x13455}, {0x1611e, 0x16129}, {0x1612d, 0x1612f}, {0x16af0, 0x16af4}, + {0x16b30, 0x16b36}, {0x16b40, 0x16b43}, {0x16d40, 0x16d42}, {0x16d6b, 0x16d6c}, {0x16f4f, 0x16f4f}, {0x16f8f, 0x16f9f}, + {0x16fe0, 0x16fe1}, {0x16fe3, 0x16fe4}, {0x16ff2, 0x16ff3}, {0x1aff0, 0x1aff3}, {0x1aff5, 0x1affb}, {0x1affd, 0x1affe}, + {0x1bc9d, 0x1bc9e}, {0x1bca0, 0x1bca3}, {0x1cf00, 0x1cf2d}, {0x1cf30, 0x1cf46}, {0x1d167, 0x1d169}, {0x1d173, 0x1d182}, + {0x1d185, 0x1d18b}, {0x1d1aa, 0x1d1ad}, {0x1d242, 0x1d244}, {0x1da00, 0x1da36}, {0x1da3b, 0x1da6c}, {0x1da75, 0x1da75}, + {0x1da84, 0x1da84}, {0x1da9b, 0x1da9f}, {0x1daa1, 0x1daaf}, {0x1e000, 0x1e006}, {0x1e008, 0x1e018}, {0x1e01b, 0x1e021}, + {0x1e023, 0x1e024}, {0x1e026, 0x1e02a}, {0x1e030, 0x1e06d}, {0x1e08f, 0x1e08f}, {0x1e130, 0x1e13d}, {0x1e2ae, 0x1e2ae}, + {0x1e2ec, 0x1e2ef}, {0x1e4eb, 0x1e4ef}, {0x1e5ee, 0x1e5ef}, {0x1e6e3, 0x1e6e3}, {0x1e6e6, 0x1e6e6}, {0x1e6ee, 0x1e6ef}, + {0x1e6f5, 0x1e6f5}, {0x1e6ff, 0x1e6ff}, {0x1e8d0, 0x1e8d6}, {0x1e944, 0x1e94b}, {0x1f3fb, 0x1f3ff}, {0xe0001, 0xe0001}, + {0xe0020, 0xe007f}, {0xe0100, 0xe01ef}, +} + +// uniLower: JS toLowerCase() of one code point. Every first + k*step <= last maps to itself +// plus delta. Sorted by first, no overlaps. +var uniLower = []lowerRun{ + {0x41, 0x5a, 1, 32}, {0xc0, 0xd6, 1, 32}, {0xd8, 0xde, 1, 32}, {0x100, 0x12e, 2, 1}, + {0x132, 0x136, 2, 1}, {0x139, 0x147, 2, 1}, {0x14a, 0x176, 2, 1}, {0x178, 0x178, 1, -121}, + {0x179, 0x17d, 2, 1}, {0x181, 0x181, 1, 210}, {0x182, 0x184, 2, 1}, {0x186, 0x186, 1, 206}, + {0x187, 0x187, 1, 1}, {0x189, 0x18a, 1, 205}, {0x18b, 0x18b, 1, 1}, {0x18e, 0x18e, 1, 79}, + {0x18f, 0x18f, 1, 202}, {0x190, 0x190, 1, 203}, {0x191, 0x191, 1, 1}, {0x193, 0x193, 1, 205}, + {0x194, 0x194, 1, 207}, {0x196, 0x196, 1, 211}, {0x197, 0x197, 1, 209}, {0x198, 0x198, 1, 1}, + {0x19c, 0x19c, 1, 211}, {0x19d, 0x19d, 1, 213}, {0x19f, 0x19f, 1, 214}, {0x1a0, 0x1a4, 2, 1}, + {0x1a6, 0x1a6, 1, 218}, {0x1a7, 0x1a7, 1, 1}, {0x1a9, 0x1a9, 1, 218}, {0x1ac, 0x1ac, 1, 1}, + {0x1ae, 0x1ae, 1, 218}, {0x1af, 0x1af, 1, 1}, {0x1b1, 0x1b2, 1, 217}, {0x1b3, 0x1b5, 2, 1}, + {0x1b7, 0x1b7, 1, 219}, {0x1b8, 0x1b8, 1, 1}, {0x1bc, 0x1bc, 1, 1}, {0x1c4, 0x1c4, 1, 2}, + {0x1c5, 0x1c5, 1, 1}, {0x1c7, 0x1c7, 1, 2}, {0x1c8, 0x1c8, 1, 1}, {0x1ca, 0x1ca, 1, 2}, + {0x1cb, 0x1db, 2, 1}, {0x1de, 0x1ee, 2, 1}, {0x1f1, 0x1f1, 1, 2}, {0x1f2, 0x1f4, 2, 1}, + {0x1f6, 0x1f6, 1, -97}, {0x1f7, 0x1f7, 1, -56}, {0x1f8, 0x21e, 2, 1}, {0x220, 0x220, 1, -130}, + {0x222, 0x232, 2, 1}, {0x23a, 0x23a, 1, 10795}, {0x23b, 0x23b, 1, 1}, {0x23d, 0x23d, 1, -163}, + {0x23e, 0x23e, 1, 10792}, {0x241, 0x241, 1, 1}, {0x243, 0x243, 1, -195}, {0x244, 0x244, 1, 69}, + {0x245, 0x245, 1, 71}, {0x246, 0x24e, 2, 1}, {0x370, 0x372, 2, 1}, {0x376, 0x376, 1, 1}, + {0x37f, 0x37f, 1, 116}, {0x386, 0x386, 1, 38}, {0x388, 0x38a, 1, 37}, {0x38c, 0x38c, 1, 64}, + {0x38e, 0x38f, 1, 63}, {0x391, 0x3a1, 1, 32}, {0x3a3, 0x3ab, 1, 32}, {0x3cf, 0x3cf, 1, 8}, + {0x3d8, 0x3ee, 2, 1}, {0x3f4, 0x3f4, 1, -60}, {0x3f7, 0x3f7, 1, 1}, {0x3f9, 0x3f9, 1, -7}, + {0x3fa, 0x3fa, 1, 1}, {0x3fd, 0x3ff, 1, -130}, {0x400, 0x40f, 1, 80}, {0x410, 0x42f, 1, 32}, + {0x460, 0x480, 2, 1}, {0x48a, 0x4be, 2, 1}, {0x4c0, 0x4c0, 1, 15}, {0x4c1, 0x4cd, 2, 1}, + {0x4d0, 0x52e, 2, 1}, {0x531, 0x556, 1, 48}, {0x10a0, 0x10c5, 1, 7264}, {0x10c7, 0x10c7, 1, 7264}, + {0x10cd, 0x10cd, 1, 7264}, {0x13a0, 0x13ef, 1, 38864}, {0x13f0, 0x13f5, 1, 8}, {0x1c89, 0x1c89, 1, 1}, + {0x1c90, 0x1cba, 1, -3008}, {0x1cbd, 0x1cbf, 1, -3008}, {0x1e00, 0x1e94, 2, 1}, {0x1e9e, 0x1e9e, 1, -7615}, + {0x1ea0, 0x1efe, 2, 1}, {0x1f08, 0x1f0f, 1, -8}, {0x1f18, 0x1f1d, 1, -8}, {0x1f28, 0x1f2f, 1, -8}, + {0x1f38, 0x1f3f, 1, -8}, {0x1f48, 0x1f4d, 1, -8}, {0x1f59, 0x1f5f, 2, -8}, {0x1f68, 0x1f6f, 1, -8}, + {0x1f88, 0x1f8f, 1, -8}, {0x1f98, 0x1f9f, 1, -8}, {0x1fa8, 0x1faf, 1, -8}, {0x1fb8, 0x1fb9, 1, -8}, + {0x1fba, 0x1fbb, 1, -74}, {0x1fbc, 0x1fbc, 1, -9}, {0x1fc8, 0x1fcb, 1, -86}, {0x1fcc, 0x1fcc, 1, -9}, + {0x1fd8, 0x1fd9, 1, -8}, {0x1fda, 0x1fdb, 1, -100}, {0x1fe8, 0x1fe9, 1, -8}, {0x1fea, 0x1feb, 1, -112}, + {0x1fec, 0x1fec, 1, -7}, {0x1ff8, 0x1ff9, 1, -128}, {0x1ffa, 0x1ffb, 1, -126}, {0x1ffc, 0x1ffc, 1, -9}, + {0x2126, 0x2126, 1, -7517}, {0x212a, 0x212a, 1, -8383}, {0x212b, 0x212b, 1, -8262}, {0x2132, 0x2132, 1, 28}, + {0x2160, 0x216f, 1, 16}, {0x2183, 0x2183, 1, 1}, {0x24b6, 0x24cf, 1, 26}, {0x2c00, 0x2c2f, 1, 48}, + {0x2c60, 0x2c60, 1, 1}, {0x2c62, 0x2c62, 1, -10743}, {0x2c63, 0x2c63, 1, -3814}, {0x2c64, 0x2c64, 1, -10727}, + {0x2c67, 0x2c6b, 2, 1}, {0x2c6d, 0x2c6d, 1, -10780}, {0x2c6e, 0x2c6e, 1, -10749}, {0x2c6f, 0x2c6f, 1, -10783}, + {0x2c70, 0x2c70, 1, -10782}, {0x2c72, 0x2c72, 1, 1}, {0x2c75, 0x2c75, 1, 1}, {0x2c7e, 0x2c7f, 1, -10815}, + {0x2c80, 0x2ce2, 2, 1}, {0x2ceb, 0x2ced, 2, 1}, {0x2cf2, 0x2cf2, 1, 1}, {0xa640, 0xa66c, 2, 1}, + {0xa680, 0xa69a, 2, 1}, {0xa722, 0xa72e, 2, 1}, {0xa732, 0xa76e, 2, 1}, {0xa779, 0xa77b, 2, 1}, + {0xa77d, 0xa77d, 1, -35332}, {0xa77e, 0xa786, 2, 1}, {0xa78b, 0xa78b, 1, 1}, {0xa78d, 0xa78d, 1, -42280}, + {0xa790, 0xa792, 2, 1}, {0xa796, 0xa7a8, 2, 1}, {0xa7aa, 0xa7aa, 1, -42308}, {0xa7ab, 0xa7ab, 1, -42319}, + {0xa7ac, 0xa7ac, 1, -42315}, {0xa7ad, 0xa7ad, 1, -42305}, {0xa7ae, 0xa7ae, 1, -42308}, {0xa7b0, 0xa7b0, 1, -42258}, + {0xa7b1, 0xa7b1, 1, -42282}, {0xa7b2, 0xa7b2, 1, -42261}, {0xa7b3, 0xa7b3, 1, 928}, {0xa7b4, 0xa7c2, 2, 1}, + {0xa7c4, 0xa7c4, 1, -48}, {0xa7c5, 0xa7c5, 1, -42307}, {0xa7c6, 0xa7c6, 1, -35384}, {0xa7c7, 0xa7c9, 2, 1}, + {0xa7cb, 0xa7cb, 1, -42343}, {0xa7cc, 0xa7da, 2, 1}, {0xa7dc, 0xa7dc, 1, -42561}, {0xa7f5, 0xa7f5, 1, 1}, + {0xff21, 0xff3a, 1, 32}, {0x10400, 0x10427, 1, 40}, {0x104b0, 0x104d3, 1, 40}, {0x10570, 0x1057a, 1, 39}, + {0x1057c, 0x1058a, 1, 39}, {0x1058c, 0x10592, 1, 39}, {0x10594, 0x10595, 1, 39}, {0x10c80, 0x10cb2, 1, 64}, + {0x10d50, 0x10d65, 1, 32}, {0x118a0, 0x118bf, 1, 32}, {0x16e40, 0x16e5f, 1, 32}, {0x16ea0, 0x16eb8, 1, 27}, + {0x1e900, 0x1e921, 1, 34}, +} + +// uniLowerMulti: code points whose lowercase is several code points. Sorted. +var uniLowerMulti = []lowerMulti{ + {0x130, "i\u0307"}, +} + +// uniCCC: canonical combining class ranks of the code points that are their own NFD; 0 when +// absent. Ranks keep the order and equality of the classes, which is all normalization uses. +var uniCCC = []cccRange{ + {0x300, 0x314, 51}, {0x315, 0x315, 52}, {0x316, 0x319, 46}, {0x31a, 0x31a, 52}, {0x31b, 0x31b, 44}, + {0x31c, 0x320, 46}, {0x321, 0x322, 42}, {0x323, 0x326, 46}, {0x327, 0x328, 42}, {0x329, 0x333, 46}, + {0x334, 0x338, 1}, {0x339, 0x33c, 46}, {0x33d, 0x33f, 51}, {0x342, 0x342, 51}, {0x345, 0x345, 55}, + {0x346, 0x346, 51}, {0x347, 0x349, 46}, {0x34a, 0x34c, 51}, {0x34d, 0x34e, 46}, {0x350, 0x352, 51}, + {0x353, 0x356, 46}, {0x357, 0x357, 51}, {0x358, 0x358, 52}, {0x359, 0x35a, 46}, {0x35b, 0x35b, 51}, + {0x35c, 0x35c, 53}, {0x35d, 0x35e, 54}, {0x35f, 0x35f, 53}, {0x360, 0x361, 54}, {0x362, 0x362, 53}, + {0x363, 0x36f, 51}, {0x483, 0x487, 51}, {0x591, 0x591, 46}, {0x592, 0x595, 51}, {0x596, 0x596, 46}, + {0x597, 0x599, 51}, {0x59a, 0x59a, 47}, {0x59b, 0x59b, 46}, {0x59c, 0x5a1, 51}, {0x5a2, 0x5a7, 46}, + {0x5a8, 0x5a9, 51}, {0x5aa, 0x5aa, 46}, {0x5ab, 0x5ac, 51}, {0x5ad, 0x5ad, 47}, {0x5ae, 0x5ae, 50}, + {0x5af, 0x5af, 51}, {0x5b0, 0x5b0, 6}, {0x5b1, 0x5b1, 7}, {0x5b2, 0x5b2, 8}, {0x5b3, 0x5b3, 9}, + {0x5b4, 0x5b4, 10}, {0x5b5, 0x5b5, 11}, {0x5b6, 0x5b6, 12}, {0x5b7, 0x5b7, 13}, {0x5b8, 0x5b8, 14}, + {0x5b9, 0x5ba, 15}, {0x5bb, 0x5bb, 16}, {0x5bc, 0x5bc, 17}, {0x5bd, 0x5bd, 18}, {0x5bf, 0x5bf, 19}, + {0x5c1, 0x5c1, 20}, {0x5c2, 0x5c2, 21}, {0x5c4, 0x5c4, 51}, {0x5c5, 0x5c5, 46}, {0x5c7, 0x5c7, 14}, + {0x610, 0x617, 51}, {0x618, 0x618, 26}, {0x619, 0x619, 27}, {0x61a, 0x61a, 28}, {0x64b, 0x64b, 23}, + {0x64c, 0x64c, 24}, {0x64d, 0x64d, 25}, {0x64e, 0x64e, 26}, {0x64f, 0x64f, 27}, {0x650, 0x650, 28}, + {0x651, 0x651, 29}, {0x652, 0x652, 30}, {0x653, 0x654, 51}, {0x655, 0x656, 46}, {0x657, 0x65b, 51}, + {0x65c, 0x65c, 46}, {0x65d, 0x65e, 51}, {0x65f, 0x65f, 46}, {0x670, 0x670, 31}, {0x6d6, 0x6dc, 51}, + {0x6df, 0x6e2, 51}, {0x6e3, 0x6e3, 46}, {0x6e4, 0x6e4, 51}, {0x6e7, 0x6e8, 51}, {0x6ea, 0x6ea, 46}, + {0x6eb, 0x6ec, 51}, {0x6ed, 0x6ed, 46}, {0x711, 0x711, 32}, {0x730, 0x730, 51}, {0x731, 0x731, 46}, + {0x732, 0x733, 51}, {0x734, 0x734, 46}, {0x735, 0x736, 51}, {0x737, 0x739, 46}, {0x73a, 0x73a, 51}, + {0x73b, 0x73c, 46}, {0x73d, 0x73d, 51}, {0x73e, 0x73e, 46}, {0x73f, 0x741, 51}, {0x742, 0x742, 46}, + {0x743, 0x743, 51}, {0x744, 0x744, 46}, {0x745, 0x745, 51}, {0x746, 0x746, 46}, {0x747, 0x747, 51}, + {0x748, 0x748, 46}, {0x749, 0x74a, 51}, {0x7eb, 0x7f1, 51}, {0x7f2, 0x7f2, 46}, {0x7f3, 0x7f3, 51}, + {0x7fd, 0x7fd, 46}, {0x816, 0x819, 51}, {0x81b, 0x823, 51}, {0x825, 0x827, 51}, {0x829, 0x82d, 51}, + {0x859, 0x85b, 46}, {0x897, 0x898, 51}, {0x899, 0x89b, 46}, {0x89c, 0x89f, 51}, {0x8ca, 0x8ce, 51}, + {0x8cf, 0x8d3, 46}, {0x8d4, 0x8e1, 51}, {0x8e3, 0x8e3, 46}, {0x8e4, 0x8e5, 51}, {0x8e6, 0x8e6, 46}, + {0x8e7, 0x8e8, 51}, {0x8e9, 0x8e9, 46}, {0x8ea, 0x8ec, 51}, {0x8ed, 0x8ef, 46}, {0x8f0, 0x8f0, 23}, + {0x8f1, 0x8f1, 24}, {0x8f2, 0x8f2, 25}, {0x8f3, 0x8f5, 51}, {0x8f6, 0x8f6, 46}, {0x8f7, 0x8f8, 51}, + {0x8f9, 0x8fa, 46}, {0x8fb, 0x8ff, 51}, {0x93c, 0x93c, 3}, {0x94d, 0x94d, 5}, {0x951, 0x951, 51}, + {0x952, 0x952, 46}, {0x953, 0x954, 51}, {0x9bc, 0x9bc, 3}, {0x9cd, 0x9cd, 5}, {0x9fe, 0x9fe, 51}, + {0xa3c, 0xa3c, 3}, {0xa4d, 0xa4d, 5}, {0xabc, 0xabc, 3}, {0xacd, 0xacd, 5}, {0xb3c, 0xb3c, 3}, + {0xb4d, 0xb4d, 5}, {0xbcd, 0xbcd, 5}, {0xc3c, 0xc3c, 3}, {0xc4d, 0xc4d, 5}, {0xc55, 0xc55, 33}, + {0xc56, 0xc56, 34}, {0xcbc, 0xcbc, 3}, {0xccd, 0xccd, 5}, {0xd3b, 0xd3c, 5}, {0xd4d, 0xd4d, 5}, + {0xdca, 0xdca, 5}, {0xe38, 0xe39, 35}, {0xe3a, 0xe3a, 5}, {0xe48, 0xe4b, 36}, {0xeb8, 0xeb9, 37}, + {0xeba, 0xeba, 5}, {0xec8, 0xecb, 38}, {0xf18, 0xf19, 46}, {0xf35, 0xf35, 46}, {0xf37, 0xf37, 46}, + {0xf39, 0xf39, 44}, {0xf71, 0xf71, 39}, {0xf72, 0xf72, 40}, {0xf74, 0xf74, 41}, {0xf7a, 0xf7d, 40}, + {0xf80, 0xf80, 40}, {0xf82, 0xf83, 51}, {0xf84, 0xf84, 5}, {0xf86, 0xf87, 51}, {0xfc6, 0xfc6, 46}, + {0x1037, 0x1037, 3}, {0x1039, 0x103a, 5}, {0x108d, 0x108d, 46}, {0x135d, 0x135f, 51}, {0x1714, 0x1715, 5}, + {0x1734, 0x1734, 5}, {0x17d2, 0x17d2, 5}, {0x17dd, 0x17dd, 51}, {0x18a9, 0x18a9, 50}, {0x1939, 0x1939, 47}, + {0x193a, 0x193a, 51}, {0x193b, 0x193b, 46}, {0x1a17, 0x1a17, 51}, {0x1a18, 0x1a18, 46}, {0x1a60, 0x1a60, 5}, + {0x1a75, 0x1a7c, 51}, {0x1a7f, 0x1a7f, 46}, {0x1ab0, 0x1ab4, 51}, {0x1ab5, 0x1aba, 46}, {0x1abb, 0x1abc, 51}, + {0x1abd, 0x1abd, 46}, {0x1abf, 0x1ac0, 46}, {0x1ac1, 0x1ac2, 51}, {0x1ac3, 0x1ac4, 46}, {0x1ac5, 0x1ac9, 51}, + {0x1aca, 0x1aca, 46}, {0x1acb, 0x1adc, 51}, {0x1add, 0x1add, 46}, {0x1ae0, 0x1ae5, 51}, {0x1ae6, 0x1ae6, 46}, + {0x1ae7, 0x1aea, 51}, {0x1aeb, 0x1aeb, 54}, {0x1b34, 0x1b34, 3}, {0x1b44, 0x1b44, 5}, {0x1b6b, 0x1b6b, 51}, + {0x1b6c, 0x1b6c, 46}, {0x1b6d, 0x1b73, 51}, {0x1baa, 0x1bab, 5}, {0x1be6, 0x1be6, 3}, {0x1bf2, 0x1bf3, 5}, + {0x1c37, 0x1c37, 3}, {0x1cd0, 0x1cd2, 51}, {0x1cd4, 0x1cd4, 1}, {0x1cd5, 0x1cd9, 46}, {0x1cda, 0x1cdb, 51}, + {0x1cdc, 0x1cdf, 46}, {0x1ce0, 0x1ce0, 51}, {0x1ce2, 0x1ce8, 1}, {0x1ced, 0x1ced, 46}, {0x1cf4, 0x1cf4, 51}, + {0x1cf8, 0x1cf9, 51}, {0x1dc0, 0x1dc1, 51}, {0x1dc2, 0x1dc2, 46}, {0x1dc3, 0x1dc9, 51}, {0x1dca, 0x1dca, 46}, + {0x1dcb, 0x1dcc, 51}, {0x1dcd, 0x1dcd, 54}, {0x1dce, 0x1dce, 43}, {0x1dcf, 0x1dcf, 46}, {0x1dd0, 0x1dd0, 42}, + {0x1dd1, 0x1df5, 51}, {0x1df6, 0x1df6, 52}, {0x1df7, 0x1df8, 50}, {0x1df9, 0x1df9, 46}, {0x1dfa, 0x1dfa, 45}, + {0x1dfb, 0x1dfb, 51}, {0x1dfc, 0x1dfc, 53}, {0x1dfd, 0x1dfd, 46}, {0x1dfe, 0x1dfe, 51}, {0x1dff, 0x1dff, 46}, + {0x20d0, 0x20d1, 51}, {0x20d2, 0x20d3, 1}, {0x20d4, 0x20d7, 51}, {0x20d8, 0x20da, 1}, {0x20db, 0x20dc, 51}, + {0x20e1, 0x20e1, 51}, {0x20e5, 0x20e6, 1}, {0x20e7, 0x20e7, 51}, {0x20e8, 0x20e8, 46}, {0x20e9, 0x20e9, 51}, + {0x20ea, 0x20eb, 1}, {0x20ec, 0x20ef, 46}, {0x20f0, 0x20f0, 51}, {0x2cef, 0x2cf1, 51}, {0x2d7f, 0x2d7f, 5}, + {0x2de0, 0x2dff, 51}, {0x302a, 0x302a, 45}, {0x302b, 0x302b, 50}, {0x302c, 0x302c, 52}, {0x302d, 0x302d, 47}, + {0x302e, 0x302f, 48}, {0x3099, 0x309a, 4}, {0xa66f, 0xa66f, 51}, {0xa674, 0xa67d, 51}, {0xa69e, 0xa69f, 51}, + {0xa6f0, 0xa6f1, 51}, {0xa806, 0xa806, 5}, {0xa82c, 0xa82c, 5}, {0xa8c4, 0xa8c4, 5}, {0xa8e0, 0xa8f1, 51}, + {0xa92b, 0xa92d, 46}, {0xa953, 0xa953, 5}, {0xa9b3, 0xa9b3, 3}, {0xa9c0, 0xa9c0, 5}, {0xaab0, 0xaab0, 51}, + {0xaab2, 0xaab3, 51}, {0xaab4, 0xaab4, 46}, {0xaab7, 0xaab8, 51}, {0xaabe, 0xaabf, 51}, {0xaac1, 0xaac1, 51}, + {0xaaf6, 0xaaf6, 5}, {0xabed, 0xabed, 5}, {0xfb1e, 0xfb1e, 22}, {0xfe20, 0xfe26, 51}, {0xfe27, 0xfe2d, 46}, + {0xfe2e, 0xfe2f, 51}, {0x101fd, 0x101fd, 46}, {0x102e0, 0x102e0, 46}, {0x10376, 0x1037a, 51}, {0x10a0d, 0x10a0d, 46}, + {0x10a0f, 0x10a0f, 51}, {0x10a38, 0x10a38, 51}, {0x10a39, 0x10a39, 1}, {0x10a3a, 0x10a3a, 46}, {0x10a3f, 0x10a3f, 5}, + {0x10ae5, 0x10ae5, 51}, {0x10ae6, 0x10ae6, 46}, {0x10d24, 0x10d27, 51}, {0x10d69, 0x10d6d, 51}, {0x10eab, 0x10eac, 51}, + {0x10efa, 0x10efb, 46}, {0x10efd, 0x10eff, 46}, {0x10f46, 0x10f47, 46}, {0x10f48, 0x10f4a, 51}, {0x10f4b, 0x10f4b, 46}, + {0x10f4c, 0x10f4c, 51}, {0x10f4d, 0x10f50, 46}, {0x10f82, 0x10f82, 51}, {0x10f83, 0x10f83, 46}, {0x10f84, 0x10f84, 51}, + {0x10f85, 0x10f85, 46}, {0x11046, 0x11046, 5}, {0x11070, 0x11070, 5}, {0x1107f, 0x1107f, 5}, {0x110b9, 0x110b9, 5}, + {0x110ba, 0x110ba, 3}, {0x11100, 0x11102, 51}, {0x11133, 0x11134, 5}, {0x11173, 0x11173, 3}, {0x111c0, 0x111c0, 5}, + {0x111ca, 0x111ca, 3}, {0x11235, 0x11235, 5}, {0x11236, 0x11236, 3}, {0x112e9, 0x112e9, 3}, {0x112ea, 0x112ea, 5}, + {0x1133b, 0x1133c, 3}, {0x1134d, 0x1134d, 5}, {0x11366, 0x1136c, 51}, {0x11370, 0x11374, 51}, {0x113ce, 0x113d0, 5}, + {0x11442, 0x11442, 5}, {0x11446, 0x11446, 3}, {0x1145e, 0x1145e, 51}, {0x114c2, 0x114c2, 5}, {0x114c3, 0x114c3, 3}, + {0x115bf, 0x115bf, 5}, {0x115c0, 0x115c0, 3}, {0x1163f, 0x1163f, 5}, {0x116b6, 0x116b6, 5}, {0x116b7, 0x116b7, 3}, + {0x1172b, 0x1172b, 5}, {0x11839, 0x11839, 5}, {0x1183a, 0x1183a, 3}, {0x1193d, 0x1193e, 5}, {0x11943, 0x11943, 3}, + {0x119e0, 0x119e0, 5}, {0x11a34, 0x11a34, 5}, {0x11a47, 0x11a47, 5}, {0x11a99, 0x11a99, 5}, {0x11c3f, 0x11c3f, 5}, + {0x11d42, 0x11d42, 3}, {0x11d44, 0x11d45, 5}, {0x11d97, 0x11d97, 5}, {0x11f41, 0x11f42, 5}, {0x1612f, 0x1612f, 5}, + {0x16af0, 0x16af4, 1}, {0x16b30, 0x16b36, 51}, {0x16ff0, 0x16ff1, 2}, {0x1bc9e, 0x1bc9e, 1}, {0x1d165, 0x1d166, 44}, + {0x1d167, 0x1d169, 1}, {0x1d16d, 0x1d16d, 49}, {0x1d16e, 0x1d172, 44}, {0x1d17b, 0x1d182, 46}, {0x1d185, 0x1d189, 51}, + {0x1d18a, 0x1d18b, 46}, {0x1d1aa, 0x1d1ad, 51}, {0x1d242, 0x1d244, 51}, {0x1e000, 0x1e006, 51}, {0x1e008, 0x1e018, 51}, + {0x1e01b, 0x1e021, 51}, {0x1e023, 0x1e024, 51}, {0x1e026, 0x1e02a, 51}, {0x1e08f, 0x1e08f, 51}, {0x1e130, 0x1e136, 51}, + {0x1e2ae, 0x1e2ae, 51}, {0x1e2ec, 0x1e2ef, 51}, {0x1e4ec, 0x1e4ed, 52}, {0x1e4ee, 0x1e4ee, 46}, {0x1e4ef, 0x1e4ef, 51}, + {0x1e5ee, 0x1e5ee, 51}, {0x1e5ef, 0x1e5ef, 46}, {0x1e6e3, 0x1e6e3, 51}, {0x1e6e6, 0x1e6e6, 51}, {0x1e6ee, 0x1e6ef, 51}, + {0x1e6f5, 0x1e6f5, 51}, {0x1e8d0, 0x1e8d6, 46}, {0x1e944, 0x1e949, 51}, {0x1e94a, 0x1e94a, 3}, +} + +// uniDecomp: full canonical decomposition (NFD) of every code point that has one, except the +// Hangul syllables. Sorted by code point. +var uniDecomp = []decompEntry{ + {0xc0, "A\u0300"}, {0xc1, "A\u0301"}, {0xc2, "A\u0302"}, {0xc3, "A\u0303"}, + {0xc4, "A\u0308"}, {0xc5, "A\u030a"}, {0xc7, "C\u0327"}, {0xc8, "E\u0300"}, + {0xc9, "E\u0301"}, {0xca, "E\u0302"}, {0xcb, "E\u0308"}, {0xcc, "I\u0300"}, + {0xcd, "I\u0301"}, {0xce, "I\u0302"}, {0xcf, "I\u0308"}, {0xd1, "N\u0303"}, + {0xd2, "O\u0300"}, {0xd3, "O\u0301"}, {0xd4, "O\u0302"}, {0xd5, "O\u0303"}, + {0xd6, "O\u0308"}, {0xd9, "U\u0300"}, {0xda, "U\u0301"}, {0xdb, "U\u0302"}, + {0xdc, "U\u0308"}, {0xdd, "Y\u0301"}, {0xe0, "a\u0300"}, {0xe1, "a\u0301"}, + {0xe2, "a\u0302"}, {0xe3, "a\u0303"}, {0xe4, "a\u0308"}, {0xe5, "a\u030a"}, + {0xe7, "c\u0327"}, {0xe8, "e\u0300"}, {0xe9, "e\u0301"}, {0xea, "e\u0302"}, + {0xeb, "e\u0308"}, {0xec, "i\u0300"}, {0xed, "i\u0301"}, {0xee, "i\u0302"}, + {0xef, "i\u0308"}, {0xf1, "n\u0303"}, {0xf2, "o\u0300"}, {0xf3, "o\u0301"}, + {0xf4, "o\u0302"}, {0xf5, "o\u0303"}, {0xf6, "o\u0308"}, {0xf9, "u\u0300"}, + {0xfa, "u\u0301"}, {0xfb, "u\u0302"}, {0xfc, "u\u0308"}, {0xfd, "y\u0301"}, + {0xff, "y\u0308"}, {0x100, "A\u0304"}, {0x101, "a\u0304"}, {0x102, "A\u0306"}, + {0x103, "a\u0306"}, {0x104, "A\u0328"}, {0x105, "a\u0328"}, {0x106, "C\u0301"}, + {0x107, "c\u0301"}, {0x108, "C\u0302"}, {0x109, "c\u0302"}, {0x10a, "C\u0307"}, + {0x10b, "c\u0307"}, {0x10c, "C\u030c"}, {0x10d, "c\u030c"}, {0x10e, "D\u030c"}, + {0x10f, "d\u030c"}, {0x112, "E\u0304"}, {0x113, "e\u0304"}, {0x114, "E\u0306"}, + {0x115, "e\u0306"}, {0x116, "E\u0307"}, {0x117, "e\u0307"}, {0x118, "E\u0328"}, + {0x119, "e\u0328"}, {0x11a, "E\u030c"}, {0x11b, "e\u030c"}, {0x11c, "G\u0302"}, + {0x11d, "g\u0302"}, {0x11e, "G\u0306"}, {0x11f, "g\u0306"}, {0x120, "G\u0307"}, + {0x121, "g\u0307"}, {0x122, "G\u0327"}, {0x123, "g\u0327"}, {0x124, "H\u0302"}, + {0x125, "h\u0302"}, {0x128, "I\u0303"}, {0x129, "i\u0303"}, {0x12a, "I\u0304"}, + {0x12b, "i\u0304"}, {0x12c, "I\u0306"}, {0x12d, "i\u0306"}, {0x12e, "I\u0328"}, + {0x12f, "i\u0328"}, {0x130, "I\u0307"}, {0x134, "J\u0302"}, {0x135, "j\u0302"}, + {0x136, "K\u0327"}, {0x137, "k\u0327"}, {0x139, "L\u0301"}, {0x13a, "l\u0301"}, + {0x13b, "L\u0327"}, {0x13c, "l\u0327"}, {0x13d, "L\u030c"}, {0x13e, "l\u030c"}, + {0x143, "N\u0301"}, {0x144, "n\u0301"}, {0x145, "N\u0327"}, {0x146, "n\u0327"}, + {0x147, "N\u030c"}, {0x148, "n\u030c"}, {0x14c, "O\u0304"}, {0x14d, "o\u0304"}, + {0x14e, "O\u0306"}, {0x14f, "o\u0306"}, {0x150, "O\u030b"}, {0x151, "o\u030b"}, + {0x154, "R\u0301"}, {0x155, "r\u0301"}, {0x156, "R\u0327"}, {0x157, "r\u0327"}, + {0x158, "R\u030c"}, {0x159, "r\u030c"}, {0x15a, "S\u0301"}, {0x15b, "s\u0301"}, + {0x15c, "S\u0302"}, {0x15d, "s\u0302"}, {0x15e, "S\u0327"}, {0x15f, "s\u0327"}, + {0x160, "S\u030c"}, {0x161, "s\u030c"}, {0x162, "T\u0327"}, {0x163, "t\u0327"}, + {0x164, "T\u030c"}, {0x165, "t\u030c"}, {0x168, "U\u0303"}, {0x169, "u\u0303"}, + {0x16a, "U\u0304"}, {0x16b, "u\u0304"}, {0x16c, "U\u0306"}, {0x16d, "u\u0306"}, + {0x16e, "U\u030a"}, {0x16f, "u\u030a"}, {0x170, "U\u030b"}, {0x171, "u\u030b"}, + {0x172, "U\u0328"}, {0x173, "u\u0328"}, {0x174, "W\u0302"}, {0x175, "w\u0302"}, + {0x176, "Y\u0302"}, {0x177, "y\u0302"}, {0x178, "Y\u0308"}, {0x179, "Z\u0301"}, + {0x17a, "z\u0301"}, {0x17b, "Z\u0307"}, {0x17c, "z\u0307"}, {0x17d, "Z\u030c"}, + {0x17e, "z\u030c"}, {0x1a0, "O\u031b"}, {0x1a1, "o\u031b"}, {0x1af, "U\u031b"}, + {0x1b0, "u\u031b"}, {0x1cd, "A\u030c"}, {0x1ce, "a\u030c"}, {0x1cf, "I\u030c"}, + {0x1d0, "i\u030c"}, {0x1d1, "O\u030c"}, {0x1d2, "o\u030c"}, {0x1d3, "U\u030c"}, + {0x1d4, "u\u030c"}, {0x1d5, "U\u0308\u0304"}, {0x1d6, "u\u0308\u0304"}, {0x1d7, "U\u0308\u0301"}, + {0x1d8, "u\u0308\u0301"}, {0x1d9, "U\u0308\u030c"}, {0x1da, "u\u0308\u030c"}, {0x1db, "U\u0308\u0300"}, + {0x1dc, "u\u0308\u0300"}, {0x1de, "A\u0308\u0304"}, {0x1df, "a\u0308\u0304"}, {0x1e0, "A\u0307\u0304"}, + {0x1e1, "a\u0307\u0304"}, {0x1e2, "\u00c6\u0304"}, {0x1e3, "\u00e6\u0304"}, {0x1e6, "G\u030c"}, + {0x1e7, "g\u030c"}, {0x1e8, "K\u030c"}, {0x1e9, "k\u030c"}, {0x1ea, "O\u0328"}, + {0x1eb, "o\u0328"}, {0x1ec, "O\u0328\u0304"}, {0x1ed, "o\u0328\u0304"}, {0x1ee, "\u01b7\u030c"}, + {0x1ef, "\u0292\u030c"}, {0x1f0, "j\u030c"}, {0x1f4, "G\u0301"}, {0x1f5, "g\u0301"}, + {0x1f8, "N\u0300"}, {0x1f9, "n\u0300"}, {0x1fa, "A\u030a\u0301"}, {0x1fb, "a\u030a\u0301"}, + {0x1fc, "\u00c6\u0301"}, {0x1fd, "\u00e6\u0301"}, {0x1fe, "\u00d8\u0301"}, {0x1ff, "\u00f8\u0301"}, + {0x200, "A\u030f"}, {0x201, "a\u030f"}, {0x202, "A\u0311"}, {0x203, "a\u0311"}, + {0x204, "E\u030f"}, {0x205, "e\u030f"}, {0x206, "E\u0311"}, {0x207, "e\u0311"}, + {0x208, "I\u030f"}, {0x209, "i\u030f"}, {0x20a, "I\u0311"}, {0x20b, "i\u0311"}, + {0x20c, "O\u030f"}, {0x20d, "o\u030f"}, {0x20e, "O\u0311"}, {0x20f, "o\u0311"}, + {0x210, "R\u030f"}, {0x211, "r\u030f"}, {0x212, "R\u0311"}, {0x213, "r\u0311"}, + {0x214, "U\u030f"}, {0x215, "u\u030f"}, {0x216, "U\u0311"}, {0x217, "u\u0311"}, + {0x218, "S\u0326"}, {0x219, "s\u0326"}, {0x21a, "T\u0326"}, {0x21b, "t\u0326"}, + {0x21e, "H\u030c"}, {0x21f, "h\u030c"}, {0x226, "A\u0307"}, {0x227, "a\u0307"}, + {0x228, "E\u0327"}, {0x229, "e\u0327"}, {0x22a, "O\u0308\u0304"}, {0x22b, "o\u0308\u0304"}, + {0x22c, "O\u0303\u0304"}, {0x22d, "o\u0303\u0304"}, {0x22e, "O\u0307"}, {0x22f, "o\u0307"}, + {0x230, "O\u0307\u0304"}, {0x231, "o\u0307\u0304"}, {0x232, "Y\u0304"}, {0x233, "y\u0304"}, + {0x340, "\u0300"}, {0x341, "\u0301"}, {0x343, "\u0313"}, {0x344, "\u0308\u0301"}, + {0x374, "\u02b9"}, {0x37e, ";"}, {0x385, "\u00a8\u0301"}, {0x386, "\u0391\u0301"}, + {0x387, "\u00b7"}, {0x388, "\u0395\u0301"}, {0x389, "\u0397\u0301"}, {0x38a, "\u0399\u0301"}, + {0x38c, "\u039f\u0301"}, {0x38e, "\u03a5\u0301"}, {0x38f, "\u03a9\u0301"}, {0x390, "\u03b9\u0308\u0301"}, + {0x3aa, "\u0399\u0308"}, {0x3ab, "\u03a5\u0308"}, {0x3ac, "\u03b1\u0301"}, {0x3ad, "\u03b5\u0301"}, + {0x3ae, "\u03b7\u0301"}, {0x3af, "\u03b9\u0301"}, {0x3b0, "\u03c5\u0308\u0301"}, {0x3ca, "\u03b9\u0308"}, + {0x3cb, "\u03c5\u0308"}, {0x3cc, "\u03bf\u0301"}, {0x3cd, "\u03c5\u0301"}, {0x3ce, "\u03c9\u0301"}, + {0x3d3, "\u03d2\u0301"}, {0x3d4, "\u03d2\u0308"}, {0x400, "\u0415\u0300"}, {0x401, "\u0415\u0308"}, + {0x403, "\u0413\u0301"}, {0x407, "\u0406\u0308"}, {0x40c, "\u041a\u0301"}, {0x40d, "\u0418\u0300"}, + {0x40e, "\u0423\u0306"}, {0x419, "\u0418\u0306"}, {0x439, "\u0438\u0306"}, {0x450, "\u0435\u0300"}, + {0x451, "\u0435\u0308"}, {0x453, "\u0433\u0301"}, {0x457, "\u0456\u0308"}, {0x45c, "\u043a\u0301"}, + {0x45d, "\u0438\u0300"}, {0x45e, "\u0443\u0306"}, {0x476, "\u0474\u030f"}, {0x477, "\u0475\u030f"}, + {0x4c1, "\u0416\u0306"}, {0x4c2, "\u0436\u0306"}, {0x4d0, "\u0410\u0306"}, {0x4d1, "\u0430\u0306"}, + {0x4d2, "\u0410\u0308"}, {0x4d3, "\u0430\u0308"}, {0x4d6, "\u0415\u0306"}, {0x4d7, "\u0435\u0306"}, + {0x4da, "\u04d8\u0308"}, {0x4db, "\u04d9\u0308"}, {0x4dc, "\u0416\u0308"}, {0x4dd, "\u0436\u0308"}, + {0x4de, "\u0417\u0308"}, {0x4df, "\u0437\u0308"}, {0x4e2, "\u0418\u0304"}, {0x4e3, "\u0438\u0304"}, + {0x4e4, "\u0418\u0308"}, {0x4e5, "\u0438\u0308"}, {0x4e6, "\u041e\u0308"}, {0x4e7, "\u043e\u0308"}, + {0x4ea, "\u04e8\u0308"}, {0x4eb, "\u04e9\u0308"}, {0x4ec, "\u042d\u0308"}, {0x4ed, "\u044d\u0308"}, + {0x4ee, "\u0423\u0304"}, {0x4ef, "\u0443\u0304"}, {0x4f0, "\u0423\u0308"}, {0x4f1, "\u0443\u0308"}, + {0x4f2, "\u0423\u030b"}, {0x4f3, "\u0443\u030b"}, {0x4f4, "\u0427\u0308"}, {0x4f5, "\u0447\u0308"}, + {0x4f8, "\u042b\u0308"}, {0x4f9, "\u044b\u0308"}, {0x622, "\u0627\u0653"}, {0x623, "\u0627\u0654"}, + {0x624, "\u0648\u0654"}, {0x625, "\u0627\u0655"}, {0x626, "\u064a\u0654"}, {0x6c0, "\u06d5\u0654"}, + {0x6c2, "\u06c1\u0654"}, {0x6d3, "\u06d2\u0654"}, {0x929, "\u0928\u093c"}, {0x931, "\u0930\u093c"}, + {0x934, "\u0933\u093c"}, {0x958, "\u0915\u093c"}, {0x959, "\u0916\u093c"}, {0x95a, "\u0917\u093c"}, + {0x95b, "\u091c\u093c"}, {0x95c, "\u0921\u093c"}, {0x95d, "\u0922\u093c"}, {0x95e, "\u092b\u093c"}, + {0x95f, "\u092f\u093c"}, {0x9cb, "\u09c7\u09be"}, {0x9cc, "\u09c7\u09d7"}, {0x9dc, "\u09a1\u09bc"}, + {0x9dd, "\u09a2\u09bc"}, {0x9df, "\u09af\u09bc"}, {0xa33, "\u0a32\u0a3c"}, {0xa36, "\u0a38\u0a3c"}, + {0xa59, "\u0a16\u0a3c"}, {0xa5a, "\u0a17\u0a3c"}, {0xa5b, "\u0a1c\u0a3c"}, {0xa5e, "\u0a2b\u0a3c"}, + {0xb48, "\u0b47\u0b56"}, {0xb4b, "\u0b47\u0b3e"}, {0xb4c, "\u0b47\u0b57"}, {0xb5c, "\u0b21\u0b3c"}, + {0xb5d, "\u0b22\u0b3c"}, {0xb94, "\u0b92\u0bd7"}, {0xbca, "\u0bc6\u0bbe"}, {0xbcb, "\u0bc7\u0bbe"}, + {0xbcc, "\u0bc6\u0bd7"}, {0xc48, "\u0c46\u0c56"}, {0xcc0, "\u0cbf\u0cd5"}, {0xcc7, "\u0cc6\u0cd5"}, + {0xcc8, "\u0cc6\u0cd6"}, {0xcca, "\u0cc6\u0cc2"}, {0xccb, "\u0cc6\u0cc2\u0cd5"}, {0xd4a, "\u0d46\u0d3e"}, + {0xd4b, "\u0d47\u0d3e"}, {0xd4c, "\u0d46\u0d57"}, {0xdda, "\u0dd9\u0dca"}, {0xddc, "\u0dd9\u0dcf"}, + {0xddd, "\u0dd9\u0dcf\u0dca"}, {0xdde, "\u0dd9\u0ddf"}, {0xf43, "\u0f42\u0fb7"}, {0xf4d, "\u0f4c\u0fb7"}, + {0xf52, "\u0f51\u0fb7"}, {0xf57, "\u0f56\u0fb7"}, {0xf5c, "\u0f5b\u0fb7"}, {0xf69, "\u0f40\u0fb5"}, + {0xf73, "\u0f71\u0f72"}, {0xf75, "\u0f71\u0f74"}, {0xf76, "\u0fb2\u0f80"}, {0xf78, "\u0fb3\u0f80"}, + {0xf81, "\u0f71\u0f80"}, {0xf93, "\u0f92\u0fb7"}, {0xf9d, "\u0f9c\u0fb7"}, {0xfa2, "\u0fa1\u0fb7"}, + {0xfa7, "\u0fa6\u0fb7"}, {0xfac, "\u0fab\u0fb7"}, {0xfb9, "\u0f90\u0fb5"}, {0x1026, "\u1025\u102e"}, + {0x1b06, "\u1b05\u1b35"}, {0x1b08, "\u1b07\u1b35"}, {0x1b0a, "\u1b09\u1b35"}, {0x1b0c, "\u1b0b\u1b35"}, + {0x1b0e, "\u1b0d\u1b35"}, {0x1b12, "\u1b11\u1b35"}, {0x1b3b, "\u1b3a\u1b35"}, {0x1b3d, "\u1b3c\u1b35"}, + {0x1b40, "\u1b3e\u1b35"}, {0x1b41, "\u1b3f\u1b35"}, {0x1b43, "\u1b42\u1b35"}, {0x1e00, "A\u0325"}, + {0x1e01, "a\u0325"}, {0x1e02, "B\u0307"}, {0x1e03, "b\u0307"}, {0x1e04, "B\u0323"}, + {0x1e05, "b\u0323"}, {0x1e06, "B\u0331"}, {0x1e07, "b\u0331"}, {0x1e08, "C\u0327\u0301"}, + {0x1e09, "c\u0327\u0301"}, {0x1e0a, "D\u0307"}, {0x1e0b, "d\u0307"}, {0x1e0c, "D\u0323"}, + {0x1e0d, "d\u0323"}, {0x1e0e, "D\u0331"}, {0x1e0f, "d\u0331"}, {0x1e10, "D\u0327"}, + {0x1e11, "d\u0327"}, {0x1e12, "D\u032d"}, {0x1e13, "d\u032d"}, {0x1e14, "E\u0304\u0300"}, + {0x1e15, "e\u0304\u0300"}, {0x1e16, "E\u0304\u0301"}, {0x1e17, "e\u0304\u0301"}, {0x1e18, "E\u032d"}, + {0x1e19, "e\u032d"}, {0x1e1a, "E\u0330"}, {0x1e1b, "e\u0330"}, {0x1e1c, "E\u0327\u0306"}, + {0x1e1d, "e\u0327\u0306"}, {0x1e1e, "F\u0307"}, {0x1e1f, "f\u0307"}, {0x1e20, "G\u0304"}, + {0x1e21, "g\u0304"}, {0x1e22, "H\u0307"}, {0x1e23, "h\u0307"}, {0x1e24, "H\u0323"}, + {0x1e25, "h\u0323"}, {0x1e26, "H\u0308"}, {0x1e27, "h\u0308"}, {0x1e28, "H\u0327"}, + {0x1e29, "h\u0327"}, {0x1e2a, "H\u032e"}, {0x1e2b, "h\u032e"}, {0x1e2c, "I\u0330"}, + {0x1e2d, "i\u0330"}, {0x1e2e, "I\u0308\u0301"}, {0x1e2f, "i\u0308\u0301"}, {0x1e30, "K\u0301"}, + {0x1e31, "k\u0301"}, {0x1e32, "K\u0323"}, {0x1e33, "k\u0323"}, {0x1e34, "K\u0331"}, + {0x1e35, "k\u0331"}, {0x1e36, "L\u0323"}, {0x1e37, "l\u0323"}, {0x1e38, "L\u0323\u0304"}, + {0x1e39, "l\u0323\u0304"}, {0x1e3a, "L\u0331"}, {0x1e3b, "l\u0331"}, {0x1e3c, "L\u032d"}, + {0x1e3d, "l\u032d"}, {0x1e3e, "M\u0301"}, {0x1e3f, "m\u0301"}, {0x1e40, "M\u0307"}, + {0x1e41, "m\u0307"}, {0x1e42, "M\u0323"}, {0x1e43, "m\u0323"}, {0x1e44, "N\u0307"}, + {0x1e45, "n\u0307"}, {0x1e46, "N\u0323"}, {0x1e47, "n\u0323"}, {0x1e48, "N\u0331"}, + {0x1e49, "n\u0331"}, {0x1e4a, "N\u032d"}, {0x1e4b, "n\u032d"}, {0x1e4c, "O\u0303\u0301"}, + {0x1e4d, "o\u0303\u0301"}, {0x1e4e, "O\u0303\u0308"}, {0x1e4f, "o\u0303\u0308"}, {0x1e50, "O\u0304\u0300"}, + {0x1e51, "o\u0304\u0300"}, {0x1e52, "O\u0304\u0301"}, {0x1e53, "o\u0304\u0301"}, {0x1e54, "P\u0301"}, + {0x1e55, "p\u0301"}, {0x1e56, "P\u0307"}, {0x1e57, "p\u0307"}, {0x1e58, "R\u0307"}, + {0x1e59, "r\u0307"}, {0x1e5a, "R\u0323"}, {0x1e5b, "r\u0323"}, {0x1e5c, "R\u0323\u0304"}, + {0x1e5d, "r\u0323\u0304"}, {0x1e5e, "R\u0331"}, {0x1e5f, "r\u0331"}, {0x1e60, "S\u0307"}, + {0x1e61, "s\u0307"}, {0x1e62, "S\u0323"}, {0x1e63, "s\u0323"}, {0x1e64, "S\u0301\u0307"}, + {0x1e65, "s\u0301\u0307"}, {0x1e66, "S\u030c\u0307"}, {0x1e67, "s\u030c\u0307"}, {0x1e68, "S\u0323\u0307"}, + {0x1e69, "s\u0323\u0307"}, {0x1e6a, "T\u0307"}, {0x1e6b, "t\u0307"}, {0x1e6c, "T\u0323"}, + {0x1e6d, "t\u0323"}, {0x1e6e, "T\u0331"}, {0x1e6f, "t\u0331"}, {0x1e70, "T\u032d"}, + {0x1e71, "t\u032d"}, {0x1e72, "U\u0324"}, {0x1e73, "u\u0324"}, {0x1e74, "U\u0330"}, + {0x1e75, "u\u0330"}, {0x1e76, "U\u032d"}, {0x1e77, "u\u032d"}, {0x1e78, "U\u0303\u0301"}, + {0x1e79, "u\u0303\u0301"}, {0x1e7a, "U\u0304\u0308"}, {0x1e7b, "u\u0304\u0308"}, {0x1e7c, "V\u0303"}, + {0x1e7d, "v\u0303"}, {0x1e7e, "V\u0323"}, {0x1e7f, "v\u0323"}, {0x1e80, "W\u0300"}, + {0x1e81, "w\u0300"}, {0x1e82, "W\u0301"}, {0x1e83, "w\u0301"}, {0x1e84, "W\u0308"}, + {0x1e85, "w\u0308"}, {0x1e86, "W\u0307"}, {0x1e87, "w\u0307"}, {0x1e88, "W\u0323"}, + {0x1e89, "w\u0323"}, {0x1e8a, "X\u0307"}, {0x1e8b, "x\u0307"}, {0x1e8c, "X\u0308"}, + {0x1e8d, "x\u0308"}, {0x1e8e, "Y\u0307"}, {0x1e8f, "y\u0307"}, {0x1e90, "Z\u0302"}, + {0x1e91, "z\u0302"}, {0x1e92, "Z\u0323"}, {0x1e93, "z\u0323"}, {0x1e94, "Z\u0331"}, + {0x1e95, "z\u0331"}, {0x1e96, "h\u0331"}, {0x1e97, "t\u0308"}, {0x1e98, "w\u030a"}, + {0x1e99, "y\u030a"}, {0x1e9b, "\u017f\u0307"}, {0x1ea0, "A\u0323"}, {0x1ea1, "a\u0323"}, + {0x1ea2, "A\u0309"}, {0x1ea3, "a\u0309"}, {0x1ea4, "A\u0302\u0301"}, {0x1ea5, "a\u0302\u0301"}, + {0x1ea6, "A\u0302\u0300"}, {0x1ea7, "a\u0302\u0300"}, {0x1ea8, "A\u0302\u0309"}, {0x1ea9, "a\u0302\u0309"}, + {0x1eaa, "A\u0302\u0303"}, {0x1eab, "a\u0302\u0303"}, {0x1eac, "A\u0323\u0302"}, {0x1ead, "a\u0323\u0302"}, + {0x1eae, "A\u0306\u0301"}, {0x1eaf, "a\u0306\u0301"}, {0x1eb0, "A\u0306\u0300"}, {0x1eb1, "a\u0306\u0300"}, + {0x1eb2, "A\u0306\u0309"}, {0x1eb3, "a\u0306\u0309"}, {0x1eb4, "A\u0306\u0303"}, {0x1eb5, "a\u0306\u0303"}, + {0x1eb6, "A\u0323\u0306"}, {0x1eb7, "a\u0323\u0306"}, {0x1eb8, "E\u0323"}, {0x1eb9, "e\u0323"}, + {0x1eba, "E\u0309"}, {0x1ebb, "e\u0309"}, {0x1ebc, "E\u0303"}, {0x1ebd, "e\u0303"}, + {0x1ebe, "E\u0302\u0301"}, {0x1ebf, "e\u0302\u0301"}, {0x1ec0, "E\u0302\u0300"}, {0x1ec1, "e\u0302\u0300"}, + {0x1ec2, "E\u0302\u0309"}, {0x1ec3, "e\u0302\u0309"}, {0x1ec4, "E\u0302\u0303"}, {0x1ec5, "e\u0302\u0303"}, + {0x1ec6, "E\u0323\u0302"}, {0x1ec7, "e\u0323\u0302"}, {0x1ec8, "I\u0309"}, {0x1ec9, "i\u0309"}, + {0x1eca, "I\u0323"}, {0x1ecb, "i\u0323"}, {0x1ecc, "O\u0323"}, {0x1ecd, "o\u0323"}, + {0x1ece, "O\u0309"}, {0x1ecf, "o\u0309"}, {0x1ed0, "O\u0302\u0301"}, {0x1ed1, "o\u0302\u0301"}, + {0x1ed2, "O\u0302\u0300"}, {0x1ed3, "o\u0302\u0300"}, {0x1ed4, "O\u0302\u0309"}, {0x1ed5, "o\u0302\u0309"}, + {0x1ed6, "O\u0302\u0303"}, {0x1ed7, "o\u0302\u0303"}, {0x1ed8, "O\u0323\u0302"}, {0x1ed9, "o\u0323\u0302"}, + {0x1eda, "O\u031b\u0301"}, {0x1edb, "o\u031b\u0301"}, {0x1edc, "O\u031b\u0300"}, {0x1edd, "o\u031b\u0300"}, + {0x1ede, "O\u031b\u0309"}, {0x1edf, "o\u031b\u0309"}, {0x1ee0, "O\u031b\u0303"}, {0x1ee1, "o\u031b\u0303"}, + {0x1ee2, "O\u031b\u0323"}, {0x1ee3, "o\u031b\u0323"}, {0x1ee4, "U\u0323"}, {0x1ee5, "u\u0323"}, + {0x1ee6, "U\u0309"}, {0x1ee7, "u\u0309"}, {0x1ee8, "U\u031b\u0301"}, {0x1ee9, "u\u031b\u0301"}, + {0x1eea, "U\u031b\u0300"}, {0x1eeb, "u\u031b\u0300"}, {0x1eec, "U\u031b\u0309"}, {0x1eed, "u\u031b\u0309"}, + {0x1eee, "U\u031b\u0303"}, {0x1eef, "u\u031b\u0303"}, {0x1ef0, "U\u031b\u0323"}, {0x1ef1, "u\u031b\u0323"}, + {0x1ef2, "Y\u0300"}, {0x1ef3, "y\u0300"}, {0x1ef4, "Y\u0323"}, {0x1ef5, "y\u0323"}, + {0x1ef6, "Y\u0309"}, {0x1ef7, "y\u0309"}, {0x1ef8, "Y\u0303"}, {0x1ef9, "y\u0303"}, + {0x1f00, "\u03b1\u0313"}, {0x1f01, "\u03b1\u0314"}, {0x1f02, "\u03b1\u0313\u0300"}, {0x1f03, "\u03b1\u0314\u0300"}, + {0x1f04, "\u03b1\u0313\u0301"}, {0x1f05, "\u03b1\u0314\u0301"}, {0x1f06, "\u03b1\u0313\u0342"}, {0x1f07, "\u03b1\u0314\u0342"}, + {0x1f08, "\u0391\u0313"}, {0x1f09, "\u0391\u0314"}, {0x1f0a, "\u0391\u0313\u0300"}, {0x1f0b, "\u0391\u0314\u0300"}, + {0x1f0c, "\u0391\u0313\u0301"}, {0x1f0d, "\u0391\u0314\u0301"}, {0x1f0e, "\u0391\u0313\u0342"}, {0x1f0f, "\u0391\u0314\u0342"}, + {0x1f10, "\u03b5\u0313"}, {0x1f11, "\u03b5\u0314"}, {0x1f12, "\u03b5\u0313\u0300"}, {0x1f13, "\u03b5\u0314\u0300"}, + {0x1f14, "\u03b5\u0313\u0301"}, {0x1f15, "\u03b5\u0314\u0301"}, {0x1f18, "\u0395\u0313"}, {0x1f19, "\u0395\u0314"}, + {0x1f1a, "\u0395\u0313\u0300"}, {0x1f1b, "\u0395\u0314\u0300"}, {0x1f1c, "\u0395\u0313\u0301"}, {0x1f1d, "\u0395\u0314\u0301"}, + {0x1f20, "\u03b7\u0313"}, {0x1f21, "\u03b7\u0314"}, {0x1f22, "\u03b7\u0313\u0300"}, {0x1f23, "\u03b7\u0314\u0300"}, + {0x1f24, "\u03b7\u0313\u0301"}, {0x1f25, "\u03b7\u0314\u0301"}, {0x1f26, "\u03b7\u0313\u0342"}, {0x1f27, "\u03b7\u0314\u0342"}, + {0x1f28, "\u0397\u0313"}, {0x1f29, "\u0397\u0314"}, {0x1f2a, "\u0397\u0313\u0300"}, {0x1f2b, "\u0397\u0314\u0300"}, + {0x1f2c, "\u0397\u0313\u0301"}, {0x1f2d, "\u0397\u0314\u0301"}, {0x1f2e, "\u0397\u0313\u0342"}, {0x1f2f, "\u0397\u0314\u0342"}, + {0x1f30, "\u03b9\u0313"}, {0x1f31, "\u03b9\u0314"}, {0x1f32, "\u03b9\u0313\u0300"}, {0x1f33, "\u03b9\u0314\u0300"}, + {0x1f34, "\u03b9\u0313\u0301"}, {0x1f35, "\u03b9\u0314\u0301"}, {0x1f36, "\u03b9\u0313\u0342"}, {0x1f37, "\u03b9\u0314\u0342"}, + {0x1f38, "\u0399\u0313"}, {0x1f39, "\u0399\u0314"}, {0x1f3a, "\u0399\u0313\u0300"}, {0x1f3b, "\u0399\u0314\u0300"}, + {0x1f3c, "\u0399\u0313\u0301"}, {0x1f3d, "\u0399\u0314\u0301"}, {0x1f3e, "\u0399\u0313\u0342"}, {0x1f3f, "\u0399\u0314\u0342"}, + {0x1f40, "\u03bf\u0313"}, {0x1f41, "\u03bf\u0314"}, {0x1f42, "\u03bf\u0313\u0300"}, {0x1f43, "\u03bf\u0314\u0300"}, + {0x1f44, "\u03bf\u0313\u0301"}, {0x1f45, "\u03bf\u0314\u0301"}, {0x1f48, "\u039f\u0313"}, {0x1f49, "\u039f\u0314"}, + {0x1f4a, "\u039f\u0313\u0300"}, {0x1f4b, "\u039f\u0314\u0300"}, {0x1f4c, "\u039f\u0313\u0301"}, {0x1f4d, "\u039f\u0314\u0301"}, + {0x1f50, "\u03c5\u0313"}, {0x1f51, "\u03c5\u0314"}, {0x1f52, "\u03c5\u0313\u0300"}, {0x1f53, "\u03c5\u0314\u0300"}, + {0x1f54, "\u03c5\u0313\u0301"}, {0x1f55, "\u03c5\u0314\u0301"}, {0x1f56, "\u03c5\u0313\u0342"}, {0x1f57, "\u03c5\u0314\u0342"}, + {0x1f59, "\u03a5\u0314"}, {0x1f5b, "\u03a5\u0314\u0300"}, {0x1f5d, "\u03a5\u0314\u0301"}, {0x1f5f, "\u03a5\u0314\u0342"}, + {0x1f60, "\u03c9\u0313"}, {0x1f61, "\u03c9\u0314"}, {0x1f62, "\u03c9\u0313\u0300"}, {0x1f63, "\u03c9\u0314\u0300"}, + {0x1f64, "\u03c9\u0313\u0301"}, {0x1f65, "\u03c9\u0314\u0301"}, {0x1f66, "\u03c9\u0313\u0342"}, {0x1f67, "\u03c9\u0314\u0342"}, + {0x1f68, "\u03a9\u0313"}, {0x1f69, "\u03a9\u0314"}, {0x1f6a, "\u03a9\u0313\u0300"}, {0x1f6b, "\u03a9\u0314\u0300"}, + {0x1f6c, "\u03a9\u0313\u0301"}, {0x1f6d, "\u03a9\u0314\u0301"}, {0x1f6e, "\u03a9\u0313\u0342"}, {0x1f6f, "\u03a9\u0314\u0342"}, + {0x1f70, "\u03b1\u0300"}, {0x1f71, "\u03b1\u0301"}, {0x1f72, "\u03b5\u0300"}, {0x1f73, "\u03b5\u0301"}, + {0x1f74, "\u03b7\u0300"}, {0x1f75, "\u03b7\u0301"}, {0x1f76, "\u03b9\u0300"}, {0x1f77, "\u03b9\u0301"}, + {0x1f78, "\u03bf\u0300"}, {0x1f79, "\u03bf\u0301"}, {0x1f7a, "\u03c5\u0300"}, {0x1f7b, "\u03c5\u0301"}, + {0x1f7c, "\u03c9\u0300"}, {0x1f7d, "\u03c9\u0301"}, {0x1f80, "\u03b1\u0313\u0345"}, {0x1f81, "\u03b1\u0314\u0345"}, + {0x1f82, "\u03b1\u0313\u0300\u0345"}, {0x1f83, "\u03b1\u0314\u0300\u0345"}, {0x1f84, "\u03b1\u0313\u0301\u0345"}, {0x1f85, "\u03b1\u0314\u0301\u0345"}, + {0x1f86, "\u03b1\u0313\u0342\u0345"}, {0x1f87, "\u03b1\u0314\u0342\u0345"}, {0x1f88, "\u0391\u0313\u0345"}, {0x1f89, "\u0391\u0314\u0345"}, + {0x1f8a, "\u0391\u0313\u0300\u0345"}, {0x1f8b, "\u0391\u0314\u0300\u0345"}, {0x1f8c, "\u0391\u0313\u0301\u0345"}, {0x1f8d, "\u0391\u0314\u0301\u0345"}, + {0x1f8e, "\u0391\u0313\u0342\u0345"}, {0x1f8f, "\u0391\u0314\u0342\u0345"}, {0x1f90, "\u03b7\u0313\u0345"}, {0x1f91, "\u03b7\u0314\u0345"}, + {0x1f92, "\u03b7\u0313\u0300\u0345"}, {0x1f93, "\u03b7\u0314\u0300\u0345"}, {0x1f94, "\u03b7\u0313\u0301\u0345"}, {0x1f95, "\u03b7\u0314\u0301\u0345"}, + {0x1f96, "\u03b7\u0313\u0342\u0345"}, {0x1f97, "\u03b7\u0314\u0342\u0345"}, {0x1f98, "\u0397\u0313\u0345"}, {0x1f99, "\u0397\u0314\u0345"}, + {0x1f9a, "\u0397\u0313\u0300\u0345"}, {0x1f9b, "\u0397\u0314\u0300\u0345"}, {0x1f9c, "\u0397\u0313\u0301\u0345"}, {0x1f9d, "\u0397\u0314\u0301\u0345"}, + {0x1f9e, "\u0397\u0313\u0342\u0345"}, {0x1f9f, "\u0397\u0314\u0342\u0345"}, {0x1fa0, "\u03c9\u0313\u0345"}, {0x1fa1, "\u03c9\u0314\u0345"}, + {0x1fa2, "\u03c9\u0313\u0300\u0345"}, {0x1fa3, "\u03c9\u0314\u0300\u0345"}, {0x1fa4, "\u03c9\u0313\u0301\u0345"}, {0x1fa5, "\u03c9\u0314\u0301\u0345"}, + {0x1fa6, "\u03c9\u0313\u0342\u0345"}, {0x1fa7, "\u03c9\u0314\u0342\u0345"}, {0x1fa8, "\u03a9\u0313\u0345"}, {0x1fa9, "\u03a9\u0314\u0345"}, + {0x1faa, "\u03a9\u0313\u0300\u0345"}, {0x1fab, "\u03a9\u0314\u0300\u0345"}, {0x1fac, "\u03a9\u0313\u0301\u0345"}, {0x1fad, "\u03a9\u0314\u0301\u0345"}, + {0x1fae, "\u03a9\u0313\u0342\u0345"}, {0x1faf, "\u03a9\u0314\u0342\u0345"}, {0x1fb0, "\u03b1\u0306"}, {0x1fb1, "\u03b1\u0304"}, + {0x1fb2, "\u03b1\u0300\u0345"}, {0x1fb3, "\u03b1\u0345"}, {0x1fb4, "\u03b1\u0301\u0345"}, {0x1fb6, "\u03b1\u0342"}, + {0x1fb7, "\u03b1\u0342\u0345"}, {0x1fb8, "\u0391\u0306"}, {0x1fb9, "\u0391\u0304"}, {0x1fba, "\u0391\u0300"}, + {0x1fbb, "\u0391\u0301"}, {0x1fbc, "\u0391\u0345"}, {0x1fbe, "\u03b9"}, {0x1fc1, "\u00a8\u0342"}, + {0x1fc2, "\u03b7\u0300\u0345"}, {0x1fc3, "\u03b7\u0345"}, {0x1fc4, "\u03b7\u0301\u0345"}, {0x1fc6, "\u03b7\u0342"}, + {0x1fc7, "\u03b7\u0342\u0345"}, {0x1fc8, "\u0395\u0300"}, {0x1fc9, "\u0395\u0301"}, {0x1fca, "\u0397\u0300"}, + {0x1fcb, "\u0397\u0301"}, {0x1fcc, "\u0397\u0345"}, {0x1fcd, "\u1fbf\u0300"}, {0x1fce, "\u1fbf\u0301"}, + {0x1fcf, "\u1fbf\u0342"}, {0x1fd0, "\u03b9\u0306"}, {0x1fd1, "\u03b9\u0304"}, {0x1fd2, "\u03b9\u0308\u0300"}, + {0x1fd3, "\u03b9\u0308\u0301"}, {0x1fd6, "\u03b9\u0342"}, {0x1fd7, "\u03b9\u0308\u0342"}, {0x1fd8, "\u0399\u0306"}, + {0x1fd9, "\u0399\u0304"}, {0x1fda, "\u0399\u0300"}, {0x1fdb, "\u0399\u0301"}, {0x1fdd, "\u1ffe\u0300"}, + {0x1fde, "\u1ffe\u0301"}, {0x1fdf, "\u1ffe\u0342"}, {0x1fe0, "\u03c5\u0306"}, {0x1fe1, "\u03c5\u0304"}, + {0x1fe2, "\u03c5\u0308\u0300"}, {0x1fe3, "\u03c5\u0308\u0301"}, {0x1fe4, "\u03c1\u0313"}, {0x1fe5, "\u03c1\u0314"}, + {0x1fe6, "\u03c5\u0342"}, {0x1fe7, "\u03c5\u0308\u0342"}, {0x1fe8, "\u03a5\u0306"}, {0x1fe9, "\u03a5\u0304"}, + {0x1fea, "\u03a5\u0300"}, {0x1feb, "\u03a5\u0301"}, {0x1fec, "\u03a1\u0314"}, {0x1fed, "\u00a8\u0300"}, + {0x1fee, "\u00a8\u0301"}, {0x1fef, "`"}, {0x1ff2, "\u03c9\u0300\u0345"}, {0x1ff3, "\u03c9\u0345"}, + {0x1ff4, "\u03c9\u0301\u0345"}, {0x1ff6, "\u03c9\u0342"}, {0x1ff7, "\u03c9\u0342\u0345"}, {0x1ff8, "\u039f\u0300"}, + {0x1ff9, "\u039f\u0301"}, {0x1ffa, "\u03a9\u0300"}, {0x1ffb, "\u03a9\u0301"}, {0x1ffc, "\u03a9\u0345"}, + {0x1ffd, "\u00b4"}, {0x2000, "\u2002"}, {0x2001, "\u2003"}, {0x2126, "\u03a9"}, + {0x212a, "K"}, {0x212b, "A\u030a"}, {0x219a, "\u2190\u0338"}, {0x219b, "\u2192\u0338"}, + {0x21ae, "\u2194\u0338"}, {0x21cd, "\u21d0\u0338"}, {0x21ce, "\u21d4\u0338"}, {0x21cf, "\u21d2\u0338"}, + {0x2204, "\u2203\u0338"}, {0x2209, "\u2208\u0338"}, {0x220c, "\u220b\u0338"}, {0x2224, "\u2223\u0338"}, + {0x2226, "\u2225\u0338"}, {0x2241, "\u223c\u0338"}, {0x2244, "\u2243\u0338"}, {0x2247, "\u2245\u0338"}, + {0x2249, "\u2248\u0338"}, {0x2260, "=\u0338"}, {0x2262, "\u2261\u0338"}, {0x226d, "\u224d\u0338"}, + {0x226e, "<\u0338"}, {0x226f, ">\u0338"}, {0x2270, "\u2264\u0338"}, {0x2271, "\u2265\u0338"}, + {0x2274, "\u2272\u0338"}, {0x2275, "\u2273\u0338"}, {0x2278, "\u2276\u0338"}, {0x2279, "\u2277\u0338"}, + {0x2280, "\u227a\u0338"}, {0x2281, "\u227b\u0338"}, {0x2284, "\u2282\u0338"}, {0x2285, "\u2283\u0338"}, + {0x2288, "\u2286\u0338"}, {0x2289, "\u2287\u0338"}, {0x22ac, "\u22a2\u0338"}, {0x22ad, "\u22a8\u0338"}, + {0x22ae, "\u22a9\u0338"}, {0x22af, "\u22ab\u0338"}, {0x22e0, "\u227c\u0338"}, {0x22e1, "\u227d\u0338"}, + {0x22e2, "\u2291\u0338"}, {0x22e3, "\u2292\u0338"}, {0x22ea, "\u22b2\u0338"}, {0x22eb, "\u22b3\u0338"}, + {0x22ec, "\u22b4\u0338"}, {0x22ed, "\u22b5\u0338"}, {0x2329, "\u3008"}, {0x232a, "\u3009"}, + {0x2adc, "\u2add\u0338"}, {0x304c, "\u304b\u3099"}, {0x304e, "\u304d\u3099"}, {0x3050, "\u304f\u3099"}, + {0x3052, "\u3051\u3099"}, {0x3054, "\u3053\u3099"}, {0x3056, "\u3055\u3099"}, {0x3058, "\u3057\u3099"}, + {0x305a, "\u3059\u3099"}, {0x305c, "\u305b\u3099"}, {0x305e, "\u305d\u3099"}, {0x3060, "\u305f\u3099"}, + {0x3062, "\u3061\u3099"}, {0x3065, "\u3064\u3099"}, {0x3067, "\u3066\u3099"}, {0x3069, "\u3068\u3099"}, + {0x3070, "\u306f\u3099"}, {0x3071, "\u306f\u309a"}, {0x3073, "\u3072\u3099"}, {0x3074, "\u3072\u309a"}, + {0x3076, "\u3075\u3099"}, {0x3077, "\u3075\u309a"}, {0x3079, "\u3078\u3099"}, {0x307a, "\u3078\u309a"}, + {0x307c, "\u307b\u3099"}, {0x307d, "\u307b\u309a"}, {0x3094, "\u3046\u3099"}, {0x309e, "\u309d\u3099"}, + {0x30ac, "\u30ab\u3099"}, {0x30ae, "\u30ad\u3099"}, {0x30b0, "\u30af\u3099"}, {0x30b2, "\u30b1\u3099"}, + {0x30b4, "\u30b3\u3099"}, {0x30b6, "\u30b5\u3099"}, {0x30b8, "\u30b7\u3099"}, {0x30ba, "\u30b9\u3099"}, + {0x30bc, "\u30bb\u3099"}, {0x30be, "\u30bd\u3099"}, {0x30c0, "\u30bf\u3099"}, {0x30c2, "\u30c1\u3099"}, + {0x30c5, "\u30c4\u3099"}, {0x30c7, "\u30c6\u3099"}, {0x30c9, "\u30c8\u3099"}, {0x30d0, "\u30cf\u3099"}, + {0x30d1, "\u30cf\u309a"}, {0x30d3, "\u30d2\u3099"}, {0x30d4, "\u30d2\u309a"}, {0x30d6, "\u30d5\u3099"}, + {0x30d7, "\u30d5\u309a"}, {0x30d9, "\u30d8\u3099"}, {0x30da, "\u30d8\u309a"}, {0x30dc, "\u30db\u3099"}, + {0x30dd, "\u30db\u309a"}, {0x30f4, "\u30a6\u3099"}, {0x30f7, "\u30ef\u3099"}, {0x30f8, "\u30f0\u3099"}, + {0x30f9, "\u30f1\u3099"}, {0x30fa, "\u30f2\u3099"}, {0x30fe, "\u30fd\u3099"}, {0xf900, "\u8c48"}, + {0xf901, "\u66f4"}, {0xf902, "\u8eca"}, {0xf903, "\u8cc8"}, {0xf904, "\u6ed1"}, + {0xf905, "\u4e32"}, {0xf906, "\u53e5"}, {0xf907, "\u9f9c"}, {0xf908, "\u9f9c"}, + {0xf909, "\u5951"}, {0xf90a, "\u91d1"}, {0xf90b, "\u5587"}, {0xf90c, "\u5948"}, + {0xf90d, "\u61f6"}, {0xf90e, "\u7669"}, {0xf90f, "\u7f85"}, {0xf910, "\u863f"}, + {0xf911, "\u87ba"}, {0xf912, "\u88f8"}, {0xf913, "\u908f"}, {0xf914, "\u6a02"}, + {0xf915, "\u6d1b"}, {0xf916, "\u70d9"}, {0xf917, "\u73de"}, {0xf918, "\u843d"}, + {0xf919, "\u916a"}, {0xf91a, "\u99f1"}, {0xf91b, "\u4e82"}, {0xf91c, "\u5375"}, + {0xf91d, "\u6b04"}, {0xf91e, "\u721b"}, {0xf91f, "\u862d"}, {0xf920, "\u9e1e"}, + {0xf921, "\u5d50"}, {0xf922, "\u6feb"}, {0xf923, "\u85cd"}, {0xf924, "\u8964"}, + {0xf925, "\u62c9"}, {0xf926, "\u81d8"}, {0xf927, "\u881f"}, {0xf928, "\u5eca"}, + {0xf929, "\u6717"}, {0xf92a, "\u6d6a"}, {0xf92b, "\u72fc"}, {0xf92c, "\u90ce"}, + {0xf92d, "\u4f86"}, {0xf92e, "\u51b7"}, {0xf92f, "\u52de"}, {0xf930, "\u64c4"}, + {0xf931, "\u6ad3"}, {0xf932, "\u7210"}, {0xf933, "\u76e7"}, {0xf934, "\u8001"}, + {0xf935, "\u8606"}, {0xf936, "\u865c"}, {0xf937, "\u8def"}, {0xf938, "\u9732"}, + {0xf939, "\u9b6f"}, {0xf93a, "\u9dfa"}, {0xf93b, "\u788c"}, {0xf93c, "\u797f"}, + {0xf93d, "\u7da0"}, {0xf93e, "\u83c9"}, {0xf93f, "\u9304"}, {0xf940, "\u9e7f"}, + {0xf941, "\u8ad6"}, {0xf942, "\u58df"}, {0xf943, "\u5f04"}, {0xf944, "\u7c60"}, + {0xf945, "\u807e"}, {0xf946, "\u7262"}, {0xf947, "\u78ca"}, {0xf948, "\u8cc2"}, + {0xf949, "\u96f7"}, {0xf94a, "\u58d8"}, {0xf94b, "\u5c62"}, {0xf94c, "\u6a13"}, + {0xf94d, "\u6dda"}, {0xf94e, "\u6f0f"}, {0xf94f, "\u7d2f"}, {0xf950, "\u7e37"}, + {0xf951, "\u964b"}, {0xf952, "\u52d2"}, {0xf953, "\u808b"}, {0xf954, "\u51dc"}, + {0xf955, "\u51cc"}, {0xf956, "\u7a1c"}, {0xf957, "\u7dbe"}, {0xf958, "\u83f1"}, + {0xf959, "\u9675"}, {0xf95a, "\u8b80"}, {0xf95b, "\u62cf"}, {0xf95c, "\u6a02"}, + {0xf95d, "\u8afe"}, {0xf95e, "\u4e39"}, {0xf95f, "\u5be7"}, {0xf960, "\u6012"}, + {0xf961, "\u7387"}, {0xf962, "\u7570"}, {0xf963, "\u5317"}, {0xf964, "\u78fb"}, + {0xf965, "\u4fbf"}, {0xf966, "\u5fa9"}, {0xf967, "\u4e0d"}, {0xf968, "\u6ccc"}, + {0xf969, "\u6578"}, {0xf96a, "\u7d22"}, {0xf96b, "\u53c3"}, {0xf96c, "\u585e"}, + {0xf96d, "\u7701"}, {0xf96e, "\u8449"}, {0xf96f, "\u8aaa"}, {0xf970, "\u6bba"}, + {0xf971, "\u8fb0"}, {0xf972, "\u6c88"}, {0xf973, "\u62fe"}, {0xf974, "\u82e5"}, + {0xf975, "\u63a0"}, {0xf976, "\u7565"}, {0xf977, "\u4eae"}, {0xf978, "\u5169"}, + {0xf979, "\u51c9"}, {0xf97a, "\u6881"}, {0xf97b, "\u7ce7"}, {0xf97c, "\u826f"}, + {0xf97d, "\u8ad2"}, {0xf97e, "\u91cf"}, {0xf97f, "\u52f5"}, {0xf980, "\u5442"}, + {0xf981, "\u5973"}, {0xf982, "\u5eec"}, {0xf983, "\u65c5"}, {0xf984, "\u6ffe"}, + {0xf985, "\u792a"}, {0xf986, "\u95ad"}, {0xf987, "\u9a6a"}, {0xf988, "\u9e97"}, + {0xf989, "\u9ece"}, {0xf98a, "\u529b"}, {0xf98b, "\u66c6"}, {0xf98c, "\u6b77"}, + {0xf98d, "\u8f62"}, {0xf98e, "\u5e74"}, {0xf98f, "\u6190"}, {0xf990, "\u6200"}, + {0xf991, "\u649a"}, {0xf992, "\u6f23"}, {0xf993, "\u7149"}, {0xf994, "\u7489"}, + {0xf995, "\u79ca"}, {0xf996, "\u7df4"}, {0xf997, "\u806f"}, {0xf998, "\u8f26"}, + {0xf999, "\u84ee"}, {0xf99a, "\u9023"}, {0xf99b, "\u934a"}, {0xf99c, "\u5217"}, + {0xf99d, "\u52a3"}, {0xf99e, "\u54bd"}, {0xf99f, "\u70c8"}, {0xf9a0, "\u88c2"}, + {0xf9a1, "\u8aaa"}, {0xf9a2, "\u5ec9"}, {0xf9a3, "\u5ff5"}, {0xf9a4, "\u637b"}, + {0xf9a5, "\u6bae"}, {0xf9a6, "\u7c3e"}, {0xf9a7, "\u7375"}, {0xf9a8, "\u4ee4"}, + {0xf9a9, "\u56f9"}, {0xf9aa, "\u5be7"}, {0xf9ab, "\u5dba"}, {0xf9ac, "\u601c"}, + {0xf9ad, "\u73b2"}, {0xf9ae, "\u7469"}, {0xf9af, "\u7f9a"}, {0xf9b0, "\u8046"}, + {0xf9b1, "\u9234"}, {0xf9b2, "\u96f6"}, {0xf9b3, "\u9748"}, {0xf9b4, "\u9818"}, + {0xf9b5, "\u4f8b"}, {0xf9b6, "\u79ae"}, {0xf9b7, "\u91b4"}, {0xf9b8, "\u96b8"}, + {0xf9b9, "\u60e1"}, {0xf9ba, "\u4e86"}, {0xf9bb, "\u50da"}, {0xf9bc, "\u5bee"}, + {0xf9bd, "\u5c3f"}, {0xf9be, "\u6599"}, {0xf9bf, "\u6a02"}, {0xf9c0, "\u71ce"}, + {0xf9c1, "\u7642"}, {0xf9c2, "\u84fc"}, {0xf9c3, "\u907c"}, {0xf9c4, "\u9f8d"}, + {0xf9c5, "\u6688"}, {0xf9c6, "\u962e"}, {0xf9c7, "\u5289"}, {0xf9c8, "\u677b"}, + {0xf9c9, "\u67f3"}, {0xf9ca, "\u6d41"}, {0xf9cb, "\u6e9c"}, {0xf9cc, "\u7409"}, + {0xf9cd, "\u7559"}, {0xf9ce, "\u786b"}, {0xf9cf, "\u7d10"}, {0xf9d0, "\u985e"}, + {0xf9d1, "\u516d"}, {0xf9d2, "\u622e"}, {0xf9d3, "\u9678"}, {0xf9d4, "\u502b"}, + {0xf9d5, "\u5d19"}, {0xf9d6, "\u6dea"}, {0xf9d7, "\u8f2a"}, {0xf9d8, "\u5f8b"}, + {0xf9d9, "\u6144"}, {0xf9da, "\u6817"}, {0xf9db, "\u7387"}, {0xf9dc, "\u9686"}, + {0xf9dd, "\u5229"}, {0xf9de, "\u540f"}, {0xf9df, "\u5c65"}, {0xf9e0, "\u6613"}, + {0xf9e1, "\u674e"}, {0xf9e2, "\u68a8"}, {0xf9e3, "\u6ce5"}, {0xf9e4, "\u7406"}, + {0xf9e5, "\u75e2"}, {0xf9e6, "\u7f79"}, {0xf9e7, "\u88cf"}, {0xf9e8, "\u88e1"}, + {0xf9e9, "\u91cc"}, {0xf9ea, "\u96e2"}, {0xf9eb, "\u533f"}, {0xf9ec, "\u6eba"}, + {0xf9ed, "\u541d"}, {0xf9ee, "\u71d0"}, {0xf9ef, "\u7498"}, {0xf9f0, "\u85fa"}, + {0xf9f1, "\u96a3"}, {0xf9f2, "\u9c57"}, {0xf9f3, "\u9e9f"}, {0xf9f4, "\u6797"}, + {0xf9f5, "\u6dcb"}, {0xf9f6, "\u81e8"}, {0xf9f7, "\u7acb"}, {0xf9f8, "\u7b20"}, + {0xf9f9, "\u7c92"}, {0xf9fa, "\u72c0"}, {0xf9fb, "\u7099"}, {0xf9fc, "\u8b58"}, + {0xf9fd, "\u4ec0"}, {0xf9fe, "\u8336"}, {0xf9ff, "\u523a"}, {0xfa00, "\u5207"}, + {0xfa01, "\u5ea6"}, {0xfa02, "\u62d3"}, {0xfa03, "\u7cd6"}, {0xfa04, "\u5b85"}, + {0xfa05, "\u6d1e"}, {0xfa06, "\u66b4"}, {0xfa07, "\u8f3b"}, {0xfa08, "\u884c"}, + {0xfa09, "\u964d"}, {0xfa0a, "\u898b"}, {0xfa0b, "\u5ed3"}, {0xfa0c, "\u5140"}, + {0xfa0d, "\u55c0"}, {0xfa10, "\u585a"}, {0xfa12, "\u6674"}, {0xfa15, "\u51de"}, + {0xfa16, "\u732a"}, {0xfa17, "\u76ca"}, {0xfa18, "\u793c"}, {0xfa19, "\u795e"}, + {0xfa1a, "\u7965"}, {0xfa1b, "\u798f"}, {0xfa1c, "\u9756"}, {0xfa1d, "\u7cbe"}, + {0xfa1e, "\u7fbd"}, {0xfa20, "\u8612"}, {0xfa22, "\u8af8"}, {0xfa25, "\u9038"}, + {0xfa26, "\u90fd"}, {0xfa2a, "\u98ef"}, {0xfa2b, "\u98fc"}, {0xfa2c, "\u9928"}, + {0xfa2d, "\u9db4"}, {0xfa2e, "\u90de"}, {0xfa2f, "\u96b7"}, {0xfa30, "\u4fae"}, + {0xfa31, "\u50e7"}, {0xfa32, "\u514d"}, {0xfa33, "\u52c9"}, {0xfa34, "\u52e4"}, + {0xfa35, "\u5351"}, {0xfa36, "\u559d"}, {0xfa37, "\u5606"}, {0xfa38, "\u5668"}, + {0xfa39, "\u5840"}, {0xfa3a, "\u58a8"}, {0xfa3b, "\u5c64"}, {0xfa3c, "\u5c6e"}, + {0xfa3d, "\u6094"}, {0xfa3e, "\u6168"}, {0xfa3f, "\u618e"}, {0xfa40, "\u61f2"}, + {0xfa41, "\u654f"}, {0xfa42, "\u65e2"}, {0xfa43, "\u6691"}, {0xfa44, "\u6885"}, + {0xfa45, "\u6d77"}, {0xfa46, "\u6e1a"}, {0xfa47, "\u6f22"}, {0xfa48, "\u716e"}, + {0xfa49, "\u722b"}, {0xfa4a, "\u7422"}, {0xfa4b, "\u7891"}, {0xfa4c, "\u793e"}, + {0xfa4d, "\u7949"}, {0xfa4e, "\u7948"}, {0xfa4f, "\u7950"}, {0xfa50, "\u7956"}, + {0xfa51, "\u795d"}, {0xfa52, "\u798d"}, {0xfa53, "\u798e"}, {0xfa54, "\u7a40"}, + {0xfa55, "\u7a81"}, {0xfa56, "\u7bc0"}, {0xfa57, "\u7df4"}, {0xfa58, "\u7e09"}, + {0xfa59, "\u7e41"}, {0xfa5a, "\u7f72"}, {0xfa5b, "\u8005"}, {0xfa5c, "\u81ed"}, + {0xfa5d, "\u8279"}, {0xfa5e, "\u8279"}, {0xfa5f, "\u8457"}, {0xfa60, "\u8910"}, + {0xfa61, "\u8996"}, {0xfa62, "\u8b01"}, {0xfa63, "\u8b39"}, {0xfa64, "\u8cd3"}, + {0xfa65, "\u8d08"}, {0xfa66, "\u8fb6"}, {0xfa67, "\u9038"}, {0xfa68, "\u96e3"}, + {0xfa69, "\u97ff"}, {0xfa6a, "\u983b"}, {0xfa6b, "\u6075"}, {0xfa6c, "\U000242ee"}, + {0xfa6d, "\u8218"}, {0xfa70, "\u4e26"}, {0xfa71, "\u51b5"}, {0xfa72, "\u5168"}, + {0xfa73, "\u4f80"}, {0xfa74, "\u5145"}, {0xfa75, "\u5180"}, {0xfa76, "\u52c7"}, + {0xfa77, "\u52fa"}, {0xfa78, "\u559d"}, {0xfa79, "\u5555"}, {0xfa7a, "\u5599"}, + {0xfa7b, "\u55e2"}, {0xfa7c, "\u585a"}, {0xfa7d, "\u58b3"}, {0xfa7e, "\u5944"}, + {0xfa7f, "\u5954"}, {0xfa80, "\u5a62"}, {0xfa81, "\u5b28"}, {0xfa82, "\u5ed2"}, + {0xfa83, "\u5ed9"}, {0xfa84, "\u5f69"}, {0xfa85, "\u5fad"}, {0xfa86, "\u60d8"}, + {0xfa87, "\u614e"}, {0xfa88, "\u6108"}, {0xfa89, "\u618e"}, {0xfa8a, "\u6160"}, + {0xfa8b, "\u61f2"}, {0xfa8c, "\u6234"}, {0xfa8d, "\u63c4"}, {0xfa8e, "\u641c"}, + {0xfa8f, "\u6452"}, {0xfa90, "\u6556"}, {0xfa91, "\u6674"}, {0xfa92, "\u6717"}, + {0xfa93, "\u671b"}, {0xfa94, "\u6756"}, {0xfa95, "\u6b79"}, {0xfa96, "\u6bba"}, + {0xfa97, "\u6d41"}, {0xfa98, "\u6edb"}, {0xfa99, "\u6ecb"}, {0xfa9a, "\u6f22"}, + {0xfa9b, "\u701e"}, {0xfa9c, "\u716e"}, {0xfa9d, "\u77a7"}, {0xfa9e, "\u7235"}, + {0xfa9f, "\u72af"}, {0xfaa0, "\u732a"}, {0xfaa1, "\u7471"}, {0xfaa2, "\u7506"}, + {0xfaa3, "\u753b"}, {0xfaa4, "\u761d"}, {0xfaa5, "\u761f"}, {0xfaa6, "\u76ca"}, + {0xfaa7, "\u76db"}, {0xfaa8, "\u76f4"}, {0xfaa9, "\u774a"}, {0xfaaa, "\u7740"}, + {0xfaab, "\u78cc"}, {0xfaac, "\u7ab1"}, {0xfaad, "\u7bc0"}, {0xfaae, "\u7c7b"}, + {0xfaaf, "\u7d5b"}, {0xfab0, "\u7df4"}, {0xfab1, "\u7f3e"}, {0xfab2, "\u8005"}, + {0xfab3, "\u8352"}, {0xfab4, "\u83ef"}, {0xfab5, "\u8779"}, {0xfab6, "\u8941"}, + {0xfab7, "\u8986"}, {0xfab8, "\u8996"}, {0xfab9, "\u8abf"}, {0xfaba, "\u8af8"}, + {0xfabb, "\u8acb"}, {0xfabc, "\u8b01"}, {0xfabd, "\u8afe"}, {0xfabe, "\u8aed"}, + {0xfabf, "\u8b39"}, {0xfac0, "\u8b8a"}, {0xfac1, "\u8d08"}, {0xfac2, "\u8f38"}, + {0xfac3, "\u9072"}, {0xfac4, "\u9199"}, {0xfac5, "\u9276"}, {0xfac6, "\u967c"}, + {0xfac7, "\u96e3"}, {0xfac8, "\u9756"}, {0xfac9, "\u97db"}, {0xfaca, "\u97ff"}, + {0xfacb, "\u980b"}, {0xfacc, "\u983b"}, {0xfacd, "\u9b12"}, {0xface, "\u9f9c"}, + {0xfacf, "\U0002284a"}, {0xfad0, "\U00022844"}, {0xfad1, "\U000233d5"}, {0xfad2, "\u3b9d"}, + {0xfad3, "\u4018"}, {0xfad4, "\u4039"}, {0xfad5, "\U00025249"}, {0xfad6, "\U00025cd0"}, + {0xfad7, "\U00027ed3"}, {0xfad8, "\u9f43"}, {0xfad9, "\u9f8e"}, {0xfb1d, "\u05d9\u05b4"}, + {0xfb1f, "\u05f2\u05b7"}, {0xfb2a, "\u05e9\u05c1"}, {0xfb2b, "\u05e9\u05c2"}, {0xfb2c, "\u05e9\u05bc\u05c1"}, + {0xfb2d, "\u05e9\u05bc\u05c2"}, {0xfb2e, "\u05d0\u05b7"}, {0xfb2f, "\u05d0\u05b8"}, {0xfb30, "\u05d0\u05bc"}, + {0xfb31, "\u05d1\u05bc"}, {0xfb32, "\u05d2\u05bc"}, {0xfb33, "\u05d3\u05bc"}, {0xfb34, "\u05d4\u05bc"}, + {0xfb35, "\u05d5\u05bc"}, {0xfb36, "\u05d6\u05bc"}, {0xfb38, "\u05d8\u05bc"}, {0xfb39, "\u05d9\u05bc"}, + {0xfb3a, "\u05da\u05bc"}, {0xfb3b, "\u05db\u05bc"}, {0xfb3c, "\u05dc\u05bc"}, {0xfb3e, "\u05de\u05bc"}, + {0xfb40, "\u05e0\u05bc"}, {0xfb41, "\u05e1\u05bc"}, {0xfb43, "\u05e3\u05bc"}, {0xfb44, "\u05e4\u05bc"}, + {0xfb46, "\u05e6\u05bc"}, {0xfb47, "\u05e7\u05bc"}, {0xfb48, "\u05e8\u05bc"}, {0xfb49, "\u05e9\u05bc"}, + {0xfb4a, "\u05ea\u05bc"}, {0xfb4b, "\u05d5\u05b9"}, {0xfb4c, "\u05d1\u05bf"}, {0xfb4d, "\u05db\u05bf"}, + {0xfb4e, "\u05e4\u05bf"}, {0x105c9, "\U000105d2\u0307"}, {0x105e4, "\U000105da\u0307"}, {0x1109a, "\U00011099\U000110ba"}, + {0x1109c, "\U0001109b\U000110ba"}, {0x110ab, "\U000110a5\U000110ba"}, {0x1112e, "\U00011131\U00011127"}, {0x1112f, "\U00011132\U00011127"}, + {0x1134b, "\U00011347\U0001133e"}, {0x1134c, "\U00011347\U00011357"}, {0x11383, "\U00011382\U000113c9"}, {0x11385, "\U00011384\U000113bb"}, + {0x1138e, "\U0001138b\U000113c2"}, {0x11391, "\U00011390\U000113c9"}, {0x113c5, "\U000113c2\U000113c2"}, {0x113c7, "\U000113c2\U000113b8"}, + {0x113c8, "\U000113c2\U000113c9"}, {0x114bb, "\U000114b9\U000114ba"}, {0x114bc, "\U000114b9\U000114b0"}, {0x114be, "\U000114b9\U000114bd"}, + {0x115ba, "\U000115b8\U000115af"}, {0x115bb, "\U000115b9\U000115af"}, {0x11938, "\U00011935\U00011930"}, {0x16121, "\U0001611e\U0001611e"}, + {0x16122, "\U0001611e\U00016129"}, {0x16123, "\U0001611e\U0001611f"}, {0x16124, "\U00016129\U0001611f"}, {0x16125, "\U0001611e\U00016120"}, + {0x16126, "\U0001611e\U0001611e\U0001611f"}, {0x16127, "\U0001611e\U00016129\U0001611f"}, {0x16128, "\U0001611e\U0001611e\U00016120"}, {0x16d68, "\U00016d67\U00016d67"}, + {0x16d69, "\U00016d63\U00016d67"}, {0x16d6a, "\U00016d63\U00016d67\U00016d67"}, {0x1d15e, "\U0001d157\U0001d165"}, {0x1d15f, "\U0001d158\U0001d165"}, + {0x1d160, "\U0001d158\U0001d165\U0001d16e"}, {0x1d161, "\U0001d158\U0001d165\U0001d16f"}, {0x1d162, "\U0001d158\U0001d165\U0001d170"}, {0x1d163, "\U0001d158\U0001d165\U0001d171"}, + {0x1d164, "\U0001d158\U0001d165\U0001d172"}, {0x1d1bb, "\U0001d1b9\U0001d165"}, {0x1d1bc, "\U0001d1ba\U0001d165"}, {0x1d1bd, "\U0001d1b9\U0001d165\U0001d16e"}, + {0x1d1be, "\U0001d1ba\U0001d165\U0001d16e"}, {0x1d1bf, "\U0001d1b9\U0001d165\U0001d16f"}, {0x1d1c0, "\U0001d1ba\U0001d165\U0001d16f"}, {0x2f800, "\u4e3d"}, + {0x2f801, "\u4e38"}, {0x2f802, "\u4e41"}, {0x2f803, "\U00020122"}, {0x2f804, "\u4f60"}, + {0x2f805, "\u4fae"}, {0x2f806, "\u4fbb"}, {0x2f807, "\u5002"}, {0x2f808, "\u507a"}, + {0x2f809, "\u5099"}, {0x2f80a, "\u50e7"}, {0x2f80b, "\u50cf"}, {0x2f80c, "\u349e"}, + {0x2f80d, "\U0002063a"}, {0x2f80e, "\u514d"}, {0x2f80f, "\u5154"}, {0x2f810, "\u5164"}, + {0x2f811, "\u5177"}, {0x2f812, "\U0002051c"}, {0x2f813, "\u34b9"}, {0x2f814, "\u5167"}, + {0x2f815, "\u518d"}, {0x2f816, "\U0002054b"}, {0x2f817, "\u5197"}, {0x2f818, "\u51a4"}, + {0x2f819, "\u4ecc"}, {0x2f81a, "\u51ac"}, {0x2f81b, "\u51b5"}, {0x2f81c, "\U000291df"}, + {0x2f81d, "\u51f5"}, {0x2f81e, "\u5203"}, {0x2f81f, "\u34df"}, {0x2f820, "\u523b"}, + {0x2f821, "\u5246"}, {0x2f822, "\u5272"}, {0x2f823, "\u5277"}, {0x2f824, "\u3515"}, + {0x2f825, "\u52c7"}, {0x2f826, "\u52c9"}, {0x2f827, "\u52e4"}, {0x2f828, "\u52fa"}, + {0x2f829, "\u5305"}, {0x2f82a, "\u5306"}, {0x2f82b, "\u5317"}, {0x2f82c, "\u5349"}, + {0x2f82d, "\u5351"}, {0x2f82e, "\u535a"}, {0x2f82f, "\u5373"}, {0x2f830, "\u537d"}, + {0x2f831, "\u537f"}, {0x2f832, "\u537f"}, {0x2f833, "\u537f"}, {0x2f834, "\U00020a2c"}, + {0x2f835, "\u7070"}, {0x2f836, "\u53ca"}, {0x2f837, "\u53df"}, {0x2f838, "\U00020b63"}, + {0x2f839, "\u53eb"}, {0x2f83a, "\u53f1"}, {0x2f83b, "\u5406"}, {0x2f83c, "\u549e"}, + {0x2f83d, "\u5438"}, {0x2f83e, "\u5448"}, {0x2f83f, "\u5468"}, {0x2f840, "\u54a2"}, + {0x2f841, "\u54f6"}, {0x2f842, "\u5510"}, {0x2f843, "\u5553"}, {0x2f844, "\u5563"}, + {0x2f845, "\u5584"}, {0x2f846, "\u5584"}, {0x2f847, "\u5599"}, {0x2f848, "\u55ab"}, + {0x2f849, "\u55b3"}, {0x2f84a, "\u55c2"}, {0x2f84b, "\u5716"}, {0x2f84c, "\u5606"}, + {0x2f84d, "\u5717"}, {0x2f84e, "\u5651"}, {0x2f84f, "\u5674"}, {0x2f850, "\u5207"}, + {0x2f851, "\u58ee"}, {0x2f852, "\u57ce"}, {0x2f853, "\u57f4"}, {0x2f854, "\u580d"}, + {0x2f855, "\u578b"}, {0x2f856, "\u5832"}, {0x2f857, "\u5831"}, {0x2f858, "\u58ac"}, + {0x2f859, "\U000214e4"}, {0x2f85a, "\u58f2"}, {0x2f85b, "\u58f7"}, {0x2f85c, "\u5906"}, + {0x2f85d, "\u591a"}, {0x2f85e, "\u5922"}, {0x2f85f, "\u5962"}, {0x2f860, "\U000216a8"}, + {0x2f861, "\U000216ea"}, {0x2f862, "\u59ec"}, {0x2f863, "\u5a1b"}, {0x2f864, "\u5a27"}, + {0x2f865, "\u59d8"}, {0x2f866, "\u5a66"}, {0x2f867, "\u36ee"}, {0x2f868, "\u36fc"}, + {0x2f869, "\u5b08"}, {0x2f86a, "\u5b3e"}, {0x2f86b, "\u5b3e"}, {0x2f86c, "\U000219c8"}, + {0x2f86d, "\u5bc3"}, {0x2f86e, "\u5bd8"}, {0x2f86f, "\u5be7"}, {0x2f870, "\u5bf3"}, + {0x2f871, "\U00021b18"}, {0x2f872, "\u5bff"}, {0x2f873, "\u5c06"}, {0x2f874, "\u5f53"}, + {0x2f875, "\u5c22"}, {0x2f876, "\u3781"}, {0x2f877, "\u5c60"}, {0x2f878, "\u5c6e"}, + {0x2f879, "\u5cc0"}, {0x2f87a, "\u5c8d"}, {0x2f87b, "\U00021de4"}, {0x2f87c, "\u5d43"}, + {0x2f87d, "\U00021de6"}, {0x2f87e, "\u5d6e"}, {0x2f87f, "\u5d6b"}, {0x2f880, "\u5d7c"}, + {0x2f881, "\u5de1"}, {0x2f882, "\u5de2"}, {0x2f883, "\u382f"}, {0x2f884, "\u5dfd"}, + {0x2f885, "\u5e28"}, {0x2f886, "\u5e3d"}, {0x2f887, "\u5e69"}, {0x2f888, "\u3862"}, + {0x2f889, "\U00022183"}, {0x2f88a, "\u387c"}, {0x2f88b, "\u5eb0"}, {0x2f88c, "\u5eb3"}, + {0x2f88d, "\u5eb6"}, {0x2f88e, "\u5eca"}, {0x2f88f, "\U0002a392"}, {0x2f890, "\u5efe"}, + {0x2f891, "\U00022331"}, {0x2f892, "\U00022331"}, {0x2f893, "\u8201"}, {0x2f894, "\u5f22"}, + {0x2f895, "\u5f22"}, {0x2f896, "\u38c7"}, {0x2f897, "\U000232b8"}, {0x2f898, "\U000261da"}, + {0x2f899, "\u5f62"}, {0x2f89a, "\u5f6b"}, {0x2f89b, "\u38e3"}, {0x2f89c, "\u5f9a"}, + {0x2f89d, "\u5fcd"}, {0x2f89e, "\u5fd7"}, {0x2f89f, "\u5ff9"}, {0x2f8a0, "\u6081"}, + {0x2f8a1, "\u393a"}, {0x2f8a2, "\u391c"}, {0x2f8a3, "\u6094"}, {0x2f8a4, "\U000226d4"}, + {0x2f8a5, "\u60c7"}, {0x2f8a6, "\u6148"}, {0x2f8a7, "\u614c"}, {0x2f8a8, "\u614e"}, + {0x2f8a9, "\u614c"}, {0x2f8aa, "\u617a"}, {0x2f8ab, "\u618e"}, {0x2f8ac, "\u61b2"}, + {0x2f8ad, "\u61a4"}, {0x2f8ae, "\u61af"}, {0x2f8af, "\u61de"}, {0x2f8b0, "\u61f2"}, + {0x2f8b1, "\u61f6"}, {0x2f8b2, "\u6210"}, {0x2f8b3, "\u621b"}, {0x2f8b4, "\u625d"}, + {0x2f8b5, "\u62b1"}, {0x2f8b6, "\u62d4"}, {0x2f8b7, "\u6350"}, {0x2f8b8, "\U00022b0c"}, + {0x2f8b9, "\u633d"}, {0x2f8ba, "\u62fc"}, {0x2f8bb, "\u6368"}, {0x2f8bc, "\u6383"}, + {0x2f8bd, "\u63e4"}, {0x2f8be, "\U00022bf1"}, {0x2f8bf, "\u6422"}, {0x2f8c0, "\u63c5"}, + {0x2f8c1, "\u63a9"}, {0x2f8c2, "\u3a2e"}, {0x2f8c3, "\u6469"}, {0x2f8c4, "\u647e"}, + {0x2f8c5, "\u649d"}, {0x2f8c6, "\u6477"}, {0x2f8c7, "\u3a6c"}, {0x2f8c8, "\u654f"}, + {0x2f8c9, "\u656c"}, {0x2f8ca, "\U0002300a"}, {0x2f8cb, "\u65e3"}, {0x2f8cc, "\u66f8"}, + {0x2f8cd, "\u6649"}, {0x2f8ce, "\u3b19"}, {0x2f8cf, "\u6691"}, {0x2f8d0, "\u3b08"}, + {0x2f8d1, "\u3ae4"}, {0x2f8d2, "\u5192"}, {0x2f8d3, "\u5195"}, {0x2f8d4, "\u6700"}, + {0x2f8d5, "\u669c"}, {0x2f8d6, "\u80ad"}, {0x2f8d7, "\u43d9"}, {0x2f8d8, "\u6717"}, + {0x2f8d9, "\u671b"}, {0x2f8da, "\u6721"}, {0x2f8db, "\u675e"}, {0x2f8dc, "\u6753"}, + {0x2f8dd, "\U000233c3"}, {0x2f8de, "\u3b49"}, {0x2f8df, "\u67fa"}, {0x2f8e0, "\u6785"}, + {0x2f8e1, "\u6852"}, {0x2f8e2, "\u6885"}, {0x2f8e3, "\U0002346d"}, {0x2f8e4, "\u688e"}, + {0x2f8e5, "\u681f"}, {0x2f8e6, "\u6914"}, {0x2f8e7, "\u3b9d"}, {0x2f8e8, "\u6942"}, + {0x2f8e9, "\u69a3"}, {0x2f8ea, "\u69ea"}, {0x2f8eb, "\u6aa8"}, {0x2f8ec, "\U000236a3"}, + {0x2f8ed, "\u6adb"}, {0x2f8ee, "\u3c18"}, {0x2f8ef, "\u6b21"}, {0x2f8f0, "\U000238a7"}, + {0x2f8f1, "\u6b54"}, {0x2f8f2, "\u3c4e"}, {0x2f8f3, "\u6b72"}, {0x2f8f4, "\u6b9f"}, + {0x2f8f5, "\u6bba"}, {0x2f8f6, "\u6bbb"}, {0x2f8f7, "\U00023a8d"}, {0x2f8f8, "\U00021d0b"}, + {0x2f8f9, "\U00023afa"}, {0x2f8fa, "\u6c4e"}, {0x2f8fb, "\U00023cbc"}, {0x2f8fc, "\u6cbf"}, + {0x2f8fd, "\u6ccd"}, {0x2f8fe, "\u6c67"}, {0x2f8ff, "\u6d16"}, {0x2f900, "\u6d3e"}, + {0x2f901, "\u6d77"}, {0x2f902, "\u6d41"}, {0x2f903, "\u6d69"}, {0x2f904, "\u6d78"}, + {0x2f905, "\u6d85"}, {0x2f906, "\U00023d1e"}, {0x2f907, "\u6d34"}, {0x2f908, "\u6e2f"}, + {0x2f909, "\u6e6e"}, {0x2f90a, "\u3d33"}, {0x2f90b, "\u6ecb"}, {0x2f90c, "\u6ec7"}, + {0x2f90d, "\U00023ed1"}, {0x2f90e, "\u6df9"}, {0x2f90f, "\u6f6e"}, {0x2f910, "\U00023f5e"}, + {0x2f911, "\U00023f8e"}, {0x2f912, "\u6fc6"}, {0x2f913, "\u7039"}, {0x2f914, "\u701e"}, + {0x2f915, "\u701b"}, {0x2f916, "\u3d96"}, {0x2f917, "\u704a"}, {0x2f918, "\u707d"}, + {0x2f919, "\u7077"}, {0x2f91a, "\u70ad"}, {0x2f91b, "\U00020525"}, {0x2f91c, "\u7145"}, + {0x2f91d, "\U00024263"}, {0x2f91e, "\u719c"}, {0x2f91f, "\U000243ab"}, {0x2f920, "\u7228"}, + {0x2f921, "\u7235"}, {0x2f922, "\u7250"}, {0x2f923, "\U00024608"}, {0x2f924, "\u7280"}, + {0x2f925, "\u7295"}, {0x2f926, "\U00024735"}, {0x2f927, "\U00024814"}, {0x2f928, "\u737a"}, + {0x2f929, "\u738b"}, {0x2f92a, "\u3eac"}, {0x2f92b, "\u73a5"}, {0x2f92c, "\u3eb8"}, + {0x2f92d, "\u3eb8"}, {0x2f92e, "\u7447"}, {0x2f92f, "\u745c"}, {0x2f930, "\u7471"}, + {0x2f931, "\u7485"}, {0x2f932, "\u74ca"}, {0x2f933, "\u3f1b"}, {0x2f934, "\u7524"}, + {0x2f935, "\U00024c36"}, {0x2f936, "\u753e"}, {0x2f937, "\U00024c92"}, {0x2f938, "\u7570"}, + {0x2f939, "\U0002219f"}, {0x2f93a, "\u7610"}, {0x2f93b, "\U00024fa1"}, {0x2f93c, "\U00024fb8"}, + {0x2f93d, "\U00025044"}, {0x2f93e, "\u3ffc"}, {0x2f93f, "\u4008"}, {0x2f940, "\u76f4"}, + {0x2f941, "\U000250f3"}, {0x2f942, "\U000250f2"}, {0x2f943, "\U00025119"}, {0x2f944, "\U00025133"}, + {0x2f945, "\u771e"}, {0x2f946, "\u771f"}, {0x2f947, "\u771f"}, {0x2f948, "\u774a"}, + {0x2f949, "\u4039"}, {0x2f94a, "\u778b"}, {0x2f94b, "\u4046"}, {0x2f94c, "\u4096"}, + {0x2f94d, "\U0002541d"}, {0x2f94e, "\u784e"}, {0x2f94f, "\u788c"}, {0x2f950, "\u78cc"}, + {0x2f951, "\u40e3"}, {0x2f952, "\U00025626"}, {0x2f953, "\u7956"}, {0x2f954, "\U0002569a"}, + {0x2f955, "\U000256c5"}, {0x2f956, "\u798f"}, {0x2f957, "\u79eb"}, {0x2f958, "\u412f"}, + {0x2f959, "\u7a40"}, {0x2f95a, "\u7a4a"}, {0x2f95b, "\u7a4f"}, {0x2f95c, "\U0002597c"}, + {0x2f95d, "\U00025aa7"}, {0x2f95e, "\U00025aa7"}, {0x2f95f, "\u7aee"}, {0x2f960, "\u4202"}, + {0x2f961, "\U00025bab"}, {0x2f962, "\u7bc6"}, {0x2f963, "\u7bc9"}, {0x2f964, "\u4227"}, + {0x2f965, "\U00025c80"}, {0x2f966, "\u7cd2"}, {0x2f967, "\u42a0"}, {0x2f968, "\u7ce8"}, + {0x2f969, "\u7ce3"}, {0x2f96a, "\u7d00"}, {0x2f96b, "\U00025f86"}, {0x2f96c, "\u7d63"}, + {0x2f96d, "\u4301"}, {0x2f96e, "\u7dc7"}, {0x2f96f, "\u7e02"}, {0x2f970, "\u7e45"}, + {0x2f971, "\u4334"}, {0x2f972, "\U00026228"}, {0x2f973, "\U00026247"}, {0x2f974, "\u4359"}, + {0x2f975, "\U000262d9"}, {0x2f976, "\u7f7a"}, {0x2f977, "\U0002633e"}, {0x2f978, "\u7f95"}, + {0x2f979, "\u7ffa"}, {0x2f97a, "\u8005"}, {0x2f97b, "\U000264da"}, {0x2f97c, "\U00026523"}, + {0x2f97d, "\u8060"}, {0x2f97e, "\U000265a8"}, {0x2f97f, "\u8070"}, {0x2f980, "\U0002335f"}, + {0x2f981, "\u43d5"}, {0x2f982, "\u80b2"}, {0x2f983, "\u8103"}, {0x2f984, "\u440b"}, + {0x2f985, "\u813e"}, {0x2f986, "\u5ab5"}, {0x2f987, "\U000267a7"}, {0x2f988, "\U000267b5"}, + {0x2f989, "\U00023393"}, {0x2f98a, "\U0002339c"}, {0x2f98b, "\u8201"}, {0x2f98c, "\u8204"}, + {0x2f98d, "\u8f9e"}, {0x2f98e, "\u446b"}, {0x2f98f, "\u8291"}, {0x2f990, "\u828b"}, + {0x2f991, "\u829d"}, {0x2f992, "\u52b3"}, {0x2f993, "\u82b1"}, {0x2f994, "\u82b3"}, + {0x2f995, "\u82bd"}, {0x2f996, "\u82e6"}, {0x2f997, "\U00026b3c"}, {0x2f998, "\u82e5"}, + {0x2f999, "\u831d"}, {0x2f99a, "\u8363"}, {0x2f99b, "\u83ad"}, {0x2f99c, "\u8323"}, + {0x2f99d, "\u83bd"}, {0x2f99e, "\u83e7"}, {0x2f99f, "\u8457"}, {0x2f9a0, "\u8353"}, + {0x2f9a1, "\u83ca"}, {0x2f9a2, "\u83cc"}, {0x2f9a3, "\u83dc"}, {0x2f9a4, "\U00026c36"}, + {0x2f9a5, "\U00026d6b"}, {0x2f9a6, "\U00026cd5"}, {0x2f9a7, "\u452b"}, {0x2f9a8, "\u84f1"}, + {0x2f9a9, "\u84f3"}, {0x2f9aa, "\u8516"}, {0x2f9ab, "\U000273ca"}, {0x2f9ac, "\u8564"}, + {0x2f9ad, "\U00026f2c"}, {0x2f9ae, "\u455d"}, {0x2f9af, "\u4561"}, {0x2f9b0, "\U00026fb1"}, + {0x2f9b1, "\U000270d2"}, {0x2f9b2, "\u456b"}, {0x2f9b3, "\u8650"}, {0x2f9b4, "\u865c"}, + {0x2f9b5, "\u8667"}, {0x2f9b6, "\u8669"}, {0x2f9b7, "\u86a9"}, {0x2f9b8, "\u8688"}, + {0x2f9b9, "\u870e"}, {0x2f9ba, "\u86e2"}, {0x2f9bb, "\u8779"}, {0x2f9bc, "\u8728"}, + {0x2f9bd, "\u876b"}, {0x2f9be, "\u8786"}, {0x2f9bf, "\u45d7"}, {0x2f9c0, "\u87e1"}, + {0x2f9c1, "\u8801"}, {0x2f9c2, "\u45f9"}, {0x2f9c3, "\u8860"}, {0x2f9c4, "\u8863"}, + {0x2f9c5, "\U00027667"}, {0x2f9c6, "\u88d7"}, {0x2f9c7, "\u88de"}, {0x2f9c8, "\u4635"}, + {0x2f9c9, "\u88fa"}, {0x2f9ca, "\u34bb"}, {0x2f9cb, "\U000278ae"}, {0x2f9cc, "\U00027966"}, + {0x2f9cd, "\u46be"}, {0x2f9ce, "\u46c7"}, {0x2f9cf, "\u8aa0"}, {0x2f9d0, "\u8aed"}, + {0x2f9d1, "\u8b8a"}, {0x2f9d2, "\u8c55"}, {0x2f9d3, "\U00027ca8"}, {0x2f9d4, "\u8cab"}, + {0x2f9d5, "\u8cc1"}, {0x2f9d6, "\u8d1b"}, {0x2f9d7, "\u8d77"}, {0x2f9d8, "\U00027f2f"}, + {0x2f9d9, "\U00020804"}, {0x2f9da, "\u8dcb"}, {0x2f9db, "\u8dbc"}, {0x2f9dc, "\u8df0"}, + {0x2f9dd, "\U000208de"}, {0x2f9de, "\u8ed4"}, {0x2f9df, "\u8f38"}, {0x2f9e0, "\U000285d2"}, + {0x2f9e1, "\U000285ed"}, {0x2f9e2, "\u9094"}, {0x2f9e3, "\u90f1"}, {0x2f9e4, "\u9111"}, + {0x2f9e5, "\U0002872e"}, {0x2f9e6, "\u911b"}, {0x2f9e7, "\u9238"}, {0x2f9e8, "\u92d7"}, + {0x2f9e9, "\u92d8"}, {0x2f9ea, "\u927c"}, {0x2f9eb, "\u93f9"}, {0x2f9ec, "\u9415"}, + {0x2f9ed, "\U00028bfa"}, {0x2f9ee, "\u958b"}, {0x2f9ef, "\u4995"}, {0x2f9f0, "\u95b7"}, + {0x2f9f1, "\U00028d77"}, {0x2f9f2, "\u49e6"}, {0x2f9f3, "\u96c3"}, {0x2f9f4, "\u5db2"}, + {0x2f9f5, "\u9723"}, {0x2f9f6, "\U00029145"}, {0x2f9f7, "\U0002921a"}, {0x2f9f8, "\u4a6e"}, + {0x2f9f9, "\u4a76"}, {0x2f9fa, "\u97e0"}, {0x2f9fb, "\U0002940a"}, {0x2f9fc, "\u4ab2"}, + {0x2f9fd, "\U00029496"}, {0x2f9fe, "\u980b"}, {0x2f9ff, "\u980b"}, {0x2fa00, "\u9829"}, + {0x2fa01, "\U000295b6"}, {0x2fa02, "\u98e2"}, {0x2fa03, "\u4b33"}, {0x2fa04, "\u9929"}, + {0x2fa05, "\u99a7"}, {0x2fa06, "\u99c2"}, {0x2fa07, "\u99fe"}, {0x2fa08, "\u4bce"}, + {0x2fa09, "\U00029b30"}, {0x2fa0a, "\u9b12"}, {0x2fa0b, "\u9c40"}, {0x2fa0c, "\u9cfd"}, + {0x2fa0d, "\u4cce"}, {0x2fa0e, "\u4ced"}, {0x2fa0f, "\u9d67"}, {0x2fa10, "\U0002a0ce"}, + {0x2fa11, "\u4cf8"}, {0x2fa12, "\U0002a105"}, {0x2fa13, "\U0002a20e"}, {0x2fa14, "\U0002a291"}, + {0x2fa15, "\u9ebb"}, {0x2fa16, "\u4d56"}, {0x2fa17, "\u9ef9"}, {0x2fa18, "\u9efe"}, + {0x2fa19, "\u9f05"}, {0x2fa1a, "\u9f0f"}, {0x2fa1b, "\u9f16"}, {0x2fa1c, "\u9f3b"}, + {0x2fa1d, "\U0002a600"}, +} + +// uniCompose: canonical composition pairs (first, second) -> primary composite, without the +// Hangul syllables and the composition exclusions. Sorted by first, then second. +var uniCompose = []composePair{ + {0x3c, 0x338, 0x226e}, {0x3d, 0x338, 0x2260}, {0x3e, 0x338, 0x226f}, {0x41, 0x300, 0xc0}, + {0x41, 0x301, 0xc1}, {0x41, 0x302, 0xc2}, {0x41, 0x303, 0xc3}, {0x41, 0x304, 0x100}, + {0x41, 0x306, 0x102}, {0x41, 0x307, 0x226}, {0x41, 0x308, 0xc4}, {0x41, 0x309, 0x1ea2}, + {0x41, 0x30a, 0xc5}, {0x41, 0x30c, 0x1cd}, {0x41, 0x30f, 0x200}, {0x41, 0x311, 0x202}, + {0x41, 0x323, 0x1ea0}, {0x41, 0x325, 0x1e00}, {0x41, 0x328, 0x104}, {0x42, 0x307, 0x1e02}, + {0x42, 0x323, 0x1e04}, {0x42, 0x331, 0x1e06}, {0x43, 0x301, 0x106}, {0x43, 0x302, 0x108}, + {0x43, 0x307, 0x10a}, {0x43, 0x30c, 0x10c}, {0x43, 0x327, 0xc7}, {0x44, 0x307, 0x1e0a}, + {0x44, 0x30c, 0x10e}, {0x44, 0x323, 0x1e0c}, {0x44, 0x327, 0x1e10}, {0x44, 0x32d, 0x1e12}, + {0x44, 0x331, 0x1e0e}, {0x45, 0x300, 0xc8}, {0x45, 0x301, 0xc9}, {0x45, 0x302, 0xca}, + {0x45, 0x303, 0x1ebc}, {0x45, 0x304, 0x112}, {0x45, 0x306, 0x114}, {0x45, 0x307, 0x116}, + {0x45, 0x308, 0xcb}, {0x45, 0x309, 0x1eba}, {0x45, 0x30c, 0x11a}, {0x45, 0x30f, 0x204}, + {0x45, 0x311, 0x206}, {0x45, 0x323, 0x1eb8}, {0x45, 0x327, 0x228}, {0x45, 0x328, 0x118}, + {0x45, 0x32d, 0x1e18}, {0x45, 0x330, 0x1e1a}, {0x46, 0x307, 0x1e1e}, {0x47, 0x301, 0x1f4}, + {0x47, 0x302, 0x11c}, {0x47, 0x304, 0x1e20}, {0x47, 0x306, 0x11e}, {0x47, 0x307, 0x120}, + {0x47, 0x30c, 0x1e6}, {0x47, 0x327, 0x122}, {0x48, 0x302, 0x124}, {0x48, 0x307, 0x1e22}, + {0x48, 0x308, 0x1e26}, {0x48, 0x30c, 0x21e}, {0x48, 0x323, 0x1e24}, {0x48, 0x327, 0x1e28}, + {0x48, 0x32e, 0x1e2a}, {0x49, 0x300, 0xcc}, {0x49, 0x301, 0xcd}, {0x49, 0x302, 0xce}, + {0x49, 0x303, 0x128}, {0x49, 0x304, 0x12a}, {0x49, 0x306, 0x12c}, {0x49, 0x307, 0x130}, + {0x49, 0x308, 0xcf}, {0x49, 0x309, 0x1ec8}, {0x49, 0x30c, 0x1cf}, {0x49, 0x30f, 0x208}, + {0x49, 0x311, 0x20a}, {0x49, 0x323, 0x1eca}, {0x49, 0x328, 0x12e}, {0x49, 0x330, 0x1e2c}, + {0x4a, 0x302, 0x134}, {0x4b, 0x301, 0x1e30}, {0x4b, 0x30c, 0x1e8}, {0x4b, 0x323, 0x1e32}, + {0x4b, 0x327, 0x136}, {0x4b, 0x331, 0x1e34}, {0x4c, 0x301, 0x139}, {0x4c, 0x30c, 0x13d}, + {0x4c, 0x323, 0x1e36}, {0x4c, 0x327, 0x13b}, {0x4c, 0x32d, 0x1e3c}, {0x4c, 0x331, 0x1e3a}, + {0x4d, 0x301, 0x1e3e}, {0x4d, 0x307, 0x1e40}, {0x4d, 0x323, 0x1e42}, {0x4e, 0x300, 0x1f8}, + {0x4e, 0x301, 0x143}, {0x4e, 0x303, 0xd1}, {0x4e, 0x307, 0x1e44}, {0x4e, 0x30c, 0x147}, + {0x4e, 0x323, 0x1e46}, {0x4e, 0x327, 0x145}, {0x4e, 0x32d, 0x1e4a}, {0x4e, 0x331, 0x1e48}, + {0x4f, 0x300, 0xd2}, {0x4f, 0x301, 0xd3}, {0x4f, 0x302, 0xd4}, {0x4f, 0x303, 0xd5}, + {0x4f, 0x304, 0x14c}, {0x4f, 0x306, 0x14e}, {0x4f, 0x307, 0x22e}, {0x4f, 0x308, 0xd6}, + {0x4f, 0x309, 0x1ece}, {0x4f, 0x30b, 0x150}, {0x4f, 0x30c, 0x1d1}, {0x4f, 0x30f, 0x20c}, + {0x4f, 0x311, 0x20e}, {0x4f, 0x31b, 0x1a0}, {0x4f, 0x323, 0x1ecc}, {0x4f, 0x328, 0x1ea}, + {0x50, 0x301, 0x1e54}, {0x50, 0x307, 0x1e56}, {0x52, 0x301, 0x154}, {0x52, 0x307, 0x1e58}, + {0x52, 0x30c, 0x158}, {0x52, 0x30f, 0x210}, {0x52, 0x311, 0x212}, {0x52, 0x323, 0x1e5a}, + {0x52, 0x327, 0x156}, {0x52, 0x331, 0x1e5e}, {0x53, 0x301, 0x15a}, {0x53, 0x302, 0x15c}, + {0x53, 0x307, 0x1e60}, {0x53, 0x30c, 0x160}, {0x53, 0x323, 0x1e62}, {0x53, 0x326, 0x218}, + {0x53, 0x327, 0x15e}, {0x54, 0x307, 0x1e6a}, {0x54, 0x30c, 0x164}, {0x54, 0x323, 0x1e6c}, + {0x54, 0x326, 0x21a}, {0x54, 0x327, 0x162}, {0x54, 0x32d, 0x1e70}, {0x54, 0x331, 0x1e6e}, + {0x55, 0x300, 0xd9}, {0x55, 0x301, 0xda}, {0x55, 0x302, 0xdb}, {0x55, 0x303, 0x168}, + {0x55, 0x304, 0x16a}, {0x55, 0x306, 0x16c}, {0x55, 0x308, 0xdc}, {0x55, 0x309, 0x1ee6}, + {0x55, 0x30a, 0x16e}, {0x55, 0x30b, 0x170}, {0x55, 0x30c, 0x1d3}, {0x55, 0x30f, 0x214}, + {0x55, 0x311, 0x216}, {0x55, 0x31b, 0x1af}, {0x55, 0x323, 0x1ee4}, {0x55, 0x324, 0x1e72}, + {0x55, 0x328, 0x172}, {0x55, 0x32d, 0x1e76}, {0x55, 0x330, 0x1e74}, {0x56, 0x303, 0x1e7c}, + {0x56, 0x323, 0x1e7e}, {0x57, 0x300, 0x1e80}, {0x57, 0x301, 0x1e82}, {0x57, 0x302, 0x174}, + {0x57, 0x307, 0x1e86}, {0x57, 0x308, 0x1e84}, {0x57, 0x323, 0x1e88}, {0x58, 0x307, 0x1e8a}, + {0x58, 0x308, 0x1e8c}, {0x59, 0x300, 0x1ef2}, {0x59, 0x301, 0xdd}, {0x59, 0x302, 0x176}, + {0x59, 0x303, 0x1ef8}, {0x59, 0x304, 0x232}, {0x59, 0x307, 0x1e8e}, {0x59, 0x308, 0x178}, + {0x59, 0x309, 0x1ef6}, {0x59, 0x323, 0x1ef4}, {0x5a, 0x301, 0x179}, {0x5a, 0x302, 0x1e90}, + {0x5a, 0x307, 0x17b}, {0x5a, 0x30c, 0x17d}, {0x5a, 0x323, 0x1e92}, {0x5a, 0x331, 0x1e94}, + {0x61, 0x300, 0xe0}, {0x61, 0x301, 0xe1}, {0x61, 0x302, 0xe2}, {0x61, 0x303, 0xe3}, + {0x61, 0x304, 0x101}, {0x61, 0x306, 0x103}, {0x61, 0x307, 0x227}, {0x61, 0x308, 0xe4}, + {0x61, 0x309, 0x1ea3}, {0x61, 0x30a, 0xe5}, {0x61, 0x30c, 0x1ce}, {0x61, 0x30f, 0x201}, + {0x61, 0x311, 0x203}, {0x61, 0x323, 0x1ea1}, {0x61, 0x325, 0x1e01}, {0x61, 0x328, 0x105}, + {0x62, 0x307, 0x1e03}, {0x62, 0x323, 0x1e05}, {0x62, 0x331, 0x1e07}, {0x63, 0x301, 0x107}, + {0x63, 0x302, 0x109}, {0x63, 0x307, 0x10b}, {0x63, 0x30c, 0x10d}, {0x63, 0x327, 0xe7}, + {0x64, 0x307, 0x1e0b}, {0x64, 0x30c, 0x10f}, {0x64, 0x323, 0x1e0d}, {0x64, 0x327, 0x1e11}, + {0x64, 0x32d, 0x1e13}, {0x64, 0x331, 0x1e0f}, {0x65, 0x300, 0xe8}, {0x65, 0x301, 0xe9}, + {0x65, 0x302, 0xea}, {0x65, 0x303, 0x1ebd}, {0x65, 0x304, 0x113}, {0x65, 0x306, 0x115}, + {0x65, 0x307, 0x117}, {0x65, 0x308, 0xeb}, {0x65, 0x309, 0x1ebb}, {0x65, 0x30c, 0x11b}, + {0x65, 0x30f, 0x205}, {0x65, 0x311, 0x207}, {0x65, 0x323, 0x1eb9}, {0x65, 0x327, 0x229}, + {0x65, 0x328, 0x119}, {0x65, 0x32d, 0x1e19}, {0x65, 0x330, 0x1e1b}, {0x66, 0x307, 0x1e1f}, + {0x67, 0x301, 0x1f5}, {0x67, 0x302, 0x11d}, {0x67, 0x304, 0x1e21}, {0x67, 0x306, 0x11f}, + {0x67, 0x307, 0x121}, {0x67, 0x30c, 0x1e7}, {0x67, 0x327, 0x123}, {0x68, 0x302, 0x125}, + {0x68, 0x307, 0x1e23}, {0x68, 0x308, 0x1e27}, {0x68, 0x30c, 0x21f}, {0x68, 0x323, 0x1e25}, + {0x68, 0x327, 0x1e29}, {0x68, 0x32e, 0x1e2b}, {0x68, 0x331, 0x1e96}, {0x69, 0x300, 0xec}, + {0x69, 0x301, 0xed}, {0x69, 0x302, 0xee}, {0x69, 0x303, 0x129}, {0x69, 0x304, 0x12b}, + {0x69, 0x306, 0x12d}, {0x69, 0x308, 0xef}, {0x69, 0x309, 0x1ec9}, {0x69, 0x30c, 0x1d0}, + {0x69, 0x30f, 0x209}, {0x69, 0x311, 0x20b}, {0x69, 0x323, 0x1ecb}, {0x69, 0x328, 0x12f}, + {0x69, 0x330, 0x1e2d}, {0x6a, 0x302, 0x135}, {0x6a, 0x30c, 0x1f0}, {0x6b, 0x301, 0x1e31}, + {0x6b, 0x30c, 0x1e9}, {0x6b, 0x323, 0x1e33}, {0x6b, 0x327, 0x137}, {0x6b, 0x331, 0x1e35}, + {0x6c, 0x301, 0x13a}, {0x6c, 0x30c, 0x13e}, {0x6c, 0x323, 0x1e37}, {0x6c, 0x327, 0x13c}, + {0x6c, 0x32d, 0x1e3d}, {0x6c, 0x331, 0x1e3b}, {0x6d, 0x301, 0x1e3f}, {0x6d, 0x307, 0x1e41}, + {0x6d, 0x323, 0x1e43}, {0x6e, 0x300, 0x1f9}, {0x6e, 0x301, 0x144}, {0x6e, 0x303, 0xf1}, + {0x6e, 0x307, 0x1e45}, {0x6e, 0x30c, 0x148}, {0x6e, 0x323, 0x1e47}, {0x6e, 0x327, 0x146}, + {0x6e, 0x32d, 0x1e4b}, {0x6e, 0x331, 0x1e49}, {0x6f, 0x300, 0xf2}, {0x6f, 0x301, 0xf3}, + {0x6f, 0x302, 0xf4}, {0x6f, 0x303, 0xf5}, {0x6f, 0x304, 0x14d}, {0x6f, 0x306, 0x14f}, + {0x6f, 0x307, 0x22f}, {0x6f, 0x308, 0xf6}, {0x6f, 0x309, 0x1ecf}, {0x6f, 0x30b, 0x151}, + {0x6f, 0x30c, 0x1d2}, {0x6f, 0x30f, 0x20d}, {0x6f, 0x311, 0x20f}, {0x6f, 0x31b, 0x1a1}, + {0x6f, 0x323, 0x1ecd}, {0x6f, 0x328, 0x1eb}, {0x70, 0x301, 0x1e55}, {0x70, 0x307, 0x1e57}, + {0x72, 0x301, 0x155}, {0x72, 0x307, 0x1e59}, {0x72, 0x30c, 0x159}, {0x72, 0x30f, 0x211}, + {0x72, 0x311, 0x213}, {0x72, 0x323, 0x1e5b}, {0x72, 0x327, 0x157}, {0x72, 0x331, 0x1e5f}, + {0x73, 0x301, 0x15b}, {0x73, 0x302, 0x15d}, {0x73, 0x307, 0x1e61}, {0x73, 0x30c, 0x161}, + {0x73, 0x323, 0x1e63}, {0x73, 0x326, 0x219}, {0x73, 0x327, 0x15f}, {0x74, 0x307, 0x1e6b}, + {0x74, 0x308, 0x1e97}, {0x74, 0x30c, 0x165}, {0x74, 0x323, 0x1e6d}, {0x74, 0x326, 0x21b}, + {0x74, 0x327, 0x163}, {0x74, 0x32d, 0x1e71}, {0x74, 0x331, 0x1e6f}, {0x75, 0x300, 0xf9}, + {0x75, 0x301, 0xfa}, {0x75, 0x302, 0xfb}, {0x75, 0x303, 0x169}, {0x75, 0x304, 0x16b}, + {0x75, 0x306, 0x16d}, {0x75, 0x308, 0xfc}, {0x75, 0x309, 0x1ee7}, {0x75, 0x30a, 0x16f}, + {0x75, 0x30b, 0x171}, {0x75, 0x30c, 0x1d4}, {0x75, 0x30f, 0x215}, {0x75, 0x311, 0x217}, + {0x75, 0x31b, 0x1b0}, {0x75, 0x323, 0x1ee5}, {0x75, 0x324, 0x1e73}, {0x75, 0x328, 0x173}, + {0x75, 0x32d, 0x1e77}, {0x75, 0x330, 0x1e75}, {0x76, 0x303, 0x1e7d}, {0x76, 0x323, 0x1e7f}, + {0x77, 0x300, 0x1e81}, {0x77, 0x301, 0x1e83}, {0x77, 0x302, 0x175}, {0x77, 0x307, 0x1e87}, + {0x77, 0x308, 0x1e85}, {0x77, 0x30a, 0x1e98}, {0x77, 0x323, 0x1e89}, {0x78, 0x307, 0x1e8b}, + {0x78, 0x308, 0x1e8d}, {0x79, 0x300, 0x1ef3}, {0x79, 0x301, 0xfd}, {0x79, 0x302, 0x177}, + {0x79, 0x303, 0x1ef9}, {0x79, 0x304, 0x233}, {0x79, 0x307, 0x1e8f}, {0x79, 0x308, 0xff}, + {0x79, 0x309, 0x1ef7}, {0x79, 0x30a, 0x1e99}, {0x79, 0x323, 0x1ef5}, {0x7a, 0x301, 0x17a}, + {0x7a, 0x302, 0x1e91}, {0x7a, 0x307, 0x17c}, {0x7a, 0x30c, 0x17e}, {0x7a, 0x323, 0x1e93}, + {0x7a, 0x331, 0x1e95}, {0xa8, 0x300, 0x1fed}, {0xa8, 0x301, 0x385}, {0xa8, 0x342, 0x1fc1}, + {0xc2, 0x300, 0x1ea6}, {0xc2, 0x301, 0x1ea4}, {0xc2, 0x303, 0x1eaa}, {0xc2, 0x309, 0x1ea8}, + {0xc4, 0x304, 0x1de}, {0xc5, 0x301, 0x1fa}, {0xc6, 0x301, 0x1fc}, {0xc6, 0x304, 0x1e2}, + {0xc7, 0x301, 0x1e08}, {0xca, 0x300, 0x1ec0}, {0xca, 0x301, 0x1ebe}, {0xca, 0x303, 0x1ec4}, + {0xca, 0x309, 0x1ec2}, {0xcf, 0x301, 0x1e2e}, {0xd4, 0x300, 0x1ed2}, {0xd4, 0x301, 0x1ed0}, + {0xd4, 0x303, 0x1ed6}, {0xd4, 0x309, 0x1ed4}, {0xd5, 0x301, 0x1e4c}, {0xd5, 0x304, 0x22c}, + {0xd5, 0x308, 0x1e4e}, {0xd6, 0x304, 0x22a}, {0xd8, 0x301, 0x1fe}, {0xdc, 0x300, 0x1db}, + {0xdc, 0x301, 0x1d7}, {0xdc, 0x304, 0x1d5}, {0xdc, 0x30c, 0x1d9}, {0xe2, 0x300, 0x1ea7}, + {0xe2, 0x301, 0x1ea5}, {0xe2, 0x303, 0x1eab}, {0xe2, 0x309, 0x1ea9}, {0xe4, 0x304, 0x1df}, + {0xe5, 0x301, 0x1fb}, {0xe6, 0x301, 0x1fd}, {0xe6, 0x304, 0x1e3}, {0xe7, 0x301, 0x1e09}, + {0xea, 0x300, 0x1ec1}, {0xea, 0x301, 0x1ebf}, {0xea, 0x303, 0x1ec5}, {0xea, 0x309, 0x1ec3}, + {0xef, 0x301, 0x1e2f}, {0xf4, 0x300, 0x1ed3}, {0xf4, 0x301, 0x1ed1}, {0xf4, 0x303, 0x1ed7}, + {0xf4, 0x309, 0x1ed5}, {0xf5, 0x301, 0x1e4d}, {0xf5, 0x304, 0x22d}, {0xf5, 0x308, 0x1e4f}, + {0xf6, 0x304, 0x22b}, {0xf8, 0x301, 0x1ff}, {0xfc, 0x300, 0x1dc}, {0xfc, 0x301, 0x1d8}, + {0xfc, 0x304, 0x1d6}, {0xfc, 0x30c, 0x1da}, {0x102, 0x300, 0x1eb0}, {0x102, 0x301, 0x1eae}, + {0x102, 0x303, 0x1eb4}, {0x102, 0x309, 0x1eb2}, {0x103, 0x300, 0x1eb1}, {0x103, 0x301, 0x1eaf}, + {0x103, 0x303, 0x1eb5}, {0x103, 0x309, 0x1eb3}, {0x112, 0x300, 0x1e14}, {0x112, 0x301, 0x1e16}, + {0x113, 0x300, 0x1e15}, {0x113, 0x301, 0x1e17}, {0x14c, 0x300, 0x1e50}, {0x14c, 0x301, 0x1e52}, + {0x14d, 0x300, 0x1e51}, {0x14d, 0x301, 0x1e53}, {0x15a, 0x307, 0x1e64}, {0x15b, 0x307, 0x1e65}, + {0x160, 0x307, 0x1e66}, {0x161, 0x307, 0x1e67}, {0x168, 0x301, 0x1e78}, {0x169, 0x301, 0x1e79}, + {0x16a, 0x308, 0x1e7a}, {0x16b, 0x308, 0x1e7b}, {0x17f, 0x307, 0x1e9b}, {0x1a0, 0x300, 0x1edc}, + {0x1a0, 0x301, 0x1eda}, {0x1a0, 0x303, 0x1ee0}, {0x1a0, 0x309, 0x1ede}, {0x1a0, 0x323, 0x1ee2}, + {0x1a1, 0x300, 0x1edd}, {0x1a1, 0x301, 0x1edb}, {0x1a1, 0x303, 0x1ee1}, {0x1a1, 0x309, 0x1edf}, + {0x1a1, 0x323, 0x1ee3}, {0x1af, 0x300, 0x1eea}, {0x1af, 0x301, 0x1ee8}, {0x1af, 0x303, 0x1eee}, + {0x1af, 0x309, 0x1eec}, {0x1af, 0x323, 0x1ef0}, {0x1b0, 0x300, 0x1eeb}, {0x1b0, 0x301, 0x1ee9}, + {0x1b0, 0x303, 0x1eef}, {0x1b0, 0x309, 0x1eed}, {0x1b0, 0x323, 0x1ef1}, {0x1b7, 0x30c, 0x1ee}, + {0x1ea, 0x304, 0x1ec}, {0x1eb, 0x304, 0x1ed}, {0x226, 0x304, 0x1e0}, {0x227, 0x304, 0x1e1}, + {0x228, 0x306, 0x1e1c}, {0x229, 0x306, 0x1e1d}, {0x22e, 0x304, 0x230}, {0x22f, 0x304, 0x231}, + {0x292, 0x30c, 0x1ef}, {0x391, 0x300, 0x1fba}, {0x391, 0x301, 0x386}, {0x391, 0x304, 0x1fb9}, + {0x391, 0x306, 0x1fb8}, {0x391, 0x313, 0x1f08}, {0x391, 0x314, 0x1f09}, {0x391, 0x345, 0x1fbc}, + {0x395, 0x300, 0x1fc8}, {0x395, 0x301, 0x388}, {0x395, 0x313, 0x1f18}, {0x395, 0x314, 0x1f19}, + {0x397, 0x300, 0x1fca}, {0x397, 0x301, 0x389}, {0x397, 0x313, 0x1f28}, {0x397, 0x314, 0x1f29}, + {0x397, 0x345, 0x1fcc}, {0x399, 0x300, 0x1fda}, {0x399, 0x301, 0x38a}, {0x399, 0x304, 0x1fd9}, + {0x399, 0x306, 0x1fd8}, {0x399, 0x308, 0x3aa}, {0x399, 0x313, 0x1f38}, {0x399, 0x314, 0x1f39}, + {0x39f, 0x300, 0x1ff8}, {0x39f, 0x301, 0x38c}, {0x39f, 0x313, 0x1f48}, {0x39f, 0x314, 0x1f49}, + {0x3a1, 0x314, 0x1fec}, {0x3a5, 0x300, 0x1fea}, {0x3a5, 0x301, 0x38e}, {0x3a5, 0x304, 0x1fe9}, + {0x3a5, 0x306, 0x1fe8}, {0x3a5, 0x308, 0x3ab}, {0x3a5, 0x314, 0x1f59}, {0x3a9, 0x300, 0x1ffa}, + {0x3a9, 0x301, 0x38f}, {0x3a9, 0x313, 0x1f68}, {0x3a9, 0x314, 0x1f69}, {0x3a9, 0x345, 0x1ffc}, + {0x3ac, 0x345, 0x1fb4}, {0x3ae, 0x345, 0x1fc4}, {0x3b1, 0x300, 0x1f70}, {0x3b1, 0x301, 0x3ac}, + {0x3b1, 0x304, 0x1fb1}, {0x3b1, 0x306, 0x1fb0}, {0x3b1, 0x313, 0x1f00}, {0x3b1, 0x314, 0x1f01}, + {0x3b1, 0x342, 0x1fb6}, {0x3b1, 0x345, 0x1fb3}, {0x3b5, 0x300, 0x1f72}, {0x3b5, 0x301, 0x3ad}, + {0x3b5, 0x313, 0x1f10}, {0x3b5, 0x314, 0x1f11}, {0x3b7, 0x300, 0x1f74}, {0x3b7, 0x301, 0x3ae}, + {0x3b7, 0x313, 0x1f20}, {0x3b7, 0x314, 0x1f21}, {0x3b7, 0x342, 0x1fc6}, {0x3b7, 0x345, 0x1fc3}, + {0x3b9, 0x300, 0x1f76}, {0x3b9, 0x301, 0x3af}, {0x3b9, 0x304, 0x1fd1}, {0x3b9, 0x306, 0x1fd0}, + {0x3b9, 0x308, 0x3ca}, {0x3b9, 0x313, 0x1f30}, {0x3b9, 0x314, 0x1f31}, {0x3b9, 0x342, 0x1fd6}, + {0x3bf, 0x300, 0x1f78}, {0x3bf, 0x301, 0x3cc}, {0x3bf, 0x313, 0x1f40}, {0x3bf, 0x314, 0x1f41}, + {0x3c1, 0x313, 0x1fe4}, {0x3c1, 0x314, 0x1fe5}, {0x3c5, 0x300, 0x1f7a}, {0x3c5, 0x301, 0x3cd}, + {0x3c5, 0x304, 0x1fe1}, {0x3c5, 0x306, 0x1fe0}, {0x3c5, 0x308, 0x3cb}, {0x3c5, 0x313, 0x1f50}, + {0x3c5, 0x314, 0x1f51}, {0x3c5, 0x342, 0x1fe6}, {0x3c9, 0x300, 0x1f7c}, {0x3c9, 0x301, 0x3ce}, + {0x3c9, 0x313, 0x1f60}, {0x3c9, 0x314, 0x1f61}, {0x3c9, 0x342, 0x1ff6}, {0x3c9, 0x345, 0x1ff3}, + {0x3ca, 0x300, 0x1fd2}, {0x3ca, 0x301, 0x390}, {0x3ca, 0x342, 0x1fd7}, {0x3cb, 0x300, 0x1fe2}, + {0x3cb, 0x301, 0x3b0}, {0x3cb, 0x342, 0x1fe7}, {0x3ce, 0x345, 0x1ff4}, {0x3d2, 0x301, 0x3d3}, + {0x3d2, 0x308, 0x3d4}, {0x406, 0x308, 0x407}, {0x410, 0x306, 0x4d0}, {0x410, 0x308, 0x4d2}, + {0x413, 0x301, 0x403}, {0x415, 0x300, 0x400}, {0x415, 0x306, 0x4d6}, {0x415, 0x308, 0x401}, + {0x416, 0x306, 0x4c1}, {0x416, 0x308, 0x4dc}, {0x417, 0x308, 0x4de}, {0x418, 0x300, 0x40d}, + {0x418, 0x304, 0x4e2}, {0x418, 0x306, 0x419}, {0x418, 0x308, 0x4e4}, {0x41a, 0x301, 0x40c}, + {0x41e, 0x308, 0x4e6}, {0x423, 0x304, 0x4ee}, {0x423, 0x306, 0x40e}, {0x423, 0x308, 0x4f0}, + {0x423, 0x30b, 0x4f2}, {0x427, 0x308, 0x4f4}, {0x42b, 0x308, 0x4f8}, {0x42d, 0x308, 0x4ec}, + {0x430, 0x306, 0x4d1}, {0x430, 0x308, 0x4d3}, {0x433, 0x301, 0x453}, {0x435, 0x300, 0x450}, + {0x435, 0x306, 0x4d7}, {0x435, 0x308, 0x451}, {0x436, 0x306, 0x4c2}, {0x436, 0x308, 0x4dd}, + {0x437, 0x308, 0x4df}, {0x438, 0x300, 0x45d}, {0x438, 0x304, 0x4e3}, {0x438, 0x306, 0x439}, + {0x438, 0x308, 0x4e5}, {0x43a, 0x301, 0x45c}, {0x43e, 0x308, 0x4e7}, {0x443, 0x304, 0x4ef}, + {0x443, 0x306, 0x45e}, {0x443, 0x308, 0x4f1}, {0x443, 0x30b, 0x4f3}, {0x447, 0x308, 0x4f5}, + {0x44b, 0x308, 0x4f9}, {0x44d, 0x308, 0x4ed}, {0x456, 0x308, 0x457}, {0x474, 0x30f, 0x476}, + {0x475, 0x30f, 0x477}, {0x4d8, 0x308, 0x4da}, {0x4d9, 0x308, 0x4db}, {0x4e8, 0x308, 0x4ea}, + {0x4e9, 0x308, 0x4eb}, {0x627, 0x653, 0x622}, {0x627, 0x654, 0x623}, {0x627, 0x655, 0x625}, + {0x648, 0x654, 0x624}, {0x64a, 0x654, 0x626}, {0x6c1, 0x654, 0x6c2}, {0x6d2, 0x654, 0x6d3}, + {0x6d5, 0x654, 0x6c0}, {0x928, 0x93c, 0x929}, {0x930, 0x93c, 0x931}, {0x933, 0x93c, 0x934}, + {0x9c7, 0x9be, 0x9cb}, {0x9c7, 0x9d7, 0x9cc}, {0xb47, 0xb3e, 0xb4b}, {0xb47, 0xb56, 0xb48}, + {0xb47, 0xb57, 0xb4c}, {0xb92, 0xbd7, 0xb94}, {0xbc6, 0xbbe, 0xbca}, {0xbc6, 0xbd7, 0xbcc}, + {0xbc7, 0xbbe, 0xbcb}, {0xc46, 0xc56, 0xc48}, {0xcbf, 0xcd5, 0xcc0}, {0xcc6, 0xcc2, 0xcca}, + {0xcc6, 0xcd5, 0xcc7}, {0xcc6, 0xcd6, 0xcc8}, {0xcca, 0xcd5, 0xccb}, {0xd46, 0xd3e, 0xd4a}, + {0xd46, 0xd57, 0xd4c}, {0xd47, 0xd3e, 0xd4b}, {0xdd9, 0xdca, 0xdda}, {0xdd9, 0xdcf, 0xddc}, + {0xdd9, 0xddf, 0xdde}, {0xddc, 0xdca, 0xddd}, {0x1025, 0x102e, 0x1026}, {0x1b05, 0x1b35, 0x1b06}, + {0x1b07, 0x1b35, 0x1b08}, {0x1b09, 0x1b35, 0x1b0a}, {0x1b0b, 0x1b35, 0x1b0c}, {0x1b0d, 0x1b35, 0x1b0e}, + {0x1b11, 0x1b35, 0x1b12}, {0x1b3a, 0x1b35, 0x1b3b}, {0x1b3c, 0x1b35, 0x1b3d}, {0x1b3e, 0x1b35, 0x1b40}, + {0x1b3f, 0x1b35, 0x1b41}, {0x1b42, 0x1b35, 0x1b43}, {0x1e36, 0x304, 0x1e38}, {0x1e37, 0x304, 0x1e39}, + {0x1e5a, 0x304, 0x1e5c}, {0x1e5b, 0x304, 0x1e5d}, {0x1e62, 0x307, 0x1e68}, {0x1e63, 0x307, 0x1e69}, + {0x1ea0, 0x302, 0x1eac}, {0x1ea0, 0x306, 0x1eb6}, {0x1ea1, 0x302, 0x1ead}, {0x1ea1, 0x306, 0x1eb7}, + {0x1eb8, 0x302, 0x1ec6}, {0x1eb9, 0x302, 0x1ec7}, {0x1ecc, 0x302, 0x1ed8}, {0x1ecd, 0x302, 0x1ed9}, + {0x1f00, 0x300, 0x1f02}, {0x1f00, 0x301, 0x1f04}, {0x1f00, 0x342, 0x1f06}, {0x1f00, 0x345, 0x1f80}, + {0x1f01, 0x300, 0x1f03}, {0x1f01, 0x301, 0x1f05}, {0x1f01, 0x342, 0x1f07}, {0x1f01, 0x345, 0x1f81}, + {0x1f02, 0x345, 0x1f82}, {0x1f03, 0x345, 0x1f83}, {0x1f04, 0x345, 0x1f84}, {0x1f05, 0x345, 0x1f85}, + {0x1f06, 0x345, 0x1f86}, {0x1f07, 0x345, 0x1f87}, {0x1f08, 0x300, 0x1f0a}, {0x1f08, 0x301, 0x1f0c}, + {0x1f08, 0x342, 0x1f0e}, {0x1f08, 0x345, 0x1f88}, {0x1f09, 0x300, 0x1f0b}, {0x1f09, 0x301, 0x1f0d}, + {0x1f09, 0x342, 0x1f0f}, {0x1f09, 0x345, 0x1f89}, {0x1f0a, 0x345, 0x1f8a}, {0x1f0b, 0x345, 0x1f8b}, + {0x1f0c, 0x345, 0x1f8c}, {0x1f0d, 0x345, 0x1f8d}, {0x1f0e, 0x345, 0x1f8e}, {0x1f0f, 0x345, 0x1f8f}, + {0x1f10, 0x300, 0x1f12}, {0x1f10, 0x301, 0x1f14}, {0x1f11, 0x300, 0x1f13}, {0x1f11, 0x301, 0x1f15}, + {0x1f18, 0x300, 0x1f1a}, {0x1f18, 0x301, 0x1f1c}, {0x1f19, 0x300, 0x1f1b}, {0x1f19, 0x301, 0x1f1d}, + {0x1f20, 0x300, 0x1f22}, {0x1f20, 0x301, 0x1f24}, {0x1f20, 0x342, 0x1f26}, {0x1f20, 0x345, 0x1f90}, + {0x1f21, 0x300, 0x1f23}, {0x1f21, 0x301, 0x1f25}, {0x1f21, 0x342, 0x1f27}, {0x1f21, 0x345, 0x1f91}, + {0x1f22, 0x345, 0x1f92}, {0x1f23, 0x345, 0x1f93}, {0x1f24, 0x345, 0x1f94}, {0x1f25, 0x345, 0x1f95}, + {0x1f26, 0x345, 0x1f96}, {0x1f27, 0x345, 0x1f97}, {0x1f28, 0x300, 0x1f2a}, {0x1f28, 0x301, 0x1f2c}, + {0x1f28, 0x342, 0x1f2e}, {0x1f28, 0x345, 0x1f98}, {0x1f29, 0x300, 0x1f2b}, {0x1f29, 0x301, 0x1f2d}, + {0x1f29, 0x342, 0x1f2f}, {0x1f29, 0x345, 0x1f99}, {0x1f2a, 0x345, 0x1f9a}, {0x1f2b, 0x345, 0x1f9b}, + {0x1f2c, 0x345, 0x1f9c}, {0x1f2d, 0x345, 0x1f9d}, {0x1f2e, 0x345, 0x1f9e}, {0x1f2f, 0x345, 0x1f9f}, + {0x1f30, 0x300, 0x1f32}, {0x1f30, 0x301, 0x1f34}, {0x1f30, 0x342, 0x1f36}, {0x1f31, 0x300, 0x1f33}, + {0x1f31, 0x301, 0x1f35}, {0x1f31, 0x342, 0x1f37}, {0x1f38, 0x300, 0x1f3a}, {0x1f38, 0x301, 0x1f3c}, + {0x1f38, 0x342, 0x1f3e}, {0x1f39, 0x300, 0x1f3b}, {0x1f39, 0x301, 0x1f3d}, {0x1f39, 0x342, 0x1f3f}, + {0x1f40, 0x300, 0x1f42}, {0x1f40, 0x301, 0x1f44}, {0x1f41, 0x300, 0x1f43}, {0x1f41, 0x301, 0x1f45}, + {0x1f48, 0x300, 0x1f4a}, {0x1f48, 0x301, 0x1f4c}, {0x1f49, 0x300, 0x1f4b}, {0x1f49, 0x301, 0x1f4d}, + {0x1f50, 0x300, 0x1f52}, {0x1f50, 0x301, 0x1f54}, {0x1f50, 0x342, 0x1f56}, {0x1f51, 0x300, 0x1f53}, + {0x1f51, 0x301, 0x1f55}, {0x1f51, 0x342, 0x1f57}, {0x1f59, 0x300, 0x1f5b}, {0x1f59, 0x301, 0x1f5d}, + {0x1f59, 0x342, 0x1f5f}, {0x1f60, 0x300, 0x1f62}, {0x1f60, 0x301, 0x1f64}, {0x1f60, 0x342, 0x1f66}, + {0x1f60, 0x345, 0x1fa0}, {0x1f61, 0x300, 0x1f63}, {0x1f61, 0x301, 0x1f65}, {0x1f61, 0x342, 0x1f67}, + {0x1f61, 0x345, 0x1fa1}, {0x1f62, 0x345, 0x1fa2}, {0x1f63, 0x345, 0x1fa3}, {0x1f64, 0x345, 0x1fa4}, + {0x1f65, 0x345, 0x1fa5}, {0x1f66, 0x345, 0x1fa6}, {0x1f67, 0x345, 0x1fa7}, {0x1f68, 0x300, 0x1f6a}, + {0x1f68, 0x301, 0x1f6c}, {0x1f68, 0x342, 0x1f6e}, {0x1f68, 0x345, 0x1fa8}, {0x1f69, 0x300, 0x1f6b}, + {0x1f69, 0x301, 0x1f6d}, {0x1f69, 0x342, 0x1f6f}, {0x1f69, 0x345, 0x1fa9}, {0x1f6a, 0x345, 0x1faa}, + {0x1f6b, 0x345, 0x1fab}, {0x1f6c, 0x345, 0x1fac}, {0x1f6d, 0x345, 0x1fad}, {0x1f6e, 0x345, 0x1fae}, + {0x1f6f, 0x345, 0x1faf}, {0x1f70, 0x345, 0x1fb2}, {0x1f74, 0x345, 0x1fc2}, {0x1f7c, 0x345, 0x1ff2}, + {0x1fb6, 0x345, 0x1fb7}, {0x1fbf, 0x300, 0x1fcd}, {0x1fbf, 0x301, 0x1fce}, {0x1fbf, 0x342, 0x1fcf}, + {0x1fc6, 0x345, 0x1fc7}, {0x1ff6, 0x345, 0x1ff7}, {0x1ffe, 0x300, 0x1fdd}, {0x1ffe, 0x301, 0x1fde}, + {0x1ffe, 0x342, 0x1fdf}, {0x2190, 0x338, 0x219a}, {0x2192, 0x338, 0x219b}, {0x2194, 0x338, 0x21ae}, + {0x21d0, 0x338, 0x21cd}, {0x21d2, 0x338, 0x21cf}, {0x21d4, 0x338, 0x21ce}, {0x2203, 0x338, 0x2204}, + {0x2208, 0x338, 0x2209}, {0x220b, 0x338, 0x220c}, {0x2223, 0x338, 0x2224}, {0x2225, 0x338, 0x2226}, + {0x223c, 0x338, 0x2241}, {0x2243, 0x338, 0x2244}, {0x2245, 0x338, 0x2247}, {0x2248, 0x338, 0x2249}, + {0x224d, 0x338, 0x226d}, {0x2261, 0x338, 0x2262}, {0x2264, 0x338, 0x2270}, {0x2265, 0x338, 0x2271}, + {0x2272, 0x338, 0x2274}, {0x2273, 0x338, 0x2275}, {0x2276, 0x338, 0x2278}, {0x2277, 0x338, 0x2279}, + {0x227a, 0x338, 0x2280}, {0x227b, 0x338, 0x2281}, {0x227c, 0x338, 0x22e0}, {0x227d, 0x338, 0x22e1}, + {0x2282, 0x338, 0x2284}, {0x2283, 0x338, 0x2285}, {0x2286, 0x338, 0x2288}, {0x2287, 0x338, 0x2289}, + {0x2291, 0x338, 0x22e2}, {0x2292, 0x338, 0x22e3}, {0x22a2, 0x338, 0x22ac}, {0x22a8, 0x338, 0x22ad}, + {0x22a9, 0x338, 0x22ae}, {0x22ab, 0x338, 0x22af}, {0x22b2, 0x338, 0x22ea}, {0x22b3, 0x338, 0x22eb}, + {0x22b4, 0x338, 0x22ec}, {0x22b5, 0x338, 0x22ed}, {0x3046, 0x3099, 0x3094}, {0x304b, 0x3099, 0x304c}, + {0x304d, 0x3099, 0x304e}, {0x304f, 0x3099, 0x3050}, {0x3051, 0x3099, 0x3052}, {0x3053, 0x3099, 0x3054}, + {0x3055, 0x3099, 0x3056}, {0x3057, 0x3099, 0x3058}, {0x3059, 0x3099, 0x305a}, {0x305b, 0x3099, 0x305c}, + {0x305d, 0x3099, 0x305e}, {0x305f, 0x3099, 0x3060}, {0x3061, 0x3099, 0x3062}, {0x3064, 0x3099, 0x3065}, + {0x3066, 0x3099, 0x3067}, {0x3068, 0x3099, 0x3069}, {0x306f, 0x3099, 0x3070}, {0x306f, 0x309a, 0x3071}, + {0x3072, 0x3099, 0x3073}, {0x3072, 0x309a, 0x3074}, {0x3075, 0x3099, 0x3076}, {0x3075, 0x309a, 0x3077}, + {0x3078, 0x3099, 0x3079}, {0x3078, 0x309a, 0x307a}, {0x307b, 0x3099, 0x307c}, {0x307b, 0x309a, 0x307d}, + {0x309d, 0x3099, 0x309e}, {0x30a6, 0x3099, 0x30f4}, {0x30ab, 0x3099, 0x30ac}, {0x30ad, 0x3099, 0x30ae}, + {0x30af, 0x3099, 0x30b0}, {0x30b1, 0x3099, 0x30b2}, {0x30b3, 0x3099, 0x30b4}, {0x30b5, 0x3099, 0x30b6}, + {0x30b7, 0x3099, 0x30b8}, {0x30b9, 0x3099, 0x30ba}, {0x30bb, 0x3099, 0x30bc}, {0x30bd, 0x3099, 0x30be}, + {0x30bf, 0x3099, 0x30c0}, {0x30c1, 0x3099, 0x30c2}, {0x30c4, 0x3099, 0x30c5}, {0x30c6, 0x3099, 0x30c7}, + {0x30c8, 0x3099, 0x30c9}, {0x30cf, 0x3099, 0x30d0}, {0x30cf, 0x309a, 0x30d1}, {0x30d2, 0x3099, 0x30d3}, + {0x30d2, 0x309a, 0x30d4}, {0x30d5, 0x3099, 0x30d6}, {0x30d5, 0x309a, 0x30d7}, {0x30d8, 0x3099, 0x30d9}, + {0x30d8, 0x309a, 0x30da}, {0x30db, 0x3099, 0x30dc}, {0x30db, 0x309a, 0x30dd}, {0x30ef, 0x3099, 0x30f7}, + {0x30f0, 0x3099, 0x30f8}, {0x30f1, 0x3099, 0x30f9}, {0x30f2, 0x3099, 0x30fa}, {0x30fd, 0x3099, 0x30fe}, + {0x105d2, 0x307, 0x105c9}, {0x105da, 0x307, 0x105e4}, {0x11099, 0x110ba, 0x1109a}, {0x1109b, 0x110ba, 0x1109c}, + {0x110a5, 0x110ba, 0x110ab}, {0x11131, 0x11127, 0x1112e}, {0x11132, 0x11127, 0x1112f}, {0x11347, 0x1133e, 0x1134b}, + {0x11347, 0x11357, 0x1134c}, {0x11382, 0x113c9, 0x11383}, {0x11384, 0x113bb, 0x11385}, {0x1138b, 0x113c2, 0x1138e}, + {0x11390, 0x113c9, 0x11391}, {0x113c2, 0x113b8, 0x113c7}, {0x113c2, 0x113c2, 0x113c5}, {0x113c2, 0x113c9, 0x113c8}, + {0x114b9, 0x114b0, 0x114bc}, {0x114b9, 0x114ba, 0x114bb}, {0x114b9, 0x114bd, 0x114be}, {0x115b8, 0x115af, 0x115ba}, + {0x115b9, 0x115af, 0x115bb}, {0x11935, 0x11930, 0x11938}, {0x1611e, 0x1611e, 0x16121}, {0x1611e, 0x1611f, 0x16123}, + {0x1611e, 0x16120, 0x16125}, {0x1611e, 0x16129, 0x16122}, {0x16121, 0x1611f, 0x16126}, {0x16121, 0x16120, 0x16128}, + {0x16122, 0x1611f, 0x16127}, {0x16129, 0x1611f, 0x16124}, {0x16d63, 0x16d67, 0x16d69}, {0x16d67, 0x16d67, 0x16d68}, + {0x16d69, 0x16d67, 0x16d6a}, +} + +// uniNFCNo: code points that NFC changes on their own (NFC_Quick_Check=No). +var uniNFCNo = []uniRange{ + {0x340, 0x341}, {0x343, 0x344}, {0x374, 0x374}, {0x37e, 0x37e}, {0x387, 0x387}, {0x958, 0x95f}, + {0x9dc, 0x9dd}, {0x9df, 0x9df}, {0xa33, 0xa33}, {0xa36, 0xa36}, {0xa59, 0xa5b}, {0xa5e, 0xa5e}, + {0xb5c, 0xb5d}, {0xf43, 0xf43}, {0xf4d, 0xf4d}, {0xf52, 0xf52}, {0xf57, 0xf57}, {0xf5c, 0xf5c}, + {0xf69, 0xf69}, {0xf73, 0xf73}, {0xf75, 0xf76}, {0xf78, 0xf78}, {0xf81, 0xf81}, {0xf93, 0xf93}, + {0xf9d, 0xf9d}, {0xfa2, 0xfa2}, {0xfa7, 0xfa7}, {0xfac, 0xfac}, {0xfb9, 0xfb9}, {0x1f71, 0x1f71}, + {0x1f73, 0x1f73}, {0x1f75, 0x1f75}, {0x1f77, 0x1f77}, {0x1f79, 0x1f79}, {0x1f7b, 0x1f7b}, {0x1f7d, 0x1f7d}, + {0x1fbb, 0x1fbb}, {0x1fbe, 0x1fbe}, {0x1fc9, 0x1fc9}, {0x1fcb, 0x1fcb}, {0x1fd3, 0x1fd3}, {0x1fdb, 0x1fdb}, + {0x1fe3, 0x1fe3}, {0x1feb, 0x1feb}, {0x1fee, 0x1fef}, {0x1ff9, 0x1ff9}, {0x1ffb, 0x1ffb}, {0x1ffd, 0x1ffd}, + {0x2000, 0x2001}, {0x2126, 0x2126}, {0x212a, 0x212b}, {0x2329, 0x232a}, {0x2adc, 0x2adc}, {0xf900, 0xfa0d}, + {0xfa10, 0xfa10}, {0xfa12, 0xfa12}, {0xfa15, 0xfa1e}, {0xfa20, 0xfa20}, {0xfa22, 0xfa22}, {0xfa25, 0xfa26}, + {0xfa2a, 0xfa6d}, {0xfa70, 0xfad9}, {0xfb1d, 0xfb1d}, {0xfb1f, 0xfb1f}, {0xfb2a, 0xfb36}, {0xfb38, 0xfb3c}, + {0xfb3e, 0xfb3e}, {0xfb40, 0xfb41}, {0xfb43, 0xfb44}, {0xfb46, 0xfb4e}, {0x1d15e, 0x1d164}, {0x1d1bb, 0x1d1c0}, + {0x2f800, 0x2fa1d}, +} + +// uniComposeSecond: code points that can compose with what precedes them (NFC_Quick_Check=Maybe). +var uniComposeSecond = []uniRange{ + {0x300, 0x304}, {0x306, 0x30c}, {0x30f, 0x30f}, {0x311, 0x311}, {0x313, 0x314}, {0x31b, 0x31b}, + {0x323, 0x328}, {0x32d, 0x32e}, {0x330, 0x331}, {0x338, 0x338}, {0x342, 0x342}, {0x345, 0x345}, + {0x653, 0x655}, {0x93c, 0x93c}, {0x9be, 0x9be}, {0x9d7, 0x9d7}, {0xb3e, 0xb3e}, {0xb56, 0xb57}, + {0xbbe, 0xbbe}, {0xbd7, 0xbd7}, {0xc56, 0xc56}, {0xcc2, 0xcc2}, {0xcd5, 0xcd6}, {0xd3e, 0xd3e}, + {0xd57, 0xd57}, {0xdca, 0xdca}, {0xdcf, 0xdcf}, {0xddf, 0xddf}, {0x102e, 0x102e}, {0x1161, 0x1175}, + {0x11a8, 0x11c2}, {0x1b35, 0x1b35}, {0x3099, 0x309a}, {0x110ba, 0x110ba}, {0x11127, 0x11127}, {0x1133e, 0x1133e}, + {0x11357, 0x11357}, {0x113b8, 0x113b8}, {0x113bb, 0x113bb}, {0x113c2, 0x113c2}, {0x113c9, 0x113c9}, {0x114b0, 0x114b0}, + {0x114ba, 0x114ba}, {0x114bd, 0x114bd}, {0x115af, 0x115af}, {0x11930, 0x11930}, {0x1611e, 0x16120}, {0x16129, 0x16129}, + {0x16d67, 0x16d67}, +} + +// uniQuickMin: every code point below it is a starter that neither normalization form changes +// and that never composes with what precedes it. +const uniQuickMin = 0xc0 diff --git a/go/unicode_test.go b/go/unicode_test.go new file mode 100644 index 0000000..a59a152 --- /dev/null +++ b/go/unicode_test.go @@ -0,0 +1,322 @@ +package trackparse + +// Tests for unicode.go against Node, the reference engine. +// +// testdata/unicode/cases.jsonl is a committed sample (under 300 KB) written by +// scripts/gen_unicode.mjs from Node, so `go test` needs no Node. `gen_unicode.mjs --check` keeps +// it in step with the tables. The exhaustive check (every code point, every ordered pair of +// non-starters, ...) is too big to commit: with TRACKPARSE_UNICODE_FULL=1 the test runs +// `node scripts/gen_unicode.mjs --cases ` and compares everything it writes. + +import ( + "bufio" + "encoding/json" + "math/rand" + "os" + "os/exec" + "path/filepath" + "sort" + "strconv" + "strings" + "testing" + "unicode/utf8" +) + +type unicodeCase struct { + G string `json:"g"` + S string `json:"s"` + C *string `json:"c"` + D *string `json:"d"` + L *string `json:"l"` + K *int `json:"k"` +} + +func uniOrSelf(p *string, s string) string { + if p == nil { + return s + } + return *p +} + +// checkUnicodeCases runs every case in path and reports failures, with counts per group. +func checkUnicodeCases(t *testing.T, path string) { + t.Helper() + f, err := os.Open(path) + if err != nil { + t.Fatal(err) + } + defer f.Close() + sc := bufio.NewScanner(f) + sc.Buffer(make([]byte, 1<<20), 1<<20) + counts := map[string]int{} + checks := 0 + failures := 0 + fail := func(c *unicodeCase, what, got, want string) { + failures++ + if failures <= 20 { + t.Errorf("[%s] %s(%+q) = %+q, want %+q", c.G, what, c.S, got, want) + } + } + for sc.Scan() { + var c unicodeCase + if err := json.Unmarshal(sc.Bytes(), &c); err != nil { + t.Fatalf("%s: %v", path, err) + } + counts[c.G]++ + if got, want := nfc(c.S), uniOrSelf(c.C, c.S); got != want { + fail(&c, "nfc", got, want) + } + if got, want := nfd(c.S), uniOrSelf(c.D, c.S); got != want { + fail(&c, "nfd", got, want) + } + if got, want := jsToLower(c.S), uniOrSelf(c.L, c.S); got != want { + fail(&c, "jsToLower", got, want) + } + checks += 3 + if c.K != nil { + r, _ := utf8.DecodeRuneInString(c.S) + if got, want := isLetter(r), *c.K&1 != 0; got != want { + fail(&c, "isLetter", strconv.FormatBool(got), strconv.FormatBool(want)) + } + if got, want := isUpperLetter(r), *c.K&2 != 0; got != want { + fail(&c, "isUpperLetter", strconv.FormatBool(got), strconv.FormatBool(want)) + } + checks += 2 + } + } + if err := sc.Err(); err != nil { + t.Fatal(err) + } + groups := make([]string, 0, len(counts)) + total := 0 + for g, n := range counts { + groups = append(groups, g) + total += n + } + sort.Strings(groups) + var b strings.Builder + for _, g := range groups { + b.WriteString(" ") + b.WriteString(g) + b.WriteString("=") + b.WriteString(strconv.Itoa(counts[g])) + } + t.Logf("%d cases, %d checks, %d failures:%s", total, checks, failures, b.String()) + if total == 0 { + t.Fatalf("%s: no cases", path) + } +} + +func TestUnicodeSample(t *testing.T) { + path := filepath.Join("testdata", "unicode", "cases.jsonl") + if _, err := os.Stat(path); err != nil { + t.Skipf("%s not found: run node scripts/gen_unicode.mjs", path) + } + checkUnicodeCases(t, path) +} + +func TestUnicodeFull(t *testing.T) { + if os.Getenv("TRACKPARSE_UNICODE_FULL") != "1" { + t.Skip("set TRACKPARSE_UNICODE_FULL=1 to compare every code point and more against Node") + } + node, err := exec.LookPath("node") + if err != nil { + t.Skip("node not found: the exhaustive check needs Node to compute the expected values") + } + dir := t.TempDir() + cmd := exec.Command(node, filepath.Join("scripts", "gen_unicode.mjs"), "--cases", dir) + cmd.Stderr = os.Stderr + if err := cmd.Run(); err != nil { + t.Fatalf("gen_unicode.mjs --cases: %v", err) + } + v, err := os.ReadFile(filepath.Join(dir, "unicode-version.txt")) + if err != nil { + t.Fatal(err) + } + if got := strings.TrimSpace(string(v)); got != unicodeVersion { + t.Fatalf("this Node has Unicode %s, the tables are Unicode %s: compare with the same version", got, unicodeVersion) + } + checkUnicodeCases(t, filepath.Join(dir, "cases.jsonl")) +} + +func TestJSToLower(t *testing.T) { + for _, c := range []struct{ in, want string }{ + {"", ""}, + {"abc", "abc"}, + {"ABC Def", "abc def"}, + {"\u039f\u0394\u039f\u03a3", "\u03bf\u03b4\u03bf\u03c2"}, // final sigma + {"\u039f\u0394\u039f\u03a3A", "\u03bf\u03b4\u03bf\u03c3a"}, // a cased letter follows + {"\u03a3", "\u03c3"}, // nothing cased before + {"A\u03a3.", "a\u03c2."}, // "." is case-ignorable + {"\u0130", "i\u0307"}, // several code points + {"\u00c9COLE", "\u00e9cole"}, // Latin-1 + {"\U00010400", "\U00010428"}, // astral (Deseret) + {"a\xffB", "a\ufffdb"}, // invalid UTF-8 + } { + if got := jsToLower(c.in); got != c.want { + t.Errorf("jsToLower(%+q) = %+q, want %+q", c.in, got, c.want) + } + } +} + +func TestNormalizeExamples(t *testing.T) { + for _, c := range []struct{ in, c, d string }{ + {"", "", ""}, + {"abc", "abc", "abc"}, + {"e\u0301", "\u00e9", "e\u0301"}, + {"\u00e9", "\u00e9", "e\u0301"}, + {"\u1e0b\u0323", "\u1e0d\u0307", "d\u0323\u0307"}, // reordering, then composition + {"q\u0307\u0323", "q\u0323\u0307", "q\u0323\u0307"}, // no composite + {"\u212b", "\u00c5", "A\u030a"}, // singleton + {"\u0344", "\u0308\u0301", "\u0308\u0301"}, // non-starter decomposition + {"\uac00", "\uac00", "\u1100\u1161"}, // Hangul LV + {"\u1100\u1161\u11a8", "\uac01", "\u1100\u1161\u11a8"}, // Hangul L V T + {"\uac00\u11a7", "\uac00\u11a7", "\u1100\u1161\u11a7"}, // T base does not compose + {"\u0b47\u0b3e", "\u0b4b", "\u0b47\u0b3e"}, // two starters compose + {"a\xffe\u0301", "a\ufffd\u00e9", "a\ufffde\u0301"}, // invalid UTF-8 + {"\u0301e", "\u0301e", "\u0301e"}, // leading mark + {"A\u0301\u0301", "\u00c1\u0301", "A\u0301\u0301"}, // the second mark is blocked + {"\U0001d15e", "\U0001d157\U0001d165", "\U0001d157\U0001d165"}, // excluded composite + } { + if got := nfc(c.in); got != c.c { + t.Errorf("nfc(%+q) = %+q, want %+q", c.in, got, c.c) + } + if got := nfd(c.in); got != c.d { + t.Errorf("nfd(%+q) = %+q, want %+q", c.in, got, c.d) + } + } +} + +func TestCategories(t *testing.T) { + for _, c := range []struct { + r rune + letter, upper bool + }{ + {'a', true, false}, {'Z', true, true}, {'1', false, false}, {'_', false, false}, + {0xc9, true, true}, {0xe9, true, false}, {0x1c5, true, false}, // Lt is a letter, not Lu + {0x2160, false, false}, // Nl: not L (unlike char::is_alphabetic) + {0x0301, false, false}, {0x4e00, true, false}, {0x10400, true, true}, + {-1, false, false}, {0x110000, false, false}, {utf8.RuneError, false, false}, + } { + if got := isLetter(c.r); got != c.letter { + t.Errorf("isLetter(%U) = %v", c.r, got) + } + if got := isUpperLetter(c.r); got != c.upper { + t.Errorf("isUpperLetter(%U) = %v", c.r, got) + } + } +} + +// Normalization and lowercasing are total, and NFC/NFD have the algebraic properties of +// UAX #15 on random input, invalid UTF-8 included. +func TestUnicodeTotalAndStable(t *testing.T) { + rng := rand.New(rand.NewSource(1)) + pool := []rune{'a', 'A', 'e', 0x3a3, 0x301, 0x323, 0x345, 0x334, 0xe9, 0x1e0b, 0x1100, 0x1161, + 0x11a8, 0xac00, 0x212b, 0x344, 0xf900, 0x1d15e, 0x0b47, 0x0b3e, 0x130, 0x2e, 0x1f600} + for i := 0; i < 20000; i++ { + var b []byte + for k := rng.Intn(16); k > 0; k-- { + if rng.Intn(10) == 0 { + b = append(b, byte(0x80+rng.Intn(0x80))) // a stray byte + continue + } + b = utf8.AppendRune(b, pool[rng.Intn(len(pool))]) + } + s := string(b) + c, d := nfc(s), nfd(s) + _ = jsToLower(s) + if !utf8.ValidString(c) || !utf8.ValidString(d) { + t.Fatalf("%+q: invalid UTF-8 out", s) + } + if nfc(c) != c || nfd(d) != d || nfc(d) != c || nfd(c) != d { + t.Fatalf("%+q: nfc %+q nfd %+q not stable", s, c, d) + } + } + // A long run of marks in reverse class order takes the stable sort path. + long := "a" + strings.Repeat("\u0301\u0323\u0345\u0334", 2500) + if got := nfd(long); !strings.HasPrefix(got, "a\u0334\u0334") || nfd(got) != got { + t.Errorf("long run of marks not ordered") + } +} + +func TestNormalizeNoAllocWhenNormalized(t *testing.T) { + for _, s := range []string{ + "Noisia feat. Foreign Beggars - Shellshock (Original Mix)", + "Bj\u00f6rk - J\u00f3ga", + "\u0421\u043f\u043b\u0438\u043d - \u0413\u0440\u0430\u043d\u0430\u0442\u043e\u0432\u044b\u0439 \u0430\u043b\u044c\u0431\u043e\u043c", + "\uc544\uc774\uc720 - \uc88b\uc740 \ub0a0", + } { + if n := testing.AllocsPerRun(100, func() { _ = nfc(s) }); n != 0 { + t.Errorf("nfc(%q): %v allocations", s, n) + } + } + ascii := "Noisia feat. Foreign Beggars - Shellshock" + if n := testing.AllocsPerRun(100, func() { _ = nfd(ascii); _ = jsToLower("noisia") }); n != 0 { + t.Errorf("ascii: %v allocations", n) + } +} + +var uniBenchSink string + +func BenchmarkNFCASCII(b *testing.B) { + s := "Noisia feat. Foreign Beggars - Shellshock (Original Mix) [Vision Recordings]" + b.SetBytes(int64(len(s))) + for i := 0; i < b.N; i++ { + uniBenchSink = nfc(s) + } +} + +func BenchmarkNFCLatinNormalized(b *testing.B) { + s := "Bj\u00f6rk & Sigur R\u00f3s - J\u00f3ga (Rem\u00edx) \u00c9dition sp\u00e9ciale" + b.SetBytes(int64(len(s))) + for i := 0; i < b.N; i++ { + uniBenchSink = nfc(s) + } +} + +func BenchmarkNFCDecomposed(b *testing.B) { + s := "Bjo\u0308rk & Sigur Ro\u0301s - Jo\u0301ga (Remi\u0301x) E\u0301dition spe\u0301ciale" + b.SetBytes(int64(len(s))) + for i := 0; i < b.N; i++ { + uniBenchSink = nfc(s) + } +} + +func BenchmarkNFDLatin(b *testing.B) { + s := "Bj\u00f6rk & Sigur R\u00f3s - J\u00f3ga (Rem\u00edx) \u00c9dition sp\u00e9ciale" + b.SetBytes(int64(len(s))) + for i := 0; i < b.N; i++ { + uniBenchSink = nfd(s) + } +} + +func BenchmarkNFCHangul(b *testing.B) { + s := "\uc544\uc774\uc720 - \uc88b\uc740 \ub0a0 (\ud53c\uccd0\ub9c1 \uac00\uc218)" + b.SetBytes(int64(len(s))) + for i := 0; i < b.N; i++ { + uniBenchSink = nfc(s) + } +} + +func BenchmarkJSToLower(b *testing.B) { + s := "\u039f\u0394\u03a5\u03a3\u03a3\u0395\u0391\u03a3 feat. BJ\u00d6RK" + b.SetBytes(int64(len(s))) + for i := 0; i < b.N; i++ { + uniBenchSink = jsToLower(s) + } +} + +// 10,000 code points of mixed text, the size of the R0.8 speed check. +func BenchmarkNFC10k(b *testing.B) { + rng := rand.New(rand.NewSource(2)) + pool := []rune{'a', 'B', ' ', '-', 0xe9, 0x301, 0x323, 0x3a3, 0x430, 0xac00, 0x1100, 0x1161, 0x4e00, 0x1f600} + rs := make([]rune, 10000) + for i := range rs { + rs[i] = pool[rng.Intn(len(pool))] + } + s := string(rs) + b.SetBytes(int64(len(s))) + for i := 0; i < b.N; i++ { + uniBenchSink = nfc(s) + } +} diff --git a/go/utf8_test.go b/go/utf8_test.go new file mode 100644 index 0000000..02b1ff9 --- /dev/null +++ b/go/utf8_test.go @@ -0,0 +1,84 @@ +package trackparse + +// Invalid UTF-8 at the API boundary. Each maximal ill-formed subpart becomes one U+FFFD (the +// WHATWG rule), so a Go caller with bad bytes gets exactly what a Rust caller gets after +// String::from_utf8_lossy, and what JavaScript gets after TextDecoder. The expected strings +// below were printed by from_utf8_lossy (Rust 1.91) and by Node's TextDecoder, which agree. + +import ( + "testing" + "unicode/utf8" +) + +var lossyCases = []struct{ bad, want string }{ + {"a\xffb", "a�b"}, + {"\xe2\x82", "�"}, // truncated three-byte sequence: one U+FFFD + {"\xe2\x82A", "�A"}, // truncated, then ASCII + {"\xed\xa0\x80", "���"}, // an encoded surrogate: one per byte + {"\xf0\x9f\x98", "�"}, // truncated four-byte sequence + {"\xf4\x90\x80\x80", "����"}, // above U+10FFFF + {"\xc0\xaf", "��"}, // overlong + {"\xe0\x80\xaf", "���"}, // overlong + {"\xf0\x8f\xbf\xbf", "����"}, // overlong + {"\x80\x80", "��"}, // lone continuation bytes + {"\xf1\x80\x80", "�"}, // truncated + {"\xe1\x80\xe2\x82\xac", "�€"}, // truncated, then a valid sequence + {"Noisia \xff- Stigma \xf0\x9f\x98(VIP\xed\xbf\xbf)", "Noisia �- Stigma �(VIP���)"}, +} + +func TestSanitizeMatchesFromUTF8Lossy(t *testing.T) { + for _, c := range lossyCases { + if got := sanitize(c.bad); got != c.want { + t.Errorf("sanitize(%q) = %q, want %q", c.bad, got, c.want) + } + if got := Normalize(c.bad); got != Normalize(c.want) { + t.Errorf("Normalize(%q) = %q, want %q", c.bad, got, Normalize(c.want)) + } + } +} + +func TestInvalidUTF8ParsesAsTheLossyString(t *testing.T) { + for _, c := range lossyCases { + got, want := Parse(c.bad), Parse(c.want) + if a, b := string(marshal(&got)), string(marshal(&want)); a != b { + t.Errorf("Parse(%q):\n%s\nwant\n%s", c.bad, a, b) + } + if !utf8.ValidString(got.Input) { + t.Errorf("Parse(%q).Input is not valid UTF-8", c.bad) + } + ga, wa := ParseArtists(c.bad), ParseArtists(c.want) + if a, b := string(marshal(artistList(ga))), string(marshal(artistList(wa))); a != b { + t.Errorf("ParseArtists(%q): %s, want %s", c.bad, a, b) + } + options := ParseOptions{Mode: ModeYouTube, Uploader: c.bad, KnownArtists: []string{c.bad}} + lossy := ParseOptions{Mode: ModeYouTube, Uploader: c.want, KnownArtists: []string{c.want}} + got, want = ParseWith(c.bad, options), ParseWith(c.want, lossy) + if a, b := string(marshal(&got)), string(marshal(&want)); a != b { + t.Errorf("ParseWith(%q) with bad options:\n%s\nwant\n%s", c.bad, a, b) + } + } +} + +func TestInvalidUTF8TracklistIsTheLossyText(t *testing.T) { + bad := "00:00 A\xc3 - B\r\n01:00 \xe2\x80\x93 C - D\xf0\n02:00 \xed\xa0\x80 - \xff\n" + want := "00:00 A� - B\r\n01:00 – C - D�\n02:00 ��� - �\n" + if got := sanitize(bad); got != want { + t.Fatalf("sanitize = %q, want %q", got, want) + } + gl, wl := ParseTracklist(bad), ParseTracklist(want) + if a, b := string(marshal(&gl)), string(marshal(&wl)); a != b { + t.Errorf("ParseTracklist:\n%s\nwant\n%s", a, b) + } + if len(gl.Entries) != 3 { + t.Errorf("%d entries, want 3", len(gl.Entries)) + } + edits := []Edit{SetRest(1, "X\xff - Y"), Insert(3, "03:00 \xe2\x82 - Z"), Shift(5)} + lossyEdits := []Edit{SetRest(1, "X� - Y"), Insert(3, "03:00 � - Z"), Shift(5)} + ge, we := ApplyEdits(bad, edits), ApplyEdits(want, lossyEdits) + if a, b := string(marshal(&ge)), string(marshal(&we)); a != b { + t.Errorf("ApplyEdits:\n%s\nwant\n%s", a, b) + } + if !utf8.ValidString(ge.Text) { + t.Errorf("ApplyEdits text is not valid UTF-8: %q", ge.Text) + } +} diff --git a/go/wire.go b/go/wire.go new file mode 100644 index 0000000..9e922bf --- /dev/null +++ b/go/wire.go @@ -0,0 +1,47 @@ +package trackparse + +// The JSON door: fixture-style calls with loose JSON arguments (wireCall). The fixture tests call +// it directly; internal/cmd/dump reaches it through internal/wire, which wire_hook.go fills in +// only when the module is built with -tags trackparse_wire. Without the tag nothing refers to +// the door, so it is not linked into the programs that use the module. + +// artistList writes a list of artists as JSON. +type artistList []Artist + +func (l artistList) write(w *jw) { writeArtists(w, l) } + +// wireString writes a JSON string. +type wireString string + +func (s wireString) write(w *jw) { w.str(string(s)) } + +// wireCall is one fixture-style call: fn is parse, parseArtists, format, normalize, +// parseTracklist or applyEdits; format parses input with options first, then formats with +// formatOptions. Unknown functions give null. input must be valid UTF-8 (the JSON reader +// guarantees it). +func wireCall(fn, input string, options, formatOptions, edits jsonValue) []byte { + switch fn { + case "parse": + t := newEngine(resolveParseJSON(options)).run(input, false) + return marshal(&t) + case "parseArtists": + return marshal(artistList(newEngine(resolveParseJSON(options)).runArtists(input))) + case "format": + t := newEngine(resolveParseJSON(options)).run(input, false) + return marshal(wireString(formatTrack(&t, resolveFormatJSON(formatOptions)))) + case "normalize": + return marshal(wireString(normalize(input))) + case "parseTracklist": + l := parseTracklist(input, resolveTracklistJSON(options)) + return marshal(&l) + case "applyEdits": + // Only an array has edits. + var list []jsonValue + if edits.kind == jsonArray { + list = edits.arr + } + r := applyEdits(input, list) + return marshal(&r) + } + return []byte("null") +} diff --git a/go/wire_hook.go b/go/wire_hook.go new file mode 100644 index 0000000..8c3839f --- /dev/null +++ b/go/wire_hook.go @@ -0,0 +1,38 @@ +//go:build trackparse_wire + +package trackparse + +import "github.com/4matic/trackparse/go/internal/wire" + +// Built only with -tags trackparse_wire, for internal/cmd/dump: this init is what links the JSON +// door into a binary. + +func init() { + wire.Call = wireLine +} + +// wireLine runs one case object {"fn", "input", "options", "formatOptions", "edits"}. +func wireLine(line []byte) []byte { + c, err := parseJSON(line) + if err != nil || c.kind != jsonObject { + return []byte("null") + } + fn, ok := c.getString("fn") + if !ok { + fn = "parse" + } + input, _ := c.getString("input") + options, ok := c.get("options") + if !ok { + options = jsonValue{kind: jsonObject} + } + formatOptions, ok := c.get("formatOptions") + if !ok { + formatOptions = jsonValue{kind: jsonObject} + } + edits, ok := c.get("edits") + if !ok { + edits = jArr(nil) + } + return wireCall(fn, input, options, formatOptions, edits) +} diff --git a/go/words.go b/go/words.go new file mode 100644 index 0000000..6c5fd3b --- /dev/null +++ b/go/words.go @@ -0,0 +1,549 @@ +package trackparse + +import "unicode/utf8" + +// Low-level text helpers shared by every rule: the R0.2 whitespace set, R0.3 word keys, R0.4 +// dedup keys, R0.6 letters and digits, token-sequence (phrase) matching, and the input +// sanitizer for invalid UTF-8. +// +// Text that is indexed is held as []rune, so indices are code-point indices (R0.5). Where the +// JS reference observes UTF-16 lengths (utf16Len), that is made explicit. Never index a string +// by byte inside a rule. The letter tests and the JS lowercase/NFC/NFD functions (isLetter, +// isUpperLetter, jsToLower, nfc, nfd) live in unicode.go, generated from the reference engine. + +// noRune is what at and before give outside the slice (JS t[i] is undefined there). It is not a +// valid code point, so it never equals a character and fails every class test. +const noRune rune = -1 + +// at is t[i], or noRune out of range. +func at(t []rune, i int) rune { + if i < 0 || i >= len(t) { + return noRune + } + return t[i] +} + +// before is t[i-1], or noRune when i is 0 or out of range. +func before(t []rune, i int) rune { + return at(t, i-1) +} + +// sub is t[a:b] with both ends clamped (JS slice with non-negative arguments). +func sub(t []rune, a, b int) []rune { + if b > len(t) { + b = len(t) + } + if b < 0 { + b = 0 + } + if a > b { + a = b + } + if a < 0 { + a = 0 + } + return t[a:b] +} + +// tail is t[a:], clamped. +func tail(t []rune, a int) []rune { + return sub(t, a, len(t)) +} + +// isWhitespace is the R0.2 test: the exact whitespace code-point set. Never use +// unicode.IsSpace or strings.TrimSpace, whose sets differ. +func isWhitespace(r rune) bool { + return (r >= 0x09 && r <= 0x0d) || + r == 0x20 || + r == 0x85 || + r == 0xa0 || + r == 0x1680 || + (r >= 0x2000 && r <= 0x200a) || + r == 0x2028 || + r == 0x2029 || + r == 0x202f || + r == 0x205f || + r == 0x3000 +} + +// isJSSpace is the set of JS String.prototype.trim(): WhiteSpace (with U+FEFF and Zs) plus +// LineTerminator. Not the R0.2 set: U+FEFF is in, U+0085 is out. +func isJSSpace(r rune) bool { + return (r >= 0x09 && r <= 0x0d) || + r == 0x20 || + r == 0xa0 || + r == 0x1680 || + (r >= 0x2000 && r <= 0x200a) || + r == 0x2028 || + r == 0x2029 || + r == 0x202f || + r == 0x205f || + r == 0x3000 || + r == 0xfeff +} + +// jsTrim is JS trim(). +func jsTrim(s string) string { + return jsTrimEnd(jsTrimStart(s)) +} + +// jsTrimStart is JS trimStart(). +func jsTrimStart(s string) string { + for len(s) > 0 { + r, size := utf8.DecodeRuneInString(s) + if !isJSSpace(r) { + break + } + s = s[size:] + } + return s +} + +// jsTrimEnd is JS trimEnd(). +func jsTrimEnd(s string) string { + for len(s) > 0 { + r, size := utf8.DecodeLastRuneInString(s) + if !isJSSpace(r) { + break + } + s = s[:len(s)-size] + } + return s +} + +// jsTrimRunes is JS trim() on a code-point slice. +func jsTrimRunes(t []rune) []rune { + a, b := 0, len(t) + for a < b && isJSSpace(t[a]) { + a++ + } + for b > a && isJSSpace(t[b-1]) { + b-- + } + return t[a:b] +} + +// isDigit is the R0.6 digit test: ASCII 0-9 only. +func isDigit(r rune) bool { + return r >= '0' && r <= '9' +} + +// isAllDigits reports whether s is a non-empty run of ASCII digits. +func isAllDigits(s string) bool { + if s == "" { + return false + } + for i := 0; i < len(s); i++ { + if s[i] < '0' || s[i] > '9' { + return false + } + } + return true +} + +// isLetterAt is the R0.6 letter test (general category L) on the code point at i. +func isLetterAt(t []rune, i int) bool { + r := at(t, i) + return r >= 0 && isLetter(r) +} + +// isLetterBefore is the R0.6 letter test on the code point that ends just before i. +func isLetterBefore(t []rune, i int) bool { + return isLetterAt(t, i-1) +} + +// isUpperAt is the R6.10 uppercase test (general category Lu) on the code point at i. +func isUpperAt(t []rune, i int) bool { + r := at(t, i) + return r >= 0 && isUpperLetter(r) +} + +// asciiLower lowercases A-Z only. +func asciiLower(s string) string { + for i := 0; i < len(s); i++ { + if c := s[i]; c >= 'A' && c <= 'Z' { + b := []byte(s) + for j := i; j < len(b); j++ { + if b[j] >= 'A' && b[j] <= 'Z' { + b[j] += 'a' - 'A' + } + } + return string(b) + } + } + return s +} + +// stripKeyPunct is R0.3: the lowercased word with one trailing . , ! ? : ; removed. +func stripKeyPunct(lower string) string { + if n := len(lower); n > 0 { + switch lower[n-1] { + case '.', ',', '!', '?', ':', ';': + return lower[:n-1] + } + } + return lower +} + +// wordKey is the R0.3 word key (stripped form). +func wordKey(word string) string { + return stripKeyPunct(asciiLower(word)) +} + +// wordMatches is R0.3: does word match the vocabulary token? The unstripped lowercase form is +// compared first, so entries ending in punctuation (feat.) match as written. +func wordMatches(word, token string) bool { + lower := asciiLower(word) + return lower == token || stripKeyPunct(lower) == token +} + +// wordSet is a set of vocabulary words. +type wordSet map[string]struct{} + +// newWordSet is the set of the given words. +func newWordSet(words ...[]string) wordSet { + set := wordSet{} + for _, list := range words { + for _, w := range list { + set[w] = struct{}{} + } + } + return set +} + +// has reports whether key is in the set. +func (s wordSet) has(key string) bool { + _, ok := s[key] + return ok +} + +// inVocab is R0.3 lookup of a word in a vocabulary set: its lowercase form, then its stripped +// form. +func inVocab(word string, vocab wordSet) bool { + lower := asciiLower(word) + return vocab.has(lower) || vocab.has(stripKeyPunct(lower)) +} + +// collapseSpaces collapses runs of R0.2 whitespace to one U+0020 and trims. +func collapseSpaces(s string) string { + out := make([]rune, 0, len(s)) + pending := false + for _, r := range s { + if isWhitespace(r) { + pending = len(out) > 0 + continue + } + if pending { + out = append(out, ' ') + } + pending = false + out = append(out, r) + } + return string(out) +} + +// collapseRunes is collapseSpaces on a code-point slice. +func collapseRunes(t []rune) string { + return collapseSpaces(string(t)) +} + +// splitWords is R0.7: the maximal runs of non-whitespace code points. +func splitWords(s string) []string { + return splitWordsRunes([]rune(s)) +} + +// splitWordsRunes is splitWords on a code-point slice. +func splitWordsRunes(t []rune) []string { + spans := wordSpans(t) + out := make([]string, len(spans)) + for i, w := range spans { + out[i] = w.text + } + return out +} + +// wordSpan is a word with its code-point span inside the slice it was taken from. +type wordSpan struct { + text string + start int + end int +} + +// wordSpans is the R0.7 words of t with their spans. +func wordSpans(t []rune) []wordSpan { + var spans []wordSpan + start := -1 + for i := 0; i <= len(t); i++ { + if i == len(t) || isWhitespace(t[i]) { + if start >= 0 { + spans = append(spans, wordSpan{text: string(t[start:i]), start: start, end: i}) + } + start = -1 + } else if start < 0 { + start = i + } + } + return spans +} + +// spanTexts is the text of each span. +func spanTexts(spans []wordSpan) []string { + out := make([]string, len(spans)) + for i, s := range spans { + out[i] = s.text + } + return out +} + +// dedupKey is the R0.4 dedup key: JS toLowerCase(), NFD, U+0300-U+036F removed, whitespace +// collapsed. The only place with full Unicode lowercasing. +func dedupKey(s string) string { + decomposed := nfd(jsToLower(s)) + kept := make([]rune, 0, len(decomposed)) + for _, r := range decomposed { + if r >= 0x300 && r <= 0x36f { + continue + } + kept = append(kept, r) + } + return collapseRunes(kept) +} + +// yearOf is a year word: 4 ASCII digits in 1900-2099 (word key, so "2015," counts). +func yearOf(word string) (int, bool) { + key := wordKey(word) + if len(key) != 4 || !isAllDigits(key) { + return 0, false + } + n := int(key[0]-'0')*1000 + int(key[1]-'0')*100 + int(key[2]-'0')*10 + int(key[3]-'0') + return n, n >= 1900 && n <= 2099 +} + +// utf16Len is the length in UTF-16 code units (JS string.length). Offsets that order +// fragments (R9) are kept in these units so ties break exactly as in the JS reference. +func utf16Len(t []rune) int { + n := 0 + for _, r := range t { + if r >= 0x10000 { + n += 2 + } else { + n++ + } + } + return n +} + +// utf16LenString is utf16Len of a string. +func utf16LenString(s string) int { + n := 0 + for _, r := range s { + if r >= 0x10000 { + n += 2 + } else { + n++ + } + } + return n +} + +// sanitize replaces every maximal subpart of an ill-formed UTF-8 sequence with one U+FFFD +// (the WHATWG / Unicode "maximal subpart" practice of TextDecoder and of Rust's +// String::from_utf8_lossy), so the Go and Rust ports read the same bytes as the same text. +// Go's own decoding gives one U+FFFD per bad byte instead. Valid input is returned unchanged. +func sanitize(s string) string { + if utf8.ValidString(s) { + return s + } + out := make([]byte, 0, len(s)+8) + i := 0 + for i < len(s) { + c := s[i] + if c < 0x80 { + out = append(out, c) + i++ + continue + } + // The bounds of the second byte, and how many continuation bytes follow the lead. + lo, hi, need := byte(0x80), byte(0xbf), 0 + switch { + case c >= 0xc2 && c <= 0xdf: + need = 1 + case c == 0xe0: + lo, need = 0xa0, 2 + case c >= 0xe1 && c <= 0xec, c == 0xee, c == 0xef: + need = 2 + case c == 0xed: + hi, need = 0x9f, 2 + case c == 0xf0: + lo, need = 0x90, 3 + case c >= 0xf1 && c <= 0xf3: + need = 3 + case c == 0xf4: + hi, need = 0x8f, 3 + } + if need == 0 { + out = utf8.AppendRune(out, utf8.RuneError) + i++ + continue + } + j := i + 1 + ok := true + for k := 0; k < need; k++ { + if j >= len(s) { + ok = false + break + } + b := s[j] + if k > 0 { + lo, hi = 0x80, 0xbf + } + if b < lo || b > hi { + ok = false + break + } + j++ + } + if ok { + out = append(out, s[i:j]...) + } else { + // The lead and the valid continuation bytes so far are one maximal subpart. + out = utf8.AppendRune(out, utf8.RuneError) + } + i = j + } + return string(out) +} + +// --------------------------------------------------------------------------------------------- +// Phrase tables: multi-word vocabulary matched as token sequences, longest first. + +type phraseEntry[V any] struct { + tokens []string + value V +} + +// phraseMatch is a match of a phrase table: the entry's value and the number of words used. +type phraseMatch[V any] struct { + value V + length int +} + +// phraseTable is multi-word vocabulary. The maps are only looked up, never ranged over. +type phraseTable[V any] struct { + entries []phraseEntry[V] + byFirst map[string][]int + byLast map[string][]int + keys map[string]struct{} +} + +// newPhraseTable is an empty table. +func newPhraseTable[V any]() *phraseTable[V] { + return &phraseTable[V]{ + byFirst: map[string][]int{}, + byLast: map[string][]int{}, + keys: map[string]struct{}{}, + } +} + +// add adds a phrase. The first entry for a key wins. Keys are ASCII-lowercased and trimmed like +// JS trim() (not collapsed). +func (t *phraseTable[V]) add(rawKey string, value V) { + key := jsTrim(asciiLower(rawKey)) + tokens := splitWords(key) + if len(tokens) == 0 { + return + } + if _, dup := t.keys[key]; dup { + return + } + id := len(t.entries) + t.keys[key] = struct{}{} + t.entries = append(t.entries, phraseEntry[V]{tokens: tokens, value: value}) + t.insertSorted(t.byFirst, tokens[0], id) + t.insertSorted(t.byLast, tokens[len(tokens)-1], id) +} + +// insertSorted keeps each list longest first, insertion order among equals (a stable insert, +// like the JS sort). +func (t *phraseTable[V]) insertSorted(m map[string][]int, k string, id int) { + list := append(m[k], id) + n := len(t.entries[id].tokens) + for i := len(list) - 1; i > 0 && len(t.entries[list[i-1]].tokens) < n; i-- { + list[i], list[i-1] = list[i-1], list[i] + } + m[k] = list +} + +// candidates are the entries indexed under the word's lowercase form, then under its stripped +// form. +func (t *phraseTable[V]) candidates(m map[string][]int, word string) []int { + lower := asciiLower(word) + stripped := stripKeyPunct(lower) + a := m[lower] + if stripped == lower { + return a + } + b := m[stripped] + if len(b) == 0 { + return a + } + out := make([]int, 0, len(a)+len(b)) + return append(append(out, a...), b...) +} + +// matchAt is the longest entry matching words[start:]. +func (t *phraseTable[V]) matchAt(words []string, start int) (phraseMatch[V], bool) { + var best phraseMatch[V] + found := false + if start < 0 || start >= len(words) { + return best, false + } + for _, id := range t.candidates(t.byFirst, words[start]) { + e := &t.entries[id] + n := len(e.tokens) + if found && n <= best.length { + continue + } + if start+n > len(words) { + continue + } + if tokensMatch(words, start, e.tokens) { + best, found = phraseMatch[V]{value: e.value, length: n}, true + } + } + return best, found +} + +// matchEnding is the longest entry matching words[:end] at its end (end exclusive). +func (t *phraseTable[V]) matchEnding(words []string, end int) (phraseMatch[V], bool) { + var best phraseMatch[V] + found := false + if end < 1 || end > len(words) { + return best, false + } + for _, id := range t.candidates(t.byLast, words[end-1]) { + e := &t.entries[id] + n := len(e.tokens) + if found && n <= best.length { + continue + } + from := end - n + if from < 0 { + continue + } + if tokensMatch(words, from, e.tokens) { + best, found = phraseMatch[V]{value: e.value, length: n}, true + } + } + return best, found +} + +func tokensMatch(words []string, start int, tokens []string) bool { + for k, tok := range tokens { + i := start + k + if i < 0 || i >= len(words) || !wordMatches(words[i], tok) { + return false + } + } + return true +} diff --git a/js/README.md b/js/README.md index d5d2a96..5ec86e7 100644 --- a/js/README.md +++ b/js/README.md @@ -23,7 +23,7 @@ This is the JavaScript and TypeScript package of [trackparse](https://github.com/4matic/trackparse), and the reference implementation. Its behaviour is defined by a [shared spec](https://github.com/4matic/trackparse/blob/main/spec/SPEC.md) and pinned by 13,130 fixtures. It passes all of them, and the -[Python and Rust packages](#other-languages) return the same output for every one. +[Python, Rust and Go packages](#other-languages) return the same output for every one. - Node 18 or later, browsers and other runtimes (no Node-specific APIs) - No dependencies @@ -263,12 +263,13 @@ Renders a `ParsedTrack` back to a string: `Artists - Title (versions) (prod. ... ```js import { format, parse } from "trackparse"; -const t = parse("Wilkinson ft. Becky Hill - Afterglow (Sub Focus Remix)"); +const t = parse("01. Wilkinson ft. Becky Hill - Afterglow (Sub Focus Remix)"); format(t); // 'Wilkinson ft. Becky Hill - Afterglow (Sub Focus Remix)' format(t, { feat: "title", joiners: "canonical" }); // 'Wilkinson - Afterglow (feat. Becky Hill) (Sub Focus Remix)' format(t, { feat: "omit", versions: "none" }); // 'Wilkinson - Afterglow' format(t, { featMarker: "featuring" }); // 'Wilkinson featuring Becky Hill - Afterglow (Sub Focus Remix)' +format(t, { position: true }); // '01. Wilkinson ft. Becky Hill - Afterglow (Sub Focus Remix)' ``` ### `normalize(input)` @@ -325,8 +326,9 @@ r.junk; // [ { raw: 'Full Album', kind: 'other' } ] ### `SPEC_VERSION` -The spec version this build implements, `"0.5.0"` in this release. The npm package, the PyPI -package, the Rust crate and the spec are released together and always share one version number. +The version of the spec this build implements. It equals the package version: the npm package, +the PyPI package, the Rust crate, the Go module and the spec are released together and always +share one version number. ## Modes @@ -550,8 +552,8 @@ catches a misspelt name. result, and `parse(format(parse(s)))` round-trips. - The published build is run against every fixture on Node 18 and 20, as ESM and as CommonJS. - [`compare-ports.mjs`](https://github.com/4matic/trackparse/blob/main/scripts/compare-ports.mjs) - runs every fixture input through this package, the Python package and the Rust crate and diffs - the complete JSON output. The difference count is zero. + runs every fixture input through this package, the Python package, the Rust crate and the Go + module and diffs the complete JSON output. The difference count is zero. ## Versioning @@ -559,22 +561,23 @@ catches a misspelt name. The package version is the spec version (`SPEC_VERSION`). While it is 0.x, a release that changes the output for some input bumps the minor version, and a patch release only fixes bugs. If you -store parsed results, pin the minor version (`"trackparse": "~0.5.0"`) and read the changelog -before moving up. +store parsed results, pin the minor version with a tilde range (`"trackparse": "~0.6.0"` stays on +0.6.x) and read the changelog before moving up. ## Other languages **Docs:** [Ports](https://4matic.github.io/trackparse/project/ports/) -The same parser exists for Python and Rust. All three implement one spec, pass the same fixtures, -are released together under one version number, and return identical JSON for every fixture input. -You can parse in one language and read the result in another. +The same parser exists for Python, Rust and Go. All four implement one spec, pass the same +fixtures, are released together under one version number, and return identical JSON for every +fixture input. You can parse in one language and read the result in another. | Language | Package | Install | |---|---|---| | JavaScript / TypeScript | [trackparse on npm](https://www.npmjs.com/package/trackparse) | `npm install trackparse` | | Python | [trackparse on PyPI](https://pypi.org/project/trackparse/) | `pip install trackparse` | | Rust | [trackparse on crates.io](https://crates.io/crates/trackparse) | `cargo add trackparse` | +| Go | [github.com/4matic/trackparse/go](https://pkg.go.dev/github.com/4matic/trackparse/go) | `go get github.com/4matic/trackparse/go` | ## Limitations @@ -600,19 +603,20 @@ pnpm --filter trackparse conformance # pass rate per fixture file and per rule pnpm --filter trackparse build # js/dist, ESM and CommonJS ``` -The Python and Rust ports mirror this package's modules one to one. Behaviour changes start in the +The Python, Rust and Go ports mirror this package's modules one to one. Behaviour changes start in the spec, not here: see [AGENTS.md](https://github.com/4matic/trackparse/blob/main/AGENTS.md). ## Links -- [Documentation](https://4matic.github.io/trackparse/), with every example in JavaScript, Python - and Rust, and a [playground](https://4matic.github.io/trackparse/playground/) that runs the +- [Documentation](https://4matic.github.io/trackparse/), with every example in JavaScript, Python, + Rust and Go, and a [playground](https://4matic.github.io/trackparse/playground/) that runs the parser in your browser -- [Spec](https://github.com/4matic/trackparse/blob/main/spec/SPEC.md) +- [Spec](https://github.com/4matic/trackparse/blob/main/spec/SPEC.md) and its + [changelog](https://github.com/4matic/trackparse/blob/main/spec/CHANGELOG.md) - [Changelog](https://github.com/4matic/trackparse/blob/main/js/CHANGELOG.md) - [Project README](https://github.com/4matic/trackparse#readme) - [GitHub repository](https://github.com/4matic/trackparse) -- [PyPI package](https://pypi.org/project/trackparse/) · [Rust crate](https://crates.io/crates/trackparse) +- [PyPI package](https://pypi.org/project/trackparse/) · [Rust crate](https://crates.io/crates/trackparse) · [Go module](https://pkg.go.dev/github.com/4matic/trackparse/go) ## License diff --git a/python/README.md b/python/README.md index 94edc2b..e8ee640 100644 --- a/python/README.md +++ b/python/README.md @@ -22,7 +22,7 @@ doesn't recognize stays in the title, word for word. This is the Python port of [trackparse](https://github.com/4matic/trackparse). Its behaviour is defined by a [shared spec](https://github.com/4matic/trackparse/blob/main/spec/SPEC.md) and pinned by 13,130 fixtures. It passes all of them, and for every fixture input its output is byte-identical -to the [JavaScript and Rust packages](#other-languages). +to the [JavaScript, Rust and Go packages](#other-languages). - Python 3.9 to 3.14 - No dependencies @@ -261,19 +261,17 @@ Renders a track back to a string. | `position` | `False` | Include the track number (`01. `) | ```python -from trackparse import format_track +from trackparse import format_track, parse -format_track( - parse("Wilkinson ft. Becky Hill - Afterglow (Sub Focus Remix)"), - feat="title", - joiners="canonical", -) -# 'Wilkinson - Afterglow (feat. Becky Hill) (Sub Focus Remix)' +t = parse("01. Wilkinson ft. Becky Hill - Afterglow (Sub Focus Remix)") -format_track(track, feat="omit", versions="none") -# 'Wilkinson - Afterglow' -format_track(track, position=True) -# '01. Wilkinson ft. Becky Hill & Tom Cane - Afterglow (Sub Focus VIP Remix)' +format_track(t) # 'Wilkinson ft. Becky Hill - Afterglow (Sub Focus Remix)' +format_track(t, feat="title", joiners="canonical") +# 'Wilkinson - Afterglow (feat. Becky Hill) (Sub Focus Remix)' +format_track(t, feat="omit", versions="none") # 'Wilkinson - Afterglow' +format_track(t, feat_marker="featuring") +# 'Wilkinson featuring Becky Hill - Afterglow (Sub Focus Remix)' +format_track(t, position=True) # '01. Wilkinson ft. Becky Hill - Afterglow (Sub Focus Remix)' ``` ### `normalize(s)` @@ -325,9 +323,9 @@ parser.parse("Chase & Status x Camo & Krooked - Track (Alix Perez Rerub)").versi ### `SPEC_VERSION` -The spec version this build implements, `"0.5.0"` in this release. It equals `__version__`: the -PyPI package, the npm package, the Rust crate and the spec are released together and always share -one version number. +The version of the spec this build implements. It equals `__version__`: the PyPI package, the npm +package, the Rust crate, the Go module and the spec are released together and always share one +version number. ## Modes @@ -555,8 +553,8 @@ The package ships `py.typed` and passes `mypy --strict`. the result, and `parse(format_track(parse(s)))` round-trips. - CI runs the suite on Python 3.9 to 3.14, and runs the fixtures again against the built wheel. - [`compare-ports.mjs`](https://github.com/4matic/trackparse/blob/main/scripts/compare-ports.mjs) - runs every fixture input through the JavaScript package, this package and the Rust crate and - diffs the complete JSON output. The difference count is zero. + runs every fixture input through the JavaScript package, this package, the Rust crate and the + Go module and diffs the complete JSON output. The difference count is zero. ## Versioning @@ -564,14 +562,14 @@ The package ships `py.typed` and passes `mypy --strict`. The package version is the spec version (`SPEC_VERSION`). While it is 0.x, a release that changes the output for some input bumps the minor version, and a patch release only fixes bugs. If you -store parsed results, pin the minor version (`trackparse~=0.5.0`) and read the changelog before -moving up. +store parsed results, pin the minor version (`trackparse~=0.6.0` stays on 0.6.x) and read the +changelog before moving up. ## Other languages **Docs:** [Ports](https://4matic.github.io/trackparse/project/ports/) -The same parser exists for JavaScript and Rust. All three implement one spec, pass the same +The same parser exists for JavaScript, Rust and Go. All four implement one spec, pass the same fixtures, are released together under one version number, and return identical JSON for every fixture input. You can parse in one language and read the result in another. @@ -580,6 +578,7 @@ fixture input. You can parse in one language and read the result in another. | JavaScript / TypeScript | [trackparse on npm](https://www.npmjs.com/package/trackparse) | `npm install trackparse` | | Python | [trackparse on PyPI](https://pypi.org/project/trackparse/) | `pip install trackparse` | | Rust | [trackparse on crates.io](https://crates.io/crates/trackparse) | `cargo add trackparse` | +| Go | [github.com/4matic/trackparse/go](https://pkg.go.dev/github.com/4matic/trackparse/go) | `go get github.com/4matic/trackparse/go` | ## Limitations @@ -611,14 +610,15 @@ same spec rule IDs. Behaviour changes start in the spec, not here: see ## Links -- [Documentation](https://4matic.github.io/trackparse/), with every example in JavaScript, Python - and Rust, and a [playground](https://4matic.github.io/trackparse/playground/) that runs the +- [Documentation](https://4matic.github.io/trackparse/), with every example in JavaScript, Python, + Rust and Go, and a [playground](https://4matic.github.io/trackparse/playground/) that runs the parser in your browser -- [Spec](https://github.com/4matic/trackparse/blob/main/spec/SPEC.md) +- [Spec](https://github.com/4matic/trackparse/blob/main/spec/SPEC.md) and its + [changelog](https://github.com/4matic/trackparse/blob/main/spec/CHANGELOG.md) - [Changelog](https://github.com/4matic/trackparse/blob/main/python/CHANGELOG.md) - [Project README](https://github.com/4matic/trackparse#readme) - [GitHub repository](https://github.com/4matic/trackparse) -- [npm package](https://www.npmjs.com/package/trackparse) · [Rust crate](https://crates.io/crates/trackparse) +- [npm package](https://www.npmjs.com/package/trackparse) · [Rust crate](https://crates.io/crates/trackparse) · [Go module](https://pkg.go.dev/github.com/4matic/trackparse/go) ## License diff --git a/release-please-config.json b/release-please-config.json index 7c4137d..05d807c 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -4,7 +4,7 @@ "tag-separator": "-", "bump-minor-pre-major": true, "bump-patch-for-minor-pre-major": false, - "pull-request-header": ":robot: Merging this PR tags the release, publishes a GitHub Release with these notes and publishes to npm, PyPI and crates.io.", + "pull-request-header": ":robot: Merging this PR tags the release, publishes a GitHub Release with these notes and publishes to npm, PyPI and crates.io. The Go module is published by its tag (go/vX.Y.Z) through the Go module proxy.", "changelog-sections": [ { "type": "feat", @@ -107,6 +107,21 @@ } ], "initial-version": "0.1.0" + }, + "go": { + "release-type": "go", + "component": "go", + "package-name": "github.com/4matic/trackparse/go", + "tag-separator": "/", + "include-v-in-tag": true, + "changelog-path": "CHANGELOG.md", + "extra-files": [ + { + "type": "generic", + "path": "data_gen.go" + } + ], + "initial-version": "0.1.0" } }, "plugins": [ @@ -117,7 +132,8 @@ "js", "spec", "python", - "rust" + "rust", + "go" ] } ] diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 2eec2e8..5f78428 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -3,7 +3,7 @@ name = "trackparse" version = "0.5.1" # x-release-please-version edition = "2021" rust-version = "1.74" -description = "Turn messy track names into structured data: artists with roles, remixes and versions, junk, and whole tracklists. One spec, same output as the JavaScript and Python packages." +description = "Turn messy track names into structured data: artists with roles, remixes and versions, junk, and whole tracklists. One spec, same output as the JavaScript, Python and Go packages." license = "MIT" repository = "https://github.com/4matic/trackparse" homepage = "https://4matic.github.io/trackparse/" diff --git a/rust/README.md b/rust/README.md index 3b0f7bc..7191146 100644 --- a/rust/README.md +++ b/rust/README.md @@ -23,7 +23,7 @@ doesn't recognize stays in the title, word for word. This is the Rust port of [trackparse](https://github.com/4matic/trackparse). Its behaviour is defined by a [shared spec](https://github.com/4matic/trackparse/blob/main/spec/SPEC.md) and pinned by 13,130 fixtures. It passes all of them, and for every fixture input its output is byte-identical -to the [JavaScript and Python packages](#other-languages). +to the [JavaScript, Python and Go packages](#other-languages). - Rust 1.74 or later (the minimum supported version; CI runs the test suite on 1.74 and on stable) - One dependency (`unicode-normalization`); `serde` is optional @@ -360,6 +360,12 @@ assert_eq!( format_track_with(&track, &options), "01. Wilkinson ft. Becky Hill - Afterglow (Sub Focus Remix)" ); + +let options = FormatOptions::new().feat_marker("featuring"); +assert_eq!( + format_track_with(&track, &options), + "Wilkinson featuring Becky Hill - Afterglow (Sub Focus Remix)" +); ``` ### `normalize` @@ -412,9 +418,9 @@ assert_eq!(track.versions[0].version_type, VersionType::Rework); ### `SPEC_VERSION` -The spec version this build implements, `"0.5.0"` in this release. It equals the crate version: -the crate, the npm package, the PyPI package and the spec are released together and always share -one version number. +The version of the spec this build implements. It equals the crate version: the crate, the npm +package, the PyPI package, the Go module and the spec are released together and always share one +version number. ## Modes @@ -642,7 +648,7 @@ from JSON can fail as any `serde` type can. API tests. The skip list is empty. - `scripts/compare-ports.mjs` in the repository runs every fixture input through the JavaScript package and this crate and compares the complete JSON output, every field of it, not only the - ones a fixture asserts. The Python package is checked the same way. + ones a fixture asserts. The Python package and the Go module are checked the same way. - The Unicode facts the rules need (letters, uppercase letters, lowercase mapping) are tables generated from the reference implementation and compiled into the crate. The output does not depend on the compiler's Unicode version: Rust 1.74 and current stable give the same bytes. @@ -661,8 +667,9 @@ for some strings, so Cargo will not select them. The JavaScript package normalizes with its runtime's tables, which are Unicode 17 on Node 24. Unicode 18 added 32 combining marks, so a string that contains one of them can come out with its -marks in another order here than in JavaScript on that runtime. Strings without those marks are -not affected, and every shared fixture gives the same bytes. +marks in another order here than in JavaScript on that runtime, and than in the Go module, whose +NFC and NFD tables are generated from Node 24. Strings without those marks are not affected, and +every shared fixture gives the same bytes. ## Performance @@ -676,14 +683,14 @@ length (thousands of duplicate credits, bracket groups or junk phrases) under a The crate version is the spec version (`SPEC_VERSION`). While it is 0.x, a release that changes the output for some input bumps the minor version, and a patch release only fixes bugs. Cargo's -default requirement (`trackparse = "0.5"`) already stays within one minor version, so `cargo update` -will not change your output. Read the changelog before moving to the next minor. +default requirement already stays within one minor version (`trackparse = "0.6"` means 0.6.x), so +`cargo update` only brings fixes. Read the changelog before moving to the next minor. ## Other languages **Docs:** [Ports](https://4matic.github.io/trackparse/project/ports/) -The same parser exists for JavaScript and Python. All three implement one spec, pass the same +The same parser exists for JavaScript, Python and Go. All four implement one spec, pass the same fixtures, are released together under one version number, and return identical JSON for every fixture input. You can parse in one language and read the result in another. The one known difference is described under [Unicode version](#unicode-version). @@ -693,6 +700,7 @@ difference is described under [Unicode version](#unicode-version). | JavaScript / TypeScript | [trackparse on npm](https://www.npmjs.com/package/trackparse) | `npm install trackparse` | | Python | [trackparse on PyPI](https://pypi.org/project/trackparse/) | `pip install trackparse` | | Rust | [trackparse on crates.io](https://crates.io/crates/trackparse) | `cargo add trackparse` | +| Go | [github.com/4matic/trackparse/go](https://pkg.go.dev/github.com/4matic/trackparse/go) | `go get github.com/4matic/trackparse/go` | ## Limitations @@ -724,15 +732,16 @@ same spec rule IDs. Behaviour changes start in the spec, not here: see ## Links -- [Documentation](https://4matic.github.io/trackparse/), with every example in JavaScript, Python - and Rust, and a [playground](https://4matic.github.io/trackparse/playground/) that runs the +- [Documentation](https://4matic.github.io/trackparse/), with every example in JavaScript, Python, + Rust and Go, and a [playground](https://4matic.github.io/trackparse/playground/) that runs the parser in your browser - [API documentation on docs.rs](https://docs.rs/trackparse) -- [Spec](https://github.com/4matic/trackparse/blob/main/spec/SPEC.md) +- [Spec](https://github.com/4matic/trackparse/blob/main/spec/SPEC.md) and its + [changelog](https://github.com/4matic/trackparse/blob/main/spec/CHANGELOG.md) - [Changelog](https://github.com/4matic/trackparse/blob/main/rust/CHANGELOG.md) - [Project README](https://github.com/4matic/trackparse#readme) - [GitHub repository](https://github.com/4matic/trackparse) -- [npm package](https://www.npmjs.com/package/trackparse) · [PyPI package](https://pypi.org/project/trackparse/) +- [npm package](https://www.npmjs.com/package/trackparse) · [PyPI package](https://pypi.org/project/trackparse/) · [Go module](https://pkg.go.dev/github.com/4matic/trackparse/go) ## License diff --git a/scripts/compare-ports.mjs b/scripts/compare-ports.mjs index ceaddf5..758bb55 100644 --- a/scripts/compare-ports.mjs +++ b/scripts/compare-ports.mjs @@ -1,40 +1,30 @@ #!/usr/bin/env node // Cross-port byte check: runs every fixture case (spec/fixtures/**) through the built JS package, -// the Python port and the Rust port, and diffs the FULL outputs (not the partial fixture -// expectations). JS is the reference; each other port is compared with it. +// the Python port, the Rust port and the Go port, and diffs the FULL outputs (not the partial +// fixture expectations). JS is the reference; each other port is compared with it. // // Usage (from the repo root): // pnpm --filter trackparse build # builds js/dist -// node scripts/compare-ports.mjs # needs `uv` (Python) and `cargo` (Rust) -// node scripts/compare-ports.mjs --only=python # or --only=rust +// node scripts/compare-ports.mjs # needs `uv` (Python), `cargo` (Rust) and `go` (Go) +// node scripts/compare-ports.mjs --only=python # or --only=rust, --only=go // -// Rust runs `cargo run --release --example dump` in rust/ (JSONL in, one JSON result per line). +// Rust runs `cargo run --release --example dump` in rust/ and Go runs +// `go run -tags trackparse_wire ./internal/cmd/dump` in go/ (both JSONL in, one JSON result per +// line, the same protocol; the tag links the JSON door into the Go module). // Options are merged like js/test/runner.ts ({...defaults.options, ...case.options}, same for // formatOptions). Python gets one process for all cases (JSONL over stdin/stdout); dump_py.py maps // the camelCase options to snake_case kwargs and serialises with to_dict() (ParsedTrack, and the // Tracklist / EditResult of trackparse.tracklist for parseTracklist / applyEdits). -// Prints counts and the first 30 differences; exits 1 if any case differs. +// Prints counts and the first 30 differences; exits 1 if any case differs. The port runners and +// the comparison are in scripts/lib/ports.mjs, shared with scripts/fuzz-ports.mjs. -import { spawn } from "node:child_process"; -import { existsSync, readdirSync, readFileSync, statSync } from "node:fs"; -import { dirname, join, relative, resolve } from "node:path"; -import { fileURLToPath, pathToFileURL } from "node:url"; +import { readdirSync, readFileSync, statSync } from "node:fs"; +import { join, relative } from "node:path"; +import { describeDiff, comparable, root, runJs, runLines, runPython } from "./lib/ports.mjs"; -const root = resolve(dirname(fileURLToPath(import.meta.url)), ".."); const fixturesDir = join(root, "spec", "fixtures"); -const distEntry = join(root, "js", "dist", "index.js"); -const distTracklist = join(root, "js", "dist", "tracklist.js"); const MAX_SHOWN = 30; -for (const entry of [distEntry, distTracklist]) { - if (!existsSync(entry)) { - console.error(`missing ${relative(root, entry)}: run \`pnpm --filter trackparse build\` first`); - process.exit(2); - } -} -const js = await import(pathToFileURL(distEntry).href); -const jsTracklist = await import(pathToFileURL(distTracklist).href); - function walk(dir) { const out = []; for (const entry of readdirSync(dir).sort()) { @@ -68,128 +58,14 @@ for (const full of walk(fixturesDir)) { } } -function runJs(c) { - try { - switch (c.fn) { - case "parse": - return { ok: js.parse(c.input, c.options) }; - case "parseArtists": - return { ok: js.parseArtists(c.input, c.options) }; - case "format": - return { ok: js.format(js.parse(c.input, c.options), c.formatOptions) }; - case "normalize": - return { ok: js.normalize(c.input) }; - case "parseTracklist": - return { ok: jsTracklist.parseTracklist(c.input, c.options) }; - case "applyEdits": - return { ok: jsTracklist.applyEdits(c.input, c.edits, c.options) }; - } - } catch (err) { - return { error: `${err?.name ?? "Error"}: ${err?.message ?? String(err)}` }; - } - throw new Error(`unknown fn ${c.fn}`); -} - -function runPython(all) { - return new Promise((resolvePy, reject) => { - const child = spawn("uv", ["run", "--project", "python", "python", "scripts/dump_py.py"], { - cwd: root, - stdio: ["pipe", "pipe", "inherit"], - }); - const chunks = []; - child.stdout.on("data", (chunk) => chunks.push(chunk)); - child.on("error", reject); - child.on("close", (code) => { - if (code !== 0) return reject(new Error(`dump_py.py exited with code ${code}`)); - const byIndex = new Map(); - for (const line of Buffer.concat(chunks).toString("utf8").split("\n")) { - if (!line.trim()) continue; - const rec = JSON.parse(line); - byIndex.set(rec.i, rec); - } - resolvePy(byIndex); - }); - child.stdin.on("error", reject); - for (const c of all) { - const { i, fn, input, options, formatOptions, edits } = c; - // Edits keep non-JSON numbers (fixtures write infinity as 1e999) via a tagged string. - const line = JSON.stringify({ i, fn, input, options, formatOptions, edits }, (_k, v) => - typeof v === "number" && !Number.isFinite(v) ? { $number: String(v) } : v, - ); - child.stdin.write(`${line}\n`); - } - child.stdin.end(); - }); -} - -function runRust(all) { - return new Promise((resolveRs, reject) => { - const child = spawn("cargo", ["run", "--quiet", "--release", "--example", "dump"], { - cwd: join(root, "rust"), - stdio: ["pipe", "pipe", "inherit"], - }); - const chunks = []; - child.stdout.on("data", (chunk) => chunks.push(chunk)); - child.on("error", reject); - child.on("close", (code) => { - if (code !== 0) return reject(new Error(`the Rust dump example exited with code ${code}`)); - const lines = Buffer.concat(chunks).toString("utf8").split("\n"); - const byIndex = new Map(); - // One output line per input line, in order. Rust never throws: every line is a result. - all.forEach((c, k) => byIndex.set(c.i, lines[k] ? { ok: JSON.parse(lines[k]) } : undefined)); - resolveRs(byIndex); - }); - child.stdin.on("error", reject); - for (const c of all) { - const { fn, input, options, formatOptions, edits } = c; - // Non-finite numbers travel as 1e999 / -1e999, which the crate's JSON reader takes as infinity. - const line = JSON.stringify({ fn, input, options, formatOptions, edits }, (_k, v) => - typeof v === "number" && !Number.isFinite(v) ? `\u0000num:${v}` : v, - ) - .replaceAll('"\\u0000num:Infinity"', "1e999") - .replaceAll('"\\u0000num:-Infinity"', "-1e999"); - child.stdin.write(`${line}\n`); - } - child.stdin.end(); - }); -} - -/** JSON with object keys sorted recursively, so key order never counts as a difference. */ -function canonical(value) { - return JSON.stringify(value, (_key, v) => - v && typeof v === "object" && !Array.isArray(v) - ? Object.fromEntries(Object.keys(v).sort().map((k) => [k, v[k]])) - : v, - ); -} - -/** Canonical form of a result: outputs compare by value, failures only by the fact they threw. */ -function comparable(rec) { - if (!rec) return ""; - if ("error" in rec) return ""; - return canonical(rec.ok === undefined ? null : rec.ok); -} - -/** First differing path between two JSON values, for a compact report. */ -function firstDiff(a, b, path = "$") { - if (canonical(a) === canonical(b)) return null; - if (a && b && typeof a === "object" && typeof b === "object" && Array.isArray(a) === Array.isArray(b)) { - const keys = Array.isArray(a) - ? [...Array(Math.max(a.length, b.length)).keys()] - : [...new Set([...Object.keys(a), ...Object.keys(b)])].sort(); - for (const k of keys) { - const d = firstDiff(a[k], b[k], Array.isArray(a) ? `${path}[${k}]` : `${path}.${k}`); - if (d) return d; - } - } - const show = (v) => (v === undefined ? "" : canonical(v)); - return `${path}: js=${show(a)} py=${show(b)}`; -} +const runRust = runLines("Rust", "cargo", ["run", "--quiet", "--release", "--example", "dump"], join(root, "rust")); +const runGo = runLines("Go", "go", ["run", "-tags", "trackparse_wire", "./internal/cmd/dump"], join(root, "go")); const only = process.argv.find((a) => a.startsWith("--only="))?.slice(7); const ports = [ { name: "Python", key: "py", run: runPython }, { name: "Rust", key: "rs", run: runRust }, + { name: "Go", key: "go", run: runGo }, ].filter((p) => !only || p.name.toLowerCase() === only); const jsResults = cases.map(runJs); @@ -207,11 +83,7 @@ for (const port of ports) { if (j.error && p?.error) bothThrew++; if (comparable(j) === comparable(p)) return; byFn[c.fn].differ++; - let detail; - if (!p) detail = `${port.name} produced no output`; - else if (j.error || p.error) detail = `js ${j.error ?? "ok"} | ${port.key} ${p.error ?? "ok"}`; - else detail = firstDiff(j.ok, p.ok).replace(" py=", ` ${port.key}=`); - diffs.push({ c, detail }); + diffs.push({ c, detail: describeDiff(port, j, p) }); }); console.log(`compared ${cases.length} cases (JS dist vs ${port.name})`); diff --git a/scripts/fuzz-ports.mjs b/scripts/fuzz-ports.mjs new file mode 100644 index 0000000..43013db --- /dev/null +++ b/scripts/fuzz-ports.mjs @@ -0,0 +1,393 @@ +#!/usr/bin/env node +// Random differential run: generated single-track inputs and tracklists with edits through the +// built JS package (the reference), the Python port, the Rust port and the Go port, comparing the +// FULL JSON outputs, like scripts/compare-ports.mjs does for the fixture inputs. +// +// Usage (from the repo root): +// pnpm --filter trackparse build +// node scripts/fuzz-ports.mjs # all ports, 20,000 tracks, seed 1 +// node scripts/fuzz-ports.mjs --only=go --n=500000 --seed=7 +// node scripts/fuzz-ports.mjs --only=rust --n=100000 --lists=50000 --out=diffs.jsonl +// +// Flags: +// --n=N single-track cases (parse, parseArtists, format, normalize); default 20000 +// --lists=N tracklists; each gives a parseTracklist and an applyEdits case with random +// edits (invalid ones included); default 58% of --n (290,000 for 500,000) +// --seed=N generator seed (mulberry32); default 1. The same seed gives the same cases. +// --only=X python, rust or go; default all three +// --batch=N cases per port process; default 20000 +// --out=FILE write every differing case as JSONL (the case and each port's output) +// +// The inputs are what the JSON door can carry faithfully: no lone surrogates (Rust and Go read +// them as U+FFFD), no NaN or -0 in options or edits (JSON.stringify changes them). Option values +// include odd types and strings, integer-like keyword keys and unknown names, as the R0.8 +// fallbacks must agree too. Go and Rust are built once (go build, cargo build --release) and +// their binaries run per batch; Python runs scripts/dump_py.py per batch. +// Exits 1 if any case differs. + +import { execFileSync } from "node:child_process"; +import { mkdtempSync, writeFileSync } from "node:fs"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import { comparable, describeDiff, root, runJs, runLines, runPython } from "./lib/ports.mjs"; + +const MAX_SHOWN = 20; + +function flag(name, fallback) { + const arg = process.argv.find((a) => a.startsWith(`--${name}=`)); + return arg ? arg.slice(name.length + 3) : fallback; +} +const nTracks = Number(flag("n", "20000")); +const nLists = Number(flag("lists", String(Math.round(nTracks * 0.58)))); +const seed = Number(flag("seed", "1")); +const only = flag("only", ""); +const batchSize = Number(flag("batch", "20000")); +const outFile = flag("out", ""); + +// --------------------------------------------------------------------------------------------- +// Generator + +let state = seed >>> 0; +/** mulberry32 */ +function next() { + state = (state + 0x6d2b79f5) >>> 0; + let t = state; + t = Math.imul(t ^ (t >>> 15), t | 1); + t ^= t + Math.imul(t ^ (t >>> 7), t | 61); + return (t ^ (t >>> 14)) >>> 0; +} +const below = (n) => (n <= 0 ? 0 : next() % n); +const pick = (items) => items[below(items.length)]; +const chance = (percent) => below(100) < percent; +const times = (n, f) => Array.from({ length: n }, f); + +const TRICKY = [ + " ", " ", "-", " - ", " – ", "—", "(", ")", "[", "]", "{", "}", '"', "'", "“", "”", "|", " | ", + ",", ";", "&", " & ", " x ", " X ", " feat. ", " ft ", " ft. ", " featuring ", "prod. by ", + " prod. ", " by ", " vs ", " and ", " with ", ".", ":", "_", "0", "1", "01. ", "3:45 ", + "[03:45] ", "Remix", " Mix", "VIP", " Edit", " Bootleg", "Original Mix", "Extended Mix", + "Official Video", "Official Audio", "Lyrics", "HD", "4K", "Free Download", "OUT NOW", "ID", + "​", " ", " ", "", "é", "é", "𝄞", "�", "×", "/", ".mp3", + ".flac", "2015", "(2015)", "[Explicit]", "(Clean)", "Topic", "VEVO", "Unknown Artist", + "Track 01", "Untitled", "a", "Ab", "x", +]; + +/** One random code point (never a surrogate), biased to the ranges the rules look at. */ +function anyChar() { + let cp; + switch (below(10)) { + case 0: case 1: case 2: case 3: cp = below(0x80); break; + case 4: cp = below(0x100); break; + case 5: cp = 0x300 + below(0x70); break; // combining marks + case 6: cp = 0x2000 + below(0x70); break; // spaces, dashes, quotes, invisibles + case 7: cp = below(0x10000); break; + case 8: cp = 0xff00 + below(0xf0); break; // fullwidth forms + default: cp = below(0x110000); + } + if (cp >= 0xd800 && cp <= 0xdfff) cp = 0xfffd; + return String.fromCodePoint(cp); +} +const randomChars = (max) => times(below(max + 1), anyChar).join(""); +const noisyString = () => times(below(25), () => (chance(50) ? pick(TRICKY) : randomChars(4))).join(""); + +const ARTISTS = [ + "Noisia", "Phace", "Fox Stevenson", "Sub Focus", "Mefjus", "Camo & Krooked", "Alix Perez", + "Chase & Status", "Above & Beyond", "Foreign Beggars", "Black Sun Empire", "Jay-Z", "AC/DC", + "Simon & Garfunkel", "The Prototypes", "Kino", "Кино", "宇多田ヒカル", "DJ Fresh", "A$AP Rocky", +]; +const TITLES = [ + "Tentacles", "Bruises", "Out the Blue", "Dead Limit", "Stigma", "Blind Faith", "Shellshock", + "Untitled", "Intro", "Love & Hate", "I Love You (Part 2)", "Mr. Brightside", "Hi-Fi", "2 Much", +]; +const VERSION_WORDS = ["Remix", "VIP", "Edit", "Bootleg", "Flip", "Refix", "Dub", "Mix", "Rework", "Version", "Instrumental", "Sped Up"]; +const JOINERS = [" & ", ", ", " x ", " vs. ", " and ", " + ", " / ", " with "]; + +/** A track-shaped input, in one of the shapes the modes look for. */ +function trackString() { + const artists = [...new Set(times(1 + below(3), () => pick(ARTISTS)))]; + let s = artists.join(pick(JOINERS)); + if (chance(40)) s += `${pick([" feat. ", " ft. ", " featuring ", " (feat. "])}${pick(ARTISTS)}${chance(30) ? ")" : ""}`; + s += `${pick([" - ", " – ", " — ", " -", "-", " | ", " ~ ", ": "])}${pick(TITLES)}`; + for (let k = below(3); k > 0; k--) { + const open = pick(["(", "[", "{", " - "]); + const close = { "(": ")", "[": "]", "{": "}", " - ": "" }[open]; + const inner = pick([ + `${pick(ARTISTS)} ${pick(VERSION_WORDS)}`, + pick(VERSION_WORDS), + `${pick(["Original", "Extended", "Radio", "Club"])} Mix`, + pick(["Official Video", "Official Audio", "Lyric Video", "HD", "Free Download", "OUT NOW"]), + `feat. ${pick(ARTISTS)}`, + `prod. by ${pick(ARTISTS)}`, + String(1990 + below(40)), + noisyString(), + ]); + s += ` ${open}${inner}${close}`; + } + if (chance(20)) s = `${pick(["01. ", "1 - ", "A1 ", "[03:45] ", "12) ", "07 "])}${s}`; + if (chance(15)) s += pick([".mp3", ".flac", " (2015)", " [Explicit]", " Remix"]); + return s; +} + +function anyString() { + switch (below(4)) { + case 0: return randomChars(60); + case 1: return noisyString(); + default: return trackString(); + } +} + +const ODD = [5, 0, -1, true, false, null, {}, [], "", " "]; + +function stringList() { + if (chance(10)) return pick(ODD); + return times(below(4), () => (chance(85) ? pick([pick(ARTISTS), pick(TRICKY), anyString(), "a", ""]) : pick(ODD))); +} + +const VERSION_TYPES = [ + "remix", "bootleg", "vip", "edit", "flip", "dub", "mix", "spedUp", "version", "original", "x", "", "Remix", "constructor", +]; +const JUNK_KINDS = ["video", "audio", "lyrics", "quality", "promo", "other", "weird", "", "__proto__"]; +const KEYS = [ + "rerub", "2", "10", "01", "-1", "0", "4294967294", "4294967295", "1.5", " vip ", "VIP", "feat.", + "mix", "official", "out now", "a b", "", " ", "x.", "toString", "Ab", +]; + +function objectOf(values) { + if (chance(10)) return pick(ODD); + const out = {}; + for (let k = below(5); k > 0; k--) out[chance(80) ? pick(KEYS) : anyString()] = chance(90) ? pick(values) : pick(ODD); + return out; +} + +function keywords() { + if (chance(5)) return pick(ODD); + const k = {}; + if (chance(50)) k.versionHeads = objectOf(VERSION_TYPES); + if (chance(30)) k.descriptors = stringList(); + if (chance(30)) k.genres = stringList(); + if (chance(50)) k.junk = objectOf(JUNK_KINDS); + if (chance(40)) k.featMarkers = chance(70) ? times(below(3), () => pick(["with", "&", "-", "x", "w/", "", "Feat"])) : stringList(); + return k; +} + +const MODES = [undefined, "auto", "clean", "youtube", "filename", "tracklist", "nope", 3, null, ""]; +const SPLIT_AND = [undefined, "auto", "always", "never", "x", true, null]; + +function parseOptions(input) { + const o = {}; + if (chance(70)) o.mode = pick(MODES); + if (chance(30)) o.uploader = pick(["", "Noisia", "NoisiaVEVO", "Noisia - Topic", pick(ARTISTS), anyString(), input, 5, null]); + if (chance(30)) o.knownArtists = chance(30) && input ? [input.slice(0, below(input.length + 1))] : stringList(); + if (chance(30)) o.splitAnd = pick(SPLIT_AND); + if (chance(15)) o.keywords = keywords(); + for (const key of Object.keys(o)) if (o[key] === undefined) delete o[key]; + return o; +} + +function formatOptions() { + const o = {}; + if (chance(50)) o.feat = pick(["source", "artist", "title", "omit", "nope", null, 1]); + if (chance(30)) o.featMarker = pick(["ft.", "feat.", "&", "", 5, null, anyString()]); + if (chance(40)) o.joiners = pick(["original", "canonical", "x", null]); + if (chance(40)) o.versions = pick(["all", "none", "x", null]); + if (chance(30)) o.producers = pick([true, false, 0, 1, "no", null]); + if (chance(40)) o.position = pick([true, false, 1, 0, "yes", null]); + return o; +} + +// Tracklists: the fragments of the property tests, and realistic timed lists. +const LIST_FRAGMENTS = [ + "\n", "\r\n", "\r", "\n\r", " ", "
", "\u0085", " ", " ", "\t", " ", "00:00", + "0:00 ", "04:37 ", "1:02:03 ", "01:02:03.5 ", "125:30 ", "12:34,250", "1:75 ", "0:61:00 ", "1:2", + "[", "]", "(", ")", "[00:10] ", "(1:00)", " - ", " – ", "-", "|", ".", ":", "=> ", "==>", "1 ", + "2 ", "01. ", "3) ", "Artist", "Title", "Noisia - Stigma", "Intro", "interview", "Tracklist:", + "Part 2", "https://x.y", "www.", "_-_", "Ab-Cd", "ID", "(VIP)", "**", "*", "__", "_", "***", + "* ", "- ", "• ", "**[", "]**", "w/ ", "W/", "​", "𝄞", "🎵", "é", "Кино", "a", "7", "\u0000", + '"', "\\", +]; +const noisyText = () => times(below(41), () => pick(LIST_FRAGMENTS)).join(""); + +const pad = (n, w = 2) => String(n).padStart(w, "0"); +function writeTime(style, seconds, frac) { + const h = Math.floor(seconds / 3600), m = Math.floor((seconds % 3600) / 60), s = seconds % 60; + switch (style) { + case 0: return `${Math.floor(seconds / 60)}:${pad(s)}`; + case 1: return `${pad(Math.floor(seconds / 60))}:${pad(s)}`; + case 2: return `${h}:${pad(m)}:${pad(s)}`; + case 3: return `${pad(h)}:${pad(m)}:${pad(s)}`; + case 4: return `${pad(Math.floor(seconds / 60))}:${pad(s)}.${frac % 10}`; + default: return `${Math.floor(seconds / 60)}:${pad(s)},${pad(frac, 3)}`; + } +} + +function listLine(clock) { + if (below(7) === 0) return pick(["", "Tracklist:", "a note", "https://example.com", "Part 2", "ID - ID", noisyString()]); + const seconds = chance(80) ? clock : below(4 * 3600); + const t = writeTime(below(6), seconds, below(1000)); + const gap = pick([" ", " ", " - ", " | ", " => ", ". ", "\t"]); + const rest = chance(70) ? trackString() : pick(["Intro", "Paperclip interview", "", "w/ " + trackString(), `**${trackString()}**`]); + const lead = pick(["", "", " ", "[", "**", "- ", "• ", `${1 + below(40)}. `]); + if (lead === "[") return `[${t}]${gap}${rest}`; + if (lead === "**") return `**${t}**${gap}${rest}`; + return `${lead}${t}${gap}${rest}`; +} + +function timedList() { + const eol = pick(["\n", "\r\n", "\r"]); + let clock = below(300); + const lines = times(1 + below(30), () => { + clock += chance(5) ? -below(600) : below(400); + if (clock < 0) clock = 0; + return listLine(clock); + }); + return lines.join(eol) + (chance(50) ? eol : ""); +} + +const anyText = () => (chance(70) ? timedList() : noisyText()); + +function tracklistOptions() { + const o = {}; + if (chance(30)) o.mode = pick(MODES); + if (chance(20)) o.knownArtists = stringList(); + if (chance(20)) o.splitAnd = pick(SPLIT_AND); + if (chance(10)) o.keywords = keywords(); + if (chance(30)) o.audioSeconds = pick([0, 600, 3600, 7200, -1, 1.5, Infinity, "600", null, true]); + if (chance(20)) o.markerWords = chance(80) ? times(below(3), () => pick(["Break", "ID", "Intro", "", " ", "x"])) : stringList(); + for (const key of Object.keys(o)) if (o[key] === undefined) delete o[key]; + return o; +} + +const FIELD_VALUES = [ + -3, 0, 1, 2, 5, 15, 1.5, -0.25, 1e300, -1e300, Infinity, -Infinity, null, true, false, "x", "", + [1, 2], {}, 9007199254740993, 359999.5, 3600, 86400, "3", +]; +const OPS = ["set-time", "shift", "sort-by-time", "set-rest", "insert", "delete", "x"]; +const EDIT_TEXTS = ["a\nb", "c\rd", "00:10 New - Line", "w/ x", "", "**00:05** A - B", "1:00:00 X - Y"]; + +function edits(lineCount) { + const line = () => (chance(70) ? 1 + below(lineCount + 1) : pick(FIELD_VALUES)); + return times(below(7), () => { + if (chance(5)) return pick([null, 5, "shift", [], {}]); + const op = chance(95) ? pick(OPS) : pick(ODD); + const e = { op }; + if (chance(70)) e.line = line(); + if (chance(70)) e.seconds = chance(70) ? below(20000) - 5000 + pick([0, 0, 0.5, 0.25, 0.125]) : pick(FIELD_VALUES); + if (chance(30)) e.from = line(); + if (chance(40)) e.after = chance(80) ? below(lineCount + 2) : pick(FIELD_VALUES); + if (chance(20)) e.lines = chance(80) ? times(below(4), line) : pick(FIELD_VALUES); + if (chance(50)) e.rest = chance(80) ? pick([...EDIT_TEXTS, trackString()]) : pick(FIELD_VALUES); + if (chance(50)) e.text = chance(80) ? pick([...EDIT_TEXTS, listLine(below(3600))]) : pick(FIELD_VALUES); + return e; + }); +} + +const empty = { options: {}, formatOptions: {}, edits: [] }; +const SINGLE_FNS = ["parse", "parse", "parse", "parse", "parseArtists", "format", "normalize"]; + +/** The k-th case of the run, generated in order so that a seed fixes every case. */ +function* generate() { + let i = 0; + for (let k = 0; k < nTracks; k++) { + const fn = pick(SINGLE_FNS); + const input = anyString(); + const c = { ...empty, i: i++, fn, input }; + if (fn !== "normalize") c.options = parseOptions(input); + if (fn === "format") c.formatOptions = formatOptions(); + yield c; + } + for (let k = 0; k < nLists; k++) { + const input = anyText(); + const options = tracklistOptions(); + yield { ...empty, i: i++, fn: "parseTracklist", input, options }; + const lineCount = input.split(/\r\n|\r|\n/).length; + yield { ...empty, i: i++, fn: "applyEdits", input, options, edits: edits(lineCount) }; + } +} + +// --------------------------------------------------------------------------------------------- +// Ports + +function buildGo() { + const dir = mkdtempSync(join(tmpdir(), "trackparse-fuzz-")); + const bin = join(dir, "dump"); + execFileSync("go", ["build", "-tags", "trackparse_wire", "-o", bin, "./internal/cmd/dump"], { + cwd: join(root, "go"), + stdio: "inherit", + }); + return runLines("Go", bin, [], root); +} + +function buildRust() { + execFileSync("cargo", ["build", "--quiet", "--release", "--example", "dump"], { cwd: join(root, "rust"), stdio: "inherit" }); + return runLines("Rust", join(root, "rust", "target", "release", "examples", "dump"), [], root); +} + +const ports = [ + { name: "Python", key: "py", build: () => runPython }, + { name: "Rust", key: "rs", build: buildRust }, + { name: "Go", key: "go", build: buildGo }, +].filter((p) => !only || p.name.toLowerCase() === only); +if (ports.length === 0) { + console.error(`unknown port ${only}: use --only=python, --only=rust or --only=go`); + process.exit(2); +} +for (const port of ports) port.run = port.build(); + +const stats = new Map(ports.map((p) => [p.name, { byFn: {}, diffs: [] }])); +const out = []; +const started = Date.now(); +let batch = []; +let done = 0; + +async function flush() { + if (batch.length === 0) return; + const jsResults = batch.map(runJs); + for (const port of ports) { + const other = await port.run(batch); + const s = stats.get(port.name); + batch.forEach((c, k) => { + const j = jsResults[k]; + const p = other.get(c.i); + s.byFn[c.fn] ??= { total: 0, differ: 0 }; + s.byFn[c.fn].total++; + if (comparable(j) === comparable(p)) return; + s.byFn[c.fn].differ++; + const detail = describeDiff(port, j, p); + if (s.diffs.length < MAX_SHOWN) s.diffs.push({ c, detail }); + if (outFile) out.push(JSON.stringify({ port: port.key, case: c, js: j, [port.key]: p ?? null, detail })); + }); + } + done += batch.length; + const differing = [...stats.values()].reduce((n, s) => n + Object.values(s.byFn).reduce((m, f) => m + f.differ, 0), 0); + process.stderr.write(`\r${done} cases, ${differing} differences, ${Math.round((Date.now() - started) / 1000)} s`); + batch = []; +} + +for (const c of generate()) { + batch.push(c); + if (batch.length >= batchSize) await flush(); +} +await flush(); +process.stderr.write("\n"); + +let total = 0; +console.log(`seed ${seed}: ${nTracks} single-track cases, ${nLists} tracklists (parseTracklist + applyEdits)`); +for (const port of ports) { + const s = stats.get(port.name); + console.log(`JS dist vs ${port.name}`); + let differ = 0; + for (const [fn, f] of Object.entries(s.byFn)) { + console.log(` ${fn.padEnd(15)} ${f.total - f.differ}/${f.total} identical`); + differ += f.differ; + } + console.log(`differences: ${differ}`); + for (const { c, detail } of s.diffs) { + console.log(`\n- [${c.fn}] ${JSON.stringify(c.input)} options=${JSON.stringify(c.options)}`); + if (c.fn === "format") console.log(` formatOptions=${JSON.stringify(c.formatOptions)}`); + if (c.fn === "applyEdits") console.log(` edits=${JSON.stringify(c.edits)}`); + console.log(` ${detail}`); + } + total += differ; +} +if (outFile) writeFileSync(outFile, out.length ? `${out.join("\n")}\n` : ""); +process.exit(total ? 1 : 0); diff --git a/scripts/lib/ports.mjs b/scripts/lib/ports.mjs new file mode 100644 index 0000000..fc5da9c --- /dev/null +++ b/scripts/lib/ports.mjs @@ -0,0 +1,156 @@ +// Shared by scripts/compare-ports.mjs and scripts/fuzz-ports.mjs: how each port runs a list of +// cases and how full outputs are compared. +// +// A case is { i, fn, input, options, formatOptions, edits } with the spec's camelCase option +// names (fn is parse, parseArtists, format, normalize, parseTracklist or applyEdits). Each +// runner resolves to a Map from i to { ok: } or { error: }. +// +// JS is the reference and runs in this process from js/dist. Python gets one process per call +// (scripts/dump_py.py, JSONL over stdin/stdout). Rust and Go read one case per line and write +// one JSON result per line, in order (rust/examples/dump.rs, go/internal/cmd/dump). + +import { spawn } from "node:child_process"; +import { existsSync } from "node:fs"; +import { dirname, join, relative, resolve } from "node:path"; +import { fileURLToPath, pathToFileURL } from "node:url"; + +export const root = resolve(dirname(fileURLToPath(import.meta.url)), "..", ".."); + +const distEntry = join(root, "js", "dist", "index.js"); +const distTracklist = join(root, "js", "dist", "tracklist.js"); +for (const entry of [distEntry, distTracklist]) { + if (!existsSync(entry)) { + console.error(`missing ${relative(root, entry)}: run \`pnpm --filter trackparse build\` first`); + process.exit(2); + } +} +const js = await import(pathToFileURL(distEntry).href); +const jsTracklist = await import(pathToFileURL(distTracklist).href); + +/** One case through the built JS package. */ +export function runJs(c) { + try { + switch (c.fn) { + case "parse": + return { ok: js.parse(c.input, c.options) }; + case "parseArtists": + return { ok: js.parseArtists(c.input, c.options) }; + case "format": + return { ok: js.format(js.parse(c.input, c.options), c.formatOptions) }; + case "normalize": + return { ok: js.normalize(c.input) }; + case "parseTracklist": + return { ok: jsTracklist.parseTracklist(c.input, c.options) }; + case "applyEdits": + return { ok: jsTracklist.applyEdits(c.input, c.edits, c.options) }; + } + } catch (err) { + return { error: `${err?.name ?? "Error"}: ${err?.message ?? String(err)}` }; + } + throw new Error(`unknown fn ${c.fn}`); +} + +/** Every case through the Python port, in one process. */ +export function runPython(all) { + return new Promise((resolvePy, reject) => { + const child = spawn("uv", ["run", "--project", "python", "python", "scripts/dump_py.py"], { + cwd: root, + stdio: ["pipe", "pipe", "inherit"], + }); + const chunks = []; + child.stdout.on("data", (chunk) => chunks.push(chunk)); + child.on("error", reject); + child.on("close", (code) => { + if (code !== 0) return reject(new Error(`dump_py.py exited with code ${code}`)); + const byIndex = new Map(); + for (const line of Buffer.concat(chunks).toString("utf8").split("\n")) { + if (!line.trim()) continue; + const rec = JSON.parse(line); + byIndex.set(rec.i, rec); + } + resolvePy(byIndex); + }); + child.stdin.on("error", reject); + for (const c of all) { + const { i, fn, input, options, formatOptions, edits } = c; + // Edits keep non-JSON numbers (fixtures write infinity as 1e999) via a tagged string. + const line = JSON.stringify({ i, fn, input, options, formatOptions, edits }, (_k, v) => + typeof v === "number" && !Number.isFinite(v) ? { $number: String(v) } : v, + ); + child.stdin.write(`${line}\n`); + } + child.stdin.end(); + }); +} + +/** + * A port that reads one case per line and writes one JSON result per line, in order (Rust and + * Go). Such ports never throw: every line is a result. + */ +export function runLines(name, command, args, cwd) { + return (all) => + new Promise((resolveRun, reject) => { + const child = spawn(command, args, { cwd, stdio: ["pipe", "pipe", "inherit"] }); + const chunks = []; + child.stdout.on("data", (chunk) => chunks.push(chunk)); + child.on("error", reject); + child.on("close", (code) => { + if (code !== 0) return reject(new Error(`the ${name} dump exited with code ${code}`)); + const lines = Buffer.concat(chunks).toString("utf8").split("\n"); + const byIndex = new Map(); + all.forEach((c, k) => byIndex.set(c.i, lines[k] ? { ok: JSON.parse(lines[k]) } : undefined)); + resolveRun(byIndex); + }); + child.stdin.on("error", reject); + for (const c of all) { + const { fn, input, options, formatOptions, edits } = c; + // Non-finite numbers travel as 1e999 / -1e999, which both JSON readers take as infinity. + const line = JSON.stringify({ fn, input, options, formatOptions, edits }, (_k, v) => + typeof v === "number" && !Number.isFinite(v) ? `\u0000num:${v}` : v, + ) + .replaceAll('"\\u0000num:Infinity"', "1e999") + .replaceAll('"\\u0000num:-Infinity"', "-1e999"); + child.stdin.write(`${line}\n`); + } + child.stdin.end(); + }); +} + +/** JSON with object keys sorted recursively, so key order never counts as a difference. */ +export function canonical(value) { + return JSON.stringify(value, (_key, v) => + v && typeof v === "object" && !Array.isArray(v) + ? Object.fromEntries(Object.keys(v).sort().map((k) => [k, v[k]])) + : v, + ); +} + +/** Canonical form of a result: outputs compare by value, failures only by the fact they threw. */ +export function comparable(rec) { + if (!rec) return ""; + if ("error" in rec) return ""; + return canonical(rec.ok === undefined ? null : rec.ok); +} + +/** First differing path between two JSON values, for a compact report. */ +export function firstDiff(a, b, path = "$") { + if (canonical(a) === canonical(b)) return null; + if (a && b && typeof a === "object" && typeof b === "object" && Array.isArray(a) === Array.isArray(b)) { + const keys = Array.isArray(a) + ? [...Array(Math.max(a.length, b.length)).keys()] + : [...new Set([...Object.keys(a), ...Object.keys(b)])].sort(); + for (const k of keys) { + const d = firstDiff(a[k], b[k], Array.isArray(a) ? `${path}[${k}]` : `${path}.${k}`); + if (d) return d; + } + } + const show = (v) => (v === undefined ? "" : canonical(v)); + return `${path}: js=${show(a)} py=${show(b)}`; +} + +/** A one-line description of how a port's result differs from the JS one. */ +export function describeDiff(port, j, p) { + if (!p) return `${port.name} produced no output`; + if (j.error || p.error) return `js ${j.error ?? "ok"} | ${port.key} ${p.error ?? "ok"}`; + return firstDiff(j.ok, p.ok).replace(" py=", ` ${port.key}=`); +} diff --git a/site/astro.config.mjs b/site/astro.config.mjs index db8cf65..ed4b4c2 100644 --- a/site/astro.config.mjs +++ b/site/astro.config.mjs @@ -20,7 +20,7 @@ export default defineConfig({ title: "trackparse", disable404Route: true, description: - "Turn messy track names into structured data: artists, features, remixes, versions and the noise around them. JavaScript, Python and Rust, one spec.", + "Turn messy track names into structured data: artists, features, remixes, versions and the noise around them. JavaScript, Python, Rust and Go, one spec.", logo: { light: "./src/assets/logo-light.svg", dark: "./src/assets/logo-dark.svg", replacesTitle: false }, favicon: "/favicon.svg", social: [ @@ -31,6 +31,14 @@ export default defineConfig({ customCss: ["./src/styles/custom.css"], components: { SocialIcons: "./src/components/SocialIcons.astro" }, head: [ + // With site data blocked, reading localStorage or sessionStorage throws, and Starlight's + // theme, tabs and sidebar scripts stop there. An in-memory store keeps them working for + // the visit. It runs before Starlight's own head scripts. + { + tag: "script", + content: + 'for(const n of["localStorage","sessionStorage"]){try{window[n].getItem("tp")}catch{const m=new Map();const s={getItem:k=>m.has(String(k))?m.get(String(k)):null,setItem:(k,v)=>{m.set(String(k),String(v))},removeItem:k=>{m.delete(String(k))},clear:()=>m.clear(),key:i=>[...m.keys()][i]??null,get length(){return m.size}};try{Object.defineProperty(window,n,{value:s,configurable:true})}catch{}}}', + }, { tag: "meta", attrs: { property: "og:image", content: "https://4matic.github.io/trackparse/og.png" } }, { tag: "meta", attrs: { property: "og:image:width", content: "1200" } }, { tag: "meta", attrs: { property: "og:image:height", content: "630" } }, diff --git a/site/src/components/Features.astro b/site/src/components/Features.astro index 4c661ce..f49f5fd 100644 --- a/site/src/components/Features.astro +++ b/site/src/components/Features.astro @@ -55,6 +55,16 @@ const { items } = Astro.props as { items: Item[] }; line-height: 1.6; color: var(--sl-color-gray-3); } + p :global(a) { + color: var(--sl-color-gray-2); + text-decoration: underline; + text-decoration-color: var(--tp-border-strong); + text-underline-offset: 0.2em; + } + p :global(a:hover) { + color: var(--sl-color-white); + text-decoration-color: var(--sl-color-accent); + } p :global(code) { font: 0.86em var(--sl-font-mono); color: var(--sl-color-gray-2); diff --git a/site/src/components/HeroDemo.astro b/site/src/components/HeroDemo.astro index 365805f..b9d3e37 100644 --- a/site/src/components/HeroDemo.astro +++ b/site/src/components/HeroDemo.astro @@ -48,7 +48,7 @@ const playground = `${base}/playground/`;
diff --git a/site/src/components/Install.astro b/site/src/components/Install.astro index 20540ba..d4c6920 100644 --- a/site/src/components/Install.astro +++ b/site/src/components/Install.astro @@ -1,5 +1,5 @@ --- -// One install line under the hero, switchable between npm, pip and cargo, with a copy button. +// One install line under the hero, switchable between npm, pip, cargo and go, with a copy button. // The switch shares its choice with the docs' language tabs and the playground (lib/lang.ts). import Check from "@lucide/astro/icons/check"; import Copy from "@lucide/astro/icons/copy"; @@ -9,6 +9,7 @@ const pms = [ { lang: "js", label: "npm" }, { lang: "py", label: "pip" }, { lang: "rs", label: "cargo" }, + { lang: "go", label: "go" }, ] as const; --- @@ -27,8 +28,9 @@ const pms = [

- Published on npm, PyPI and{" "} - crates.io. The Rust API docs are on docs.rs. + Published on npm, PyPI,{" "} + crates.io and the Go module proxy. The Rust API docs are on{" "} + docs.rs, the Go API docs on pkg.go.dev.

@@ -115,7 +117,7 @@ const pms = [ color: var(--sl-color-white); text-decoration-color: var(--sl-color-accent); } - /* Three package managers and a command don't fit one row on a phone: the switch gets its own. */ + /* Four package managers and a command don't fit one row on a phone: the switch gets its own. */ @media (max-width: 26rem) { .install { flex-wrap: wrap; diff --git a/site/src/components/Playground.astro b/site/src/components/Playground.astro index 4ad857a..2b5832d 100644 --- a/site/src/components/Playground.astro +++ b/site/src/components/Playground.astro @@ -189,6 +189,7 @@ const listExamples: { label: string; title: string; text: string }[] = [ +

@@ -277,6 +278,7 @@ const listExamples: { label: string; title: string; text: string }[] = [
               
               
               
+              
             
             
           
@@ -407,6 +409,10 @@ const listExamples: { label: string; title: string; text: string }[] = [
   .pg-doc {
     font-size: 0.78rem;
   }
+  /* Generated Go is indented with tabs, as gofmt writes it. */
+  .tp-code {
+    tab-size: 4;
+  }
   .pg-foot {
     display: flex;
     flex-wrap: wrap;
@@ -419,7 +425,8 @@ const listExamples: { label: string; title: string; text: string }[] = [
     background: var(--tp-code-bg);
     padding: 0.1em 0.35em;
     border-radius: 4px;
-    white-space: nowrap;
+    /* The go get line is longer than a phone is wide: it may break anywhere. */
+    overflow-wrap: anywhere;
   }
   .pg-install {
     display: flex;
@@ -750,6 +757,31 @@ const listExamples: { label: string; title: string; text: string }[] = [
   }
 
   // ---- Rust literals for the generated code -------------------------------------------------
+  /** Control, invisible and bidi characters, written as escapes in the generated literals. */
+  function invisible(cp: number): boolean {
+    return (
+      cp < 0x20 ||
+      (cp >= 0x7f && cp <= 0x9f) ||
+      cp === 0xad ||
+      cp === 0x34f ||
+      cp === 0x61c ||
+      cp === 0x180e ||
+      (cp >= 0x200b && cp <= 0x200f) ||
+      (cp >= 0x2028 && cp <= 0x202e) ||
+      (cp >= 0x2060 && cp <= 0x206f) ||
+      cp === 0xfeff ||
+      (cp >= 0xfff9 && cp <= 0xfffb)
+    );
+  }
+  /** A JavaScript or Python string literal: JSON, plus `\uXXXX` for invisible characters. */
+  function jsStr(s: string): string {
+    let out = "";
+    for (const ch of JSON.stringify(s)) {
+      const cp = ch.codePointAt(0)!;
+      out += cp >= 0x7f && invisible(cp) ? `\\u${cp.toString(16).padStart(4, "0")}` : ch;
+    }
+    return out;
+  }
   /** A Rust string literal. Control, invisible and bidi characters are written as `\u{…}`. */
   function rsStr(s: string): string {
     let out = '"';
@@ -761,7 +793,7 @@ const listExamples: { label: string; title: string; text: string }[] = [
       else if (ch === "\t") out += "\\t";
       // A lone surrogate cannot be in a Rust string: U+FFFD, as a lossy conversion would give.
       else if (cp >= 0xd800 && cp <= 0xdfff) out += "\\u{fffd}";
-      else if (cp < 0x20 || (cp >= 0x7f && cp <= 0x9f) || (cp >= 0x200b && cp <= 0x200f) || (cp >= 0x2028 && cp <= 0x202e) || (cp >= 0x2066 && cp <= 0x2069) || cp === 0xfeff)
+      else if (invisible(cp))
         out += `\\u{${cp.toString(16)}}`;
       else out += ch;
     }
@@ -779,7 +811,85 @@ const listExamples: { label: string; title: string; text: string }[] = [
   function rsUse(path: string, names: string[]): string {
     const lower = (n: string) => n[0] === n[0].toLowerCase();
     const sorted = [...names.filter(lower).sort(), ...names.filter((n) => !lower(n)).sort()];
-    return `use ${path}::${sorted.length === 1 ? sorted[0] : `{${sorted.join(", ")}}`};`;
+    const line = `use ${path}::${sorted.length === 1 ? sorted[0] : `{${sorted.join(", ")}}`};`;
+    if (line.length <= 100) return line;
+    // Too long: the names fill lines of at most 100 columns inside braces.
+    const rows: string[] = [];
+    for (const n of sorted) {
+      const last = rows.length - 1;
+      if (last >= 0 && `${rows[last]} ${n},`.length <= 100) rows[last] += ` ${n},`;
+      else rows.push(`    ${n},`);
+    }
+    return `use ${path}::{\n${rows.join("\n")}\n};`;
+  }
+  // rustfmt's main width rules, so the common programs come out as `cargo fmt` writes them.
+  /** Columns a line takes: wide characters (emoji, CJK) count two. */
+  function rsWidth(s: string): number {
+    let w = 0;
+    for (const ch of s) {
+      const cp = ch.codePointAt(0)!;
+      w += (cp >= 0x1100 && cp <= 0x115f) || (cp >= 0x2e80 && cp <= 0xa4cf) || (cp >= 0xac00 && cp <= 0xd7a3) || (cp >= 0xf900 && cp <= 0xfaff) || (cp >= 0xfe30 && cp <= 0xfe4f) || (cp >= 0xff00 && cp <= 0xff60) || (cp >= 0xffe0 && cp <= 0xffe6) || (cp >= 0x1f300 && cp <= 0x1faff) || cp >= 0x20000 ? 2 : 1;
+    }
+    return w;
+  }
+  /** `let x = Root::new().a().b();`: a chain wider than 60 columns gets one call per line. */
+  function rsChain(lhs: string, root: string, calls: string[], indent = "    "): string {
+    const chain = root + calls.join("");
+    if (calls.length < 2 || rsWidth(chain) <= 60) return `${lhs}${chain};`;
+    return `${lhs}${root}\n${calls.map((c) => `${indent}    ${c}`).join("\n")};`;
+  }
+  /** `let x = f(a, b);`: arguments wider than 60 columns go one per line, if each then fits. */
+  function rsCall(lhs: string, fn: string, args: string[], indent = "    "): string {
+    const flat = `${lhs}${fn}(${args.join(", ")});`;
+    const fits = args.every((a) => indent.length + 4 + rsWidth(a) + 1 <= 100);
+    if (rsWidth(args.join(", ")) <= 60 || !fits) return flat;
+    return `${lhs}${fn}(\n${args.map((a) => `${indent}    ${a},`).join("\n")}\n${indent});`;
+  }
+
+  // ---- Go literals for the generated code ---------------------------------------------------
+  /** A Go string literal. Control, invisible and bidi characters are written as escapes. */
+  function goStr(s: string): string {
+    let out = '"';
+    for (const ch of s) {
+      const cp = ch.codePointAt(0)!;
+      if (ch === '"' || ch === "\\") out += `\\${ch}`;
+      else if (ch === "\n") out += "\\n";
+      else if (ch === "\r") out += "\\r";
+      else if (ch === "\t") out += "\\t";
+      // A Go string cannot spell a lone surrogate: U+FFFD, as the module reads invalid UTF-8.
+      else if (cp >= 0xd800 && cp <= 0xdfff) out += "\\ufffd";
+      else if (invisible(cp))
+        out += `\\u${cp.toString(16).padStart(4, "0")}`;
+      else out += ch;
+    }
+    return `${out}"`;
+  }
+  /** A float64 constant: `45`, `7.5`, `1e+21`; `math.Inf(1)` and `math.NaN()` need the math import. */
+  function goNum(n: number): string {
+    if (!Number.isFinite(n)) return Number.isNaN(n) ? "math.NaN()" : n > 0 ? "math.Inf(1)" : "math.Inf(-1)";
+    return String(n);
+  }
+  /** A float64 value for trackparse.Ptr: `3600.0`, `7.5`, so the type parameter is float64, not int. */
+  function goFloat(n: number): string {
+    const s = goNum(n);
+    return /^-?\d+$/.test(s) ? `${s}.0` : s;
+  }
+  /** The exported constant of an option value: `youtube` → `ModeYouTube`, `never` → `SplitAndNever`. */
+  function goConst(prefix: string, v: unknown): string {
+    const name = String(v) === "youtube" ? "YouTube" : variant(v);
+    return `trackparse.${prefix}${name}`;
+  }
+  /** A struct literal as gofmt writes it: one line for one field, else one aligned field per line. */
+  function goStruct(type: string, fields: [string, string][], indent: string): string {
+    if (fields.length === 0) return `trackparse.${type}{}`;
+    if (fields.length === 1) return `trackparse.${type}{${fields[0][0]}: ${fields[0][1]}}`;
+    const w = Math.max(...fields.map(([k]) => k.length));
+    return `trackparse.${type}{\n${fields.map(([k, v]) => `${indent}\t${`${k}:`.padEnd(w + 2)}${v},`).join("\n")}\n${indent}}`;
+  }
+  /** A Go program around `body` (lines, one tab of indentation added). */
+  function goMain(body: string[], extra: string[] = []): string {
+    const std = ['"fmt"', ...extra].sort();
+    return `package main\n\nimport (\n${std.map((x) => `\t${x}`).join("\n")}\n\n\t"github.com/4matic/trackparse/go"\n)\n\nfunc main() {\n${body.map((l) => (l ? `\t${l}` : "")).join("\n")}\n}`;
   }
 
   function options(): ParseOptions {
@@ -793,7 +903,7 @@ const listExamples: { label: string; title: string; text: string }[] = [
   }
 
   function code(s: string, o: ParseOptions, f: Record): string {
-    const q = (v: string) => JSON.stringify(v);
+    const q = jsStr;
     if (lang === "js") {
       // JS literal: unquoted keys, spaces after commas and colons.
       const js = (v: unknown): string =>
@@ -801,7 +911,9 @@ const listExamples: { label: string; title: string; text: string }[] = [
           ? `[${v.map(js).join(", ")}]`
           : v && typeof v === "object"
             ? `{ ${Object.entries(v).map(([k, x]) => `${k}: ${js(x)}`).join(", ")} }`
-            : JSON.stringify(v);
+            : typeof v === "string"
+              ? jsStr(v)
+              : JSON.stringify(v);
       const opts = Object.keys(o).length ? `, ${js(o)}` : "";
       const fopts = Object.keys(f).length ? `, ${js(f)}` : "";
       return `import { parse, format } from "trackparse";\n\nconst track = parse(${q(s)}${opts});\nformat(track${fopts});`;
@@ -809,40 +921,61 @@ const listExamples: { label: string; title: string; text: string }[] = [
     if (lang === "rs") {
       // A whole program: options are builders, and the `_with` functions take them by reference.
       const names: string[] = [];
-      let popts = "";
-      if (o.mode) popts += `.mode(ModeOption::${variant(o.mode)})`;
-      if (o.knownArtists) popts += `.known_artists([${o.knownArtists.map(rsStr).join(", ")}])`;
-      if (o.uploader) popts += `.uploader(${rsStr(o.uploader)})`;
-      if (o.splitAnd) popts += `.split_and(SplitAnd::${variant(o.splitAnd)})`;
+      const popts: string[] = [];
+      if (o.mode) popts.push(`.mode(ModeOption::${variant(o.mode)})`);
+      if (o.knownArtists) popts.push(`.known_artists([${o.knownArtists.map(rsStr).join(", ")}])`);
+      if (o.uploader) popts.push(`.uploader(${rsStr(o.uploader)})`);
+      if (o.splitAnd) popts.push(`.split_and(SplitAnd::${variant(o.splitAnd)})`);
       if (o.mode) names.push("ModeOption");
       if (o.splitAnd) names.push("SplitAnd");
-      let fopts = "";
-      if (f.feat) fopts += `.feat(FeatPlacement::${variant(f.feat)})`;
-      if (f.joiners) fopts += `.joiners(JoinerStyle::${variant(f.joiners)})`;
-      if (f.versions) fopts += `.versions(VersionsOption::${variant(f.versions)})`;
+      const fopts: string[] = [];
+      if (f.feat) fopts.push(`.feat(FeatPlacement::${variant(f.feat)})`);
+      if (f.joiners) fopts.push(`.joiners(JoinerStyle::${variant(f.joiners)})`);
+      if (f.versions) fopts.push(`.versions(VersionsOption::${variant(f.versions)})`);
       if (f.feat) names.push("FeatPlacement");
       if (f.joiners) names.push("JoinerStyle");
       if (f.versions) names.push("VersionsOption");
       const body: string[] = [];
-      if (popts) {
+      if (popts.length) {
         names.push("parse_with", "ParseOptions");
-        body.push(`let options = ParseOptions::new()${popts};`, `let track = parse_with(${rsStr(s)}, &options);`);
+        body.push(rsChain("let options = ", "ParseOptions::new()", popts), rsCall("let track = ", "parse_with", [rsStr(s), "&options"]));
       } else {
         names.push("parse");
         body.push(`let track = parse(${rsStr(s)});`);
       }
-      if (fopts) {
+      if (fopts.length) {
         names.push("format_track_with", "FormatOptions");
-        body.push(`let format = FormatOptions::new()${fopts};`, 'println!("{}", format_track_with(&track, &format));');
+        body.push(rsChain("let format = ", "FormatOptions::new()", fopts), 'println!("{}", format_track_with(&track, &format));');
       } else {
         names.push("format_track");
         body.push('println!("{}", format_track(&track));');
       }
       return `${rsUse("trackparse", names)}\n\nfn main() {\n${body.map((l) => `    ${l}`).join("\n")}\n}`;
     }
+    if (lang === "go") {
+      // A whole program: options are structs whose zero value means the default.
+      const popts: [string, string][] = [];
+      if (o.mode) popts.push(["Mode", goConst("Mode", o.mode)]);
+      if (o.uploader) popts.push(["Uploader", goStr(o.uploader)]);
+      if (o.knownArtists) popts.push(["KnownArtists", `[]string{${o.knownArtists.map(goStr).join(", ")}}`]);
+      if (o.splitAnd) popts.push(["SplitAnd", goConst("SplitAnd", o.splitAnd)]);
+      const fopts: [string, string][] = [];
+      if (f.feat) fopts.push(["Feat", goConst("Feat", f.feat)]);
+      if (f.joiners) fopts.push(["Joiners", goConst("Joiners", f.joiners)]);
+      if (f.versions) fopts.push(["Versions", goConst("Versions", f.versions)]);
+      const body = [
+        popts.length
+          ? `track := trackparse.ParseWith(${goStr(s)}, ${goStruct("ParseOptions", popts, "\t")})`
+          : `track := trackparse.Parse(${goStr(s)})`,
+        fopts.length
+          ? `fmt.Println(trackparse.FormatWith(track, ${goStruct("FormatOptions", fopts, "\t")}))`
+          : "fmt.Println(trackparse.Format(track))",
+      ];
+      return goMain(body);
+    }
     const snake = (k: string) => k.replace(/[A-Z]/g, (c) => `_${c.toLowerCase()}`);
     const py = (v: unknown): string =>
-      Array.isArray(v) ? `[${v.map(py).join(", ")}]` : typeof v === "boolean" ? (v ? "True" : "False") : JSON.stringify(v);
+      Array.isArray(v) ? `[${v.map(py).join(", ")}]` : typeof v === "boolean" ? (v ? "True" : "False") : typeof v === "string" ? jsStr(v) : JSON.stringify(v);
     const kw = (obj: Record) =>
       Object.entries(obj).map(([k, v]) => `, ${snake(k)}=${py(v)}`).join("");
     return `from trackparse import format_track, parse\n\ntrack = parse(${q(s)}${kw(o as Record)})\nformat_track(track${kw(f)})`;
@@ -992,6 +1125,8 @@ const listExamples: { label: string; title: string; text: string }[] = [
     return `${h ? `${h}:` : ""}${String(m).padStart(h ? 2 : 1, "0")}:${String(sec).padStart(2, "0")}`;
   }
 
+  /** "Shift by": an empty or unreadable box is 0, in the button and in the generated code. */
+  const shiftSeconds = () => Number(($("tl-shift") as HTMLInputElement).value) || 0;
   const lineCount = () => tl.value.split(/\r\n|\r|\n/).length;
   /** "from line", kept between 1 and the last line. */
   function shiftFrom(): number {
@@ -1003,9 +1138,9 @@ const listExamples: { label: string; title: string; text: string }[] = [
   type View = "table" | "json" | "code";
   let view: View = "table";
 
-  /** JS / Python / Rust for the current text, options and edit inputs. */
+  /** JS / Python / Rust / Go for the current text, options and edit inputs. */
   function listCode(text: string, list: Tracklist): string {
-    const q = (v: string) => JSON.stringify(v);
+    const q = jsStr;
     const lines = text.split("\n");
     // Lists without CR line endings are written one line per row; anything else as one string.
     const literal = (indent: string, open: string, close: string) =>
@@ -1014,7 +1149,7 @@ const listExamples: { label: string; title: string; text: string }[] = [
         : `${open}\n${lines.map((l) => `${indent}${q(l)},`).join("\n")}\n${close}`;
     const { audioSeconds, knownArtists } = listOptions();
     const hasOptions = audioSeconds !== undefined || knownArtists !== undefined;
-    const seconds = Number(($("tl-shift") as HTMLInputElement).value) || 0;
+    const seconds = shiftSeconds();
     const from = shiftFrom();
     const fix = list.warnings.find((w) => w.suggestion)?.suggestion;
     if (lang === "js") {
@@ -1042,25 +1177,62 @@ const listExamples: { label: string; title: string; text: string }[] = [
       const t = joined ? "&text" : "text";
       const names = ["apply_edits", "Edit", hasOptions ? "parse_tracklist_with" : "parse_tracklist"];
       if (hasOptions) names.push("TracklistOptions");
-      let rsOpts = "";
-      if (audioSeconds !== undefined) rsOpts += `.audio_seconds(${rsNum(audioSeconds)})`;
-      if (knownArtists) rsOpts += `.known_artists([${knownArtists.map(rsStr).join(", ")}])`;
+      const rsOpts: string[] = [];
+      if (audioSeconds !== undefined) rsOpts.push(`.audio_seconds(${rsNum(audioSeconds)})`);
+      if (knownArtists) rsOpts.push(`.known_artists([${knownArtists.map(rsStr).join(", ")}])`);
+      // rustfmt keeps an array on one line when it is at most 60 columns wide.
+      const items = lines.map(rsStr);
+      const array = `[${items.join(", ")}]`;
       const body = [
-        joined ? `let text = [\n${lines.map((l) => `        ${rsStr(l)},`).join("\n")}\n    ]\n    .join("\\n");` : `let text = ${rsStr(text)};`,
+        !joined
+          ? `let text = ${rsStr(text)};`
+          : rsWidth(array) <= 60
+            ? `let text = ${array}.join("\\n");`
+            : `let text = [\n${items.map((l) => `        ${l},`).join("\n")}\n    ]\n    .join("\\n");`,
         "",
         hasOptions
-          ? `let options = TracklistOptions::new()${rsOpts};\n    let list = parse_tracklist_with(${t}, &options);`
+          ? `${rsChain("let options = ", "TracklistOptions::new()", rsOpts)}\n    let list = parse_tracklist_with(${t}, &options);`
           : `let list = parse_tracklist(${t});`,
-        'println!("{:#?}", list.entries);   // one entry per line',
-        'println!("{:#?}", list.warnings);  // the checks, with line numbers',
+        'println!("{:#?}", list.entries); // one entry per line',
+        'println!("{:#?}", list.warnings); // the checks, with line numbers',
         "",
         `let shifted = apply_edits(${t}, &[Edit::shift_from(${rsNum(seconds)}, ${from})]);`,
         `let sorted = apply_edits(${t}, &[Edit::sort_by_time()]);`,
       ];
-      if (fix) body.push(`let fixed = apply_edits(${t}, &[Edit::set_time(${fix.line}, ${rsNum(fix.seconds)})]);  // the suggested fix`);
+      if (fix) body.push(`let fixed = apply_edits(${t}, &[Edit::set_time(${fix.line}, ${rsNum(fix.seconds)})]); // the suggested fix`);
       body.push(`println!("{}\\n\\n{}${fix ? "\\n\\n{}" : ""}", shifted.text, sorted.text${fix ? ", fixed.text" : ""});`);
       return `${rsUse("trackparse::tracklist", names)}\n\nfn main() {\n${body.map((l) => (l ? `    ${l}` : "")).join("\n")}\n}`;
     }
+    if (lang === "go") {
+      // A whole program. A list without CR line endings is a slice of lines joined with "\n".
+      const joined = !(text.includes("\r") || lines.length < 2);
+      const opts: [string, string][] = [];
+      // AudioSeconds is a *float64: nil is unknown, a pointer to 0 an audio of length 0.
+      if (audioSeconds !== undefined) opts.push(["AudioSeconds", `trackparse.Ptr(${goFloat(audioSeconds)})`]);
+      if (knownArtists) opts.push(["KnownArtists", `[]string{${knownArtists.map(goStr).join(", ")}}`]);
+      const nums = [audioSeconds ?? 0, seconds, fix?.seconds ?? 0];
+      const extra = ['"encoding/json"', '"os"'];
+      if (joined) extra.push('"strings"');
+      if (nums.some((n) => !Number.isFinite(n))) extra.push('"math"');
+      const body = [
+        joined ? `text := strings.Join([]string{\n${lines.map((l) => `\t${goStr(l)},`).join("\n")}\n}, "\\n")` : `text := ${goStr(text)}`,
+        "",
+        hasOptions
+          ? `list := trackparse.ParseTracklistWith(text, ${goStruct("TracklistOptions", opts, "")})`
+          : "list := trackparse.ParseTracklist(text)",
+        "enc := json.NewEncoder(os.Stdout)",
+        'enc.SetIndent("", "  ")',
+        "enc.SetEscapeHTML(false)  // & < > as written, as JSON.stringify does",
+        "enc.Encode(list.Entries)  // one entry per line",
+        "enc.Encode(list.Warnings) // the checks, with line numbers",
+        "",
+        `shifted := trackparse.ApplyEdits(text, []trackparse.Edit{trackparse.ShiftFrom(${goNum(seconds)}, ${from})})`,
+        "sorted := trackparse.ApplyEdits(text, []trackparse.Edit{trackparse.SortByTime()})",
+      ];
+      if (fix) body.push(`fixed := trackparse.ApplyEdits(text, []trackparse.Edit{trackparse.SetTime(${fix.line}, ${goNum(fix.seconds)})}) // the suggested fix`);
+      body.push(`fmt.Print(shifted.Text, "\\n\\n", sorted.Text${fix ? ', "\\n\\n", fixed.Text' : ""}, "\\n")`);
+      return goMain(body.flatMap((l) => l.split("\n")), extra);
+    }
     const pyOpts =
       (audioSeconds !== undefined ? `, audio_seconds=${audioSeconds}` : "") +
       (knownArtists ? `, known_artists=[${knownArtists.map(q).join(", ")}]` : "");
@@ -1184,7 +1356,7 @@ const listExamples: { label: string; title: string; text: string }[] = [
   audio.addEventListener("input", renderList);
   tlKnown.addEventListener("input", renderList);
   $("tl-do-shift").addEventListener("click", () => {
-    const seconds = Number(($("tl-shift") as HTMLInputElement).value);
+    const seconds = shiftSeconds();
     const from = shiftFrom();
     edit([{ op: "shift", seconds, from }], `Shift ${seconds >= 0 ? "+" : ""}${seconds} s from line ${from}`);
   });
diff --git a/site/src/components/SocialIcons.astro b/site/src/components/SocialIcons.astro
index 6083b9d..2f83e00 100644
--- a/site/src/components/SocialIcons.astro
+++ b/site/src/components/SocialIcons.astro
@@ -1,7 +1,7 @@
 ---
-// Starlight's social links (GitHub, npm) plus the other two registries. PyPI has no built-in
-// Starlight icon: its mark is from Simple Icons (CC0 1.0). crates.io has no mark of its own in
-// either set, so it gets the Rust file icon Starlight ships.
+// Starlight's social links (GitHub, npm) plus the other three registries. PyPI has no built-in
+// Starlight icon: its mark is from Simple Icons (CC0 1.0). crates.io and pkg.go.dev have no mark
+// of their own in either set, so they get the Rust and Go file icons Starlight ships.
 import { Icon } from "@astrojs/starlight/components";
 import Default from "@astrojs/starlight/components/SocialIcons.astro";
 ---
@@ -15,6 +15,10 @@ import Default from "@astrojs/starlight/components/SocialIcons.astro";
   crates.io
   
 
+
+  pkg.go.dev
+  
+