Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

729 B
Raw Blame
import { describe, expect, it } from "vitest";

import { spokenSeparator } from "./spoken-text";

describe("spokenSeparator", () => {
  // Kana falls in the same CJK range as Han, so it reaches the unspaced branch.
  it("runs CJK fragments together and spaces Latin words", () => {
    expect(spokenSeparator("あしたぎゅうにゅう", "それとたまご")).toBe("");
    expect(spokenSeparator("Book a room", "for Friday")).toBe(" ");
    expect(spokenSeparator("よやくして", "Friday のかいぎしつ")).toBe("");
    expect(spokenSeparator("Call Alex", "それからメール")).toBe("");
    expect(spokenSeparator("ends with space ", "next")).toBe("");
    expect(spokenSeparator("", "only")).toBe("");
  });
});