npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@kuzulabz/expo-kagome

v0.2.1

Published

A Japanese morphological analyzer

Readme

expo-kagome

A react native port of Kagome using the IPA dictionary.

Sizes

aar: 53MB
xcframework: 56.9MB
wasm: 15MB

To-do

  • [ ] support user dict
  • [ ] lower wasm file size

Install

Bun

bun add @kuzulabz/expo-kagome

Yarn

yarn add @kuzulabz/expo-kagome

Npm

npm install @kuzulabz/expo-kagome

Installation in bare React Native projects

For bare React Native projects, you must ensure that you have installed and configured the expo package before continuing.

Configure for iOS

Run npx pod-install after installing the npm package.

Usage

Full example

import { getTokens } from '@kuzulabz/expo-kagome';

const text = '私は日本語を勉強しています。';
const tokens = await getTokens(text);

Web

Web requires these extra steps:

Metro Config

Add config.resolver.assetExts.push('wasm'); to your metro config file.

Load WASM

import { initializeKagome, initializeKagomeAsync } from '@kuzulabz/expo-kagome';

// for example, in App.tsx
initializeKagome();

// or asyncronously
await initializeKagomeAsync();

API

Functions

getTokens(text: string): Promise<Token[]>

Basic tokenization

  • text: The text to be analyzed.
  • returns: Token[]

getAnalysis(text: string, mode: AnalyzeMode = 'normal'): Promise<Token[]>

Same as getTokens, but with an additional mode parameter.

getWakati(text: string): Promise<string[]>

Segmentation of text into words

  • text: The text to be segmented.
  • returns: string[]

getGraph(text: string, mode: AnalyzeMode = 'normal'): Promise<string>

Generate a graph of the tokenization process in Graphvis dot format.

  • text: The text to be analyzed.
  • mode: AnalyzeMode (default: normal)
  • returns: A Graphvis in dot format (string)

Types

Token

An object with the following properties:

  • word_id<number>: The ID of the token.
  • word_position<number>: The position of the token in the text.
  • word_type<string>: The word class.
  • base_form<string>: The base form of the token.
  • surface_form<string>: The surface form of the token.
  • reading<string>: The reading of the token.
  • features<string[]>: An array of features of the token. Each feature is a string.
  • pos<string[]>: The part of speech of the token.
  • pronunciation<string>: The pronunciation of the token.

AnalyzeMode

The mode of analysis. Can be one of the following:

  • normal
  • search
  • extend

For more information about these modes, refer to the Kagome documentation.

Contributing

Contributions are very welcome! Please refer to guidelines described in the contributing guide.