Skip to content

Commit 5623495

Browse files
committed
chore(npm): update kuromojin
1 parent 415cf6e commit 5623495

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"textlint-tester": "^1.2.0"
4343
},
4444
"dependencies": {
45-
"kuromojin": "^1.0.2",
45+
"kuromojin": "^1.2.1",
4646
"sentence-splitter": "^2.0.0",
4747
"textlint-rule-helper": "^1.1.4",
4848
"textlint-util-to-string": "^1.1.0"

src/no-doubled-joshi.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,20 @@ function matchExceptionRule(tokens) {
4646
return false;
4747
}
4848
/*
49-
default options
49+
default options
5050
*/
5151
const defaultOptions = {
5252
min_interval: 1,
5353
strict: false
5454
};
5555

5656
/*
57-
1. Paragraph Node -> text
58-
2. text -> sentences
59-
3. tokenize sentence
60-
4. report error if found word that match the rule.
57+
1. Paragraph Node -> text
58+
2. text -> sentences
59+
3. tokenize sentence
60+
4. report error if found word that match the rule.
6161
62-
TODO: need abstraction
62+
TODO: need abstraction
6363
*/
6464
export default function (context, options = {}) {
6565
const helper = new RuleHelper(context);
@@ -94,13 +94,13 @@ export default function (context, options = {}) {
9494
});
9595
let joshiTokenSurfaceKeyMap = createSurfaceKeyMap(countableTokens);
9696
/*
97-
# Data Structure
97+
# Data Structure
9898
99-
joshiTokens = [tokenA, tokenB, tokenC, tokenD, tokenE, tokenF]
100-
joshiTokenSurfaceKeyMap = {
101-
"は:助詞.係助詞": [tokenA, tokenC, tokenE],
102-
"で:助詞.係助詞": [tokenB, tokenD, tokenF]
103-
}
99+
joshiTokens = [tokenA, tokenB, tokenC, tokenD, tokenE, tokenF]
100+
joshiTokenSurfaceKeyMap = {
101+
"は:助詞.係助詞": [tokenA, tokenC, tokenE],
102+
"で:助詞.係助詞": [tokenB, tokenD, tokenF]
103+
}
104104
*/
105105
Object.keys(joshiTokenSurfaceKeyMap).forEach(key => {
106106
const tokens = joshiTokenSurfaceKeyMap[key];

0 commit comments

Comments
 (0)