Skip to content

Commit

Permalink
Bump to v0.5.0 with new segment function by nikvdp
Browse files Browse the repository at this point in the history
  • Loading branch information
nieldlr committed Mar 1, 2015
1 parent f393bcc commit 35b28b7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,16 @@ console.log(hanzi.getExamples('橄'));
definition: 'olivine (rock-forming mineral magnesium-iron silicate (Mg,Fe)2SiO4)/peridot' } ] ]
```

#### hanzi.segment(phrase); - NEW in v0.5.0

Returns an array of characters that are segmented based on a longest match lookup.

````javascript
console.log(hanzi.segment("我們都是陌生人。"));

[ '我們', '', '', '陌生人', '' ]
````

#### hanzi.getPinyin(character);

Returns all possible pinyin data for a character.
Expand Down Expand Up @@ -349,7 +359,9 @@ HanziJS is used in the following projects:

## Contributors

* [nieldlr (Author)](http://github.com/nieldlr)
* [djuretic](http://github.com/djuretic)
* [nikdvp](http://github.com/nikvdp)

## License

Expand Down
3 changes: 2 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ v0.3.3 - Added a function to retrieve character frequency data from Junda corpus
v0.3.4 - Update Junda Corpus Data
v0.4.0 - Added new function: getCharactersWithComponent
v0.4.1 - Bug fix to way the characterswithcomponent object was compiled.
v0.4.2 - Fix 耂 encoding error
v0.4.2 - Fix 耂 encoding error
v0.5.0 - Add Longest Match segment function thanks to nikdvp! Browserify builds now also function properly using brfs.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "hanzi",
"author": "Niel de la Rouviere",
"description": "HanziJS is a Chinese character and NLP module for Chinese language processing for Node.js",
"version": "0.4.2",
"version": "0.5.0",
"main": "index.js",
"browserify": { "transform": [ "brfs" ] },
"browser": {
Expand Down

0 comments on commit 35b28b7

Please sign in to comment.