Skip to content

Commit 0aed334

Browse files
committed
switch demo sentence to something that tokenizes more correctly. fix Analyse button (which had been broken for a while)
1 parent b6b6736 commit 0aed334

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mecab-web/src/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function initStore() {
2121
enamdict: false,
2222
kanjidic2: false,
2323
},
24-
initialQuery: `太郎はこの本を二郎を見た女性に渡した
24+
initialQuery: `太郎はこの本を笑也を見た女性に渡した
2525
すもももももももものうち。`,
2626
parses: [],
2727
// chosenTerm: undefined,
@@ -509,6 +509,10 @@ const App = connect('languageTools,parses,initialQuery,termResults', actions)(
509509
const [query, setQuery] = useState(initialQuery);
510510

511511
function onSubmit(event) {
512+
if (!languageTools) {
513+
return;
514+
}
515+
const { mecabPipeline } = languageTools;
512516
event.preventDefault();
513517
const nodes = mecabPipeline.tokenize(query);
514518
addParse(nodes);

0 commit comments

Comments
 (0)