dart_jieba 0.1.0 copy "dart_jieba: ^0.1.0" to clipboard
dart_jieba: ^0.1.0 copied to clipboard

Pure Dart 中文分词 — Python jieba port with binary trie and delta-gzip compression.

example/dart_jieba_example.dart

import 'package:dart_jieba/dart_jieba.dart';

void main() async {
  final jieba = await JiebaSegmenter.load(dictPath: 'assets/dict.txt');

  print(jieba.cut('我们都是好孩子'));
  print(jieba.cut('他来到了网易杭研大厦'));
  print(jieba.cut('我来到北京清华大学'));
  print(jieba.cut('小明硕士毕业于中国科学院计算所'));
  print(jieba.cutForSearch('我爱北京天安门'));
  print(jieba.cut('我来到北京清华大学', cutAll: true));
}
1
likes
150
points
146
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Pure Dart 中文分词 — Python jieba port with binary trie and delta-gzip compression.

Repository (GitHub)
View/report issues

License

MIT (license)

More

Packages that depend on dart_jieba