natural 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +7 -0
- package/README.md +3 -3
- package/lib/natural/inflectors/present_verb_inflector.js +1 -0
- package/lib/natural/phonetics/double_metaphone.js +9 -4
- package/lib/natural/phonetics/metaphone.js +4 -0
- package/lib/natural/phonetics/soundex.js +11 -7
- package/lib/natural/stemmers/porter_stemmer.js +90 -62
- package/lib/natural/stemmers/porter_stemmer_pt.js +302 -0
- package/lib/natural/stemmers/stemmer_pt.js +65 -0
- package/lib/natural/stemmers/token.js +163 -0
- package/lib/natural/util/stopwords_pt.js +136 -0
- package/package.json +2 -2
- package/spec/double_metaphone_spec.js +10 -1
- package/spec/metaphone_spec.js +5 -0
- package/spec/porter_stemmer_pt_spec.js +50 -0
- package/spec/porter_stemmer_spec.js +45 -0
- package/spec/present_verb_inflector_spec.js +3 -0
- package/spec/soundex_spec.js +13 -9
- package/spec/stemmer_token_spec.js +161 -0
- package/spec/test_data/snowball_pt.txt +32016 -0
- package/coverage/coverage.json +0 -1
- package/coverage/lcov-report/index.html +0 -584
- package/coverage/lcov-report/io_spec/index.html +0 -350
- package/coverage/lcov-report/io_spec/tfidf_spec.js.html +0 -469
- package/coverage/lcov-report/lib/natural/analyzers/index.html +0 -350
- package/coverage/lcov-report/lib/natural/analyzers/sentence_analyzer.js.html +0 -850
- package/coverage/lcov-report/lib/natural/classifiers/bayes_classifier.js.html +0 -496
- package/coverage/lcov-report/lib/natural/classifiers/classifier.js.html +0 -823
- package/coverage/lcov-report/lib/natural/classifiers/index.html +0 -376
- package/coverage/lcov-report/lib/natural/classifiers/logistic_regression_classifier.js.html +0 -502
- package/coverage/lcov-report/lib/natural/distance/dice_coefficient.js.html +0 -529
- package/coverage/lcov-report/lib/natural/distance/index.html +0 -376
- package/coverage/lcov-report/lib/natural/distance/jaro-winkler_distance.js.html +0 -670
- package/coverage/lcov-report/lib/natural/distance/levenshtein_distance.js.html +0 -526
- package/coverage/lcov-report/lib/natural/index.html +0 -350
- package/coverage/lcov-report/lib/natural/index.js.html +0 -547
- package/coverage/lcov-report/lib/natural/inflectors/count_inflector.js.html +0 -484
- package/coverage/lcov-report/lib/natural/inflectors/form_set.js.html +0 -406
- package/coverage/lcov-report/lib/natural/inflectors/fr/count_inflector.js.html +0 -520
- package/coverage/lcov-report/lib/natural/inflectors/fr/index.html +0 -363
- package/coverage/lcov-report/lib/natural/inflectors/fr/noun_inflector.js.html +0 -1027
- package/coverage/lcov-report/lib/natural/inflectors/index.html +0 -402
- package/coverage/lcov-report/lib/natural/inflectors/ja/index.html +0 -350
- package/coverage/lcov-report/lib/natural/inflectors/ja/noun_inflector.js.html +0 -727
- package/coverage/lcov-report/lib/natural/inflectors/noun_inflector.js.html +0 -637
- package/coverage/lcov-report/lib/natural/inflectors/present_verb_inflector.js.html +0 -544
- package/coverage/lcov-report/lib/natural/inflectors/singular_plural_inflector.js.html +0 -649
- package/coverage/lcov-report/lib/natural/ngrams/index.html +0 -363
- package/coverage/lcov-report/lib/natural/ngrams/ngrams.js.html +0 -595
- package/coverage/lcov-report/lib/natural/ngrams/ngrams_zh.js.html +0 -571
- package/coverage/lcov-report/lib/natural/normalizers/index.html +0 -389
- package/coverage/lcov-report/lib/natural/normalizers/normalizer.js.html +0 -607
- package/coverage/lcov-report/lib/natural/normalizers/normalizer_ja.js.html +0 -2194
- package/coverage/lcov-report/lib/natural/normalizers/normalizer_no.js.html +0 -496
- package/coverage/lcov-report/lib/natural/normalizers/remove_diacritics.js.html +0 -685
- package/coverage/lcov-report/lib/natural/phonetics/dm_soundex.js.html +0 -1063
- package/coverage/lcov-report/lib/natural/phonetics/double_metaphone.js.html +0 -1840
- package/coverage/lcov-report/lib/natural/phonetics/index.html +0 -402
- package/coverage/lcov-report/lib/natural/phonetics/metaphone.js.html +0 -886
- package/coverage/lcov-report/lib/natural/phonetics/phonetic.js.html +0 -484
- package/coverage/lcov-report/lib/natural/phonetics/soundex.js.html +0 -562
- package/coverage/lcov-report/lib/natural/spellcheck/index.html +0 -350
- package/coverage/lcov-report/lib/natural/spellcheck/spellcheck.js.html +0 -562
- package/coverage/lcov-report/lib/natural/stemmers/index.html +0 -571
- package/coverage/lcov-report/lib/natural/stemmers/lancaster_rules.js.html +0 -2692
- package/coverage/lcov-report/lib/natural/stemmers/lancaster_stemmer.js.html +0 -544
- package/coverage/lcov-report/lib/natural/stemmers/porter_stemmer.js.html +0 -937
- package/coverage/lcov-report/lib/natural/stemmers/porter_stemmer_es.js.html +0 -985
- package/coverage/lcov-report/lib/natural/stemmers/porter_stemmer_fa.js.html +0 -418
- package/coverage/lcov-report/lib/natural/stemmers/porter_stemmer_fr.js.html +0 -1450
- package/coverage/lcov-report/lib/natural/stemmers/porter_stemmer_it.js.html +0 -1018
- package/coverage/lcov-report/lib/natural/stemmers/porter_stemmer_no.js.html +0 -784
- package/coverage/lcov-report/lib/natural/stemmers/porter_stemmer_ru.js.html +0 -775
- package/coverage/lcov-report/lib/natural/stemmers/stemmer.js.html +0 -505
- package/coverage/lcov-report/lib/natural/stemmers/stemmer_es.js.html +0 -496
- package/coverage/lcov-report/lib/natural/stemmers/stemmer_fa.js.html +0 -484
- package/coverage/lcov-report/lib/natural/stemmers/stemmer_fr.js.html +0 -496
- package/coverage/lcov-report/lib/natural/stemmers/stemmer_it.js.html +0 -427
- package/coverage/lcov-report/lib/natural/stemmers/stemmer_ja.js.html +0 -736
- package/coverage/lcov-report/lib/natural/stemmers/stemmer_no.js.html +0 -505
- package/coverage/lcov-report/lib/natural/stemmers/stemmer_pl.js.html +0 -496
- package/coverage/lcov-report/lib/natural/stemmers/stemmer_ru.js.html +0 -496
- package/coverage/lcov-report/lib/natural/tfidf/index.html +0 -350
- package/coverage/lcov-report/lib/natural/tfidf/tfidf.js.html +0 -904
- package/coverage/lcov-report/lib/natural/tokenizers/aggressive_tokenizer.js.html +0 -430
- package/coverage/lcov-report/lib/natural/tokenizers/aggressive_tokenizer_es.js.html +0 -430
- package/coverage/lcov-report/lib/natural/tokenizers/aggressive_tokenizer_fa.js.html +0 -466
- package/coverage/lcov-report/lib/natural/tokenizers/aggressive_tokenizer_fr.js.html +0 -430
- package/coverage/lcov-report/lib/natural/tokenizers/aggressive_tokenizer_it.js.html +0 -430
- package/coverage/lcov-report/lib/natural/tokenizers/aggressive_tokenizer_nl.js.html +0 -430
- package/coverage/lcov-report/lib/natural/tokenizers/aggressive_tokenizer_no.js.html +0 -439
- package/coverage/lcov-report/lib/natural/tokenizers/aggressive_tokenizer_pl.js.html +0 -457
- package/coverage/lcov-report/lib/natural/tokenizers/aggressive_tokenizer_pt.js.html +0 -442
- package/coverage/lcov-report/lib/natural/tokenizers/aggressive_tokenizer_ru.js.html +0 -457
- package/coverage/lcov-report/lib/natural/tokenizers/index.html +0 -519
- package/coverage/lcov-report/lib/natural/tokenizers/regexp_tokenizer.js.html +0 -580
- package/coverage/lcov-report/lib/natural/tokenizers/tokenizer.js.html +0 -475
- package/coverage/lcov-report/lib/natural/tokenizers/tokenizer_ja.js.html +0 -1153
- package/coverage/lcov-report/lib/natural/tokenizers/treebank_word_tokenizer.js.html +0 -544
- package/coverage/lcov-report/lib/natural/transliterators/ja/index.html +0 -350
- package/coverage/lcov-report/lib/natural/transliterators/ja/index.js.html +0 -2068
- package/coverage/lcov-report/lib/natural/trie/index.html +0 -350
- package/coverage/lcov-report/lib/natural/trie/trie.js.html +0 -1012
- package/coverage/lcov-report/lib/natural/util/bag.js.html +0 -472
- package/coverage/lcov-report/lib/natural/util/edge_weighted_digraph.js.html +0 -658
- package/coverage/lcov-report/lib/natural/util/index.html +0 -532
- package/coverage/lcov-report/lib/natural/util/longest_path_tree.js.html +0 -619
- package/coverage/lcov-report/lib/natural/util/shortest_path_tree.js.html +0 -622
- package/coverage/lcov-report/lib/natural/util/stopwords.js.html +0 -445
- package/coverage/lcov-report/lib/natural/util/stopwords_es.js.html +0 -430
- package/coverage/lcov-report/lib/natural/util/stopwords_fa.js.html +0 -436
- package/coverage/lcov-report/lib/natural/util/stopwords_fr.js.html +0 -904
- package/coverage/lcov-report/lib/natural/util/stopwords_it.js.html +0 -478
- package/coverage/lcov-report/lib/natural/util/stopwords_ja.js.html +0 -499
- package/coverage/lcov-report/lib/natural/util/stopwords_no.js.html +0 -445
- package/coverage/lcov-report/lib/natural/util/stopwords_pl.js.html +0 -508
- package/coverage/lcov-report/lib/natural/util/stopwords_ru.js.html +0 -445
- package/coverage/lcov-report/lib/natural/util/topological.js.html +0 -616
- package/coverage/lcov-report/lib/natural/util/utils.js.html +0 -679
- package/coverage/lcov-report/lib/natural/wordnet/data_file.js.html +0 -580
- package/coverage/lcov-report/lib/natural/wordnet/index.html +0 -389
- package/coverage/lcov-report/lib/natural/wordnet/index_file.js.html +0 -742
- package/coverage/lcov-report/lib/natural/wordnet/wordnet.js.html +0 -829
- package/coverage/lcov-report/lib/natural/wordnet/wordnet_file.js.html +0 -529
- package/coverage/lcov-report/natural/analyzers/index.html +0 -350
- package/coverage/lcov-report/natural/analyzers/sentence_analyzer.js.html +0 -850
- package/coverage/lcov-report/natural/classifiers/bayes_classifier.js.html +0 -496
- package/coverage/lcov-report/natural/classifiers/classifier.js.html +0 -823
- package/coverage/lcov-report/natural/classifiers/index.html +0 -376
- package/coverage/lcov-report/natural/classifiers/logistic_regression_classifier.js.html +0 -502
- package/coverage/lcov-report/natural/distance/dice_coefficient.js.html +0 -529
- package/coverage/lcov-report/natural/distance/index.html +0 -376
- package/coverage/lcov-report/natural/distance/jaro-winkler_distance.js.html +0 -670
- package/coverage/lcov-report/natural/distance/levenshtein_distance.js.html +0 -526
- package/coverage/lcov-report/natural/index.html +0 -350
- package/coverage/lcov-report/natural/index.js.html +0 -433
- package/coverage/lcov-report/natural/inflectors/count_inflector.js.html +0 -484
- package/coverage/lcov-report/natural/inflectors/form_set.js.html +0 -406
- package/coverage/lcov-report/natural/inflectors/fr/index.html +0 -350
- package/coverage/lcov-report/natural/inflectors/fr/noun_inflector.js.html +0 -1027
- package/coverage/lcov-report/natural/inflectors/index.html +0 -402
- package/coverage/lcov-report/natural/inflectors/ja/index.html +0 -350
- package/coverage/lcov-report/natural/inflectors/ja/noun_inflector.js.html +0 -727
- package/coverage/lcov-report/natural/inflectors/noun_inflector.js.html +0 -637
- package/coverage/lcov-report/natural/inflectors/present_verb_inflector.js.html +0 -544
- package/coverage/lcov-report/natural/inflectors/singular_plural_inflector.js.html +0 -649
- package/coverage/lcov-report/natural/lib/natural/analyzers/index.html +0 -350
- package/coverage/lcov-report/natural/lib/natural/analyzers/sentence_analyzer.js.html +0 -850
- package/coverage/lcov-report/natural/lib/natural/classifiers/bayes_classifier.js.html +0 -496
- package/coverage/lcov-report/natural/lib/natural/classifiers/classifier.js.html +0 -823
- package/coverage/lcov-report/natural/lib/natural/classifiers/index.html +0 -376
- package/coverage/lcov-report/natural/lib/natural/classifiers/logistic_regression_classifier.js.html +0 -502
- package/coverage/lcov-report/natural/lib/natural/distance/dice_coefficient.js.html +0 -529
- package/coverage/lcov-report/natural/lib/natural/distance/index.html +0 -376
- package/coverage/lcov-report/natural/lib/natural/distance/jaro-winkler_distance.js.html +0 -670
- package/coverage/lcov-report/natural/lib/natural/distance/levenshtein_distance.js.html +0 -526
- package/coverage/lcov-report/natural/lib/natural/index.html +0 -350
- package/coverage/lcov-report/natural/lib/natural/index.js.html +0 -547
- package/coverage/lcov-report/natural/lib/natural/inflectors/count_inflector.js.html +0 -484
- package/coverage/lcov-report/natural/lib/natural/inflectors/form_set.js.html +0 -406
- package/coverage/lcov-report/natural/lib/natural/inflectors/fr/index.html +0 -350
- package/coverage/lcov-report/natural/lib/natural/inflectors/fr/noun_inflector.js.html +0 -1027
- package/coverage/lcov-report/natural/lib/natural/inflectors/index.html +0 -402
- package/coverage/lcov-report/natural/lib/natural/inflectors/ja/index.html +0 -350
- package/coverage/lcov-report/natural/lib/natural/inflectors/ja/noun_inflector.js.html +0 -727
- package/coverage/lcov-report/natural/lib/natural/inflectors/noun_inflector.js.html +0 -637
- package/coverage/lcov-report/natural/lib/natural/inflectors/present_verb_inflector.js.html +0 -544
- package/coverage/lcov-report/natural/lib/natural/inflectors/singular_plural_inflector.js.html +0 -649
- package/coverage/lcov-report/natural/lib/natural/ngrams/index.html +0 -363
- package/coverage/lcov-report/natural/lib/natural/ngrams/ngrams.js.html +0 -595
- package/coverage/lcov-report/natural/lib/natural/ngrams/ngrams_zh.js.html +0 -571
- package/coverage/lcov-report/natural/lib/natural/normalizers/index.html +0 -389
- package/coverage/lcov-report/natural/lib/natural/normalizers/normalizer.js.html +0 -607
- package/coverage/lcov-report/natural/lib/natural/normalizers/normalizer_ja.js.html +0 -2194
- package/coverage/lcov-report/natural/lib/natural/normalizers/normalizer_no.js.html +0 -496
- package/coverage/lcov-report/natural/lib/natural/normalizers/remove_diacritics.js.html +0 -685
- package/coverage/lcov-report/natural/lib/natural/phonetics/dm_soundex.js.html +0 -1063
- package/coverage/lcov-report/natural/lib/natural/phonetics/double_metaphone.js.html +0 -1840
- package/coverage/lcov-report/natural/lib/natural/phonetics/index.html +0 -402
- package/coverage/lcov-report/natural/lib/natural/phonetics/metaphone.js.html +0 -886
- package/coverage/lcov-report/natural/lib/natural/phonetics/phonetic.js.html +0 -484
- package/coverage/lcov-report/natural/lib/natural/phonetics/soundex.js.html +0 -562
- package/coverage/lcov-report/natural/lib/natural/stemmers/index.html +0 -571
- package/coverage/lcov-report/natural/lib/natural/stemmers/lancaster_rules.js.html +0 -2692
- package/coverage/lcov-report/natural/lib/natural/stemmers/lancaster_stemmer.js.html +0 -544
- package/coverage/lcov-report/natural/lib/natural/stemmers/porter_stemmer.js.html +0 -937
- package/coverage/lcov-report/natural/lib/natural/stemmers/porter_stemmer_es.js.html +0 -985
- package/coverage/lcov-report/natural/lib/natural/stemmers/porter_stemmer_fa.js.html +0 -418
- package/coverage/lcov-report/natural/lib/natural/stemmers/porter_stemmer_fr.js.html +0 -1450
- package/coverage/lcov-report/natural/lib/natural/stemmers/porter_stemmer_it.js.html +0 -1018
- package/coverage/lcov-report/natural/lib/natural/stemmers/porter_stemmer_no.js.html +0 -784
- package/coverage/lcov-report/natural/lib/natural/stemmers/porter_stemmer_ru.js.html +0 -775
- package/coverage/lcov-report/natural/lib/natural/stemmers/stemmer.js.html +0 -505
- package/coverage/lcov-report/natural/lib/natural/stemmers/stemmer_es.js.html +0 -496
- package/coverage/lcov-report/natural/lib/natural/stemmers/stemmer_fa.js.html +0 -484
- package/coverage/lcov-report/natural/lib/natural/stemmers/stemmer_fr.js.html +0 -496
- package/coverage/lcov-report/natural/lib/natural/stemmers/stemmer_it.js.html +0 -427
- package/coverage/lcov-report/natural/lib/natural/stemmers/stemmer_ja.js.html +0 -736
- package/coverage/lcov-report/natural/lib/natural/stemmers/stemmer_no.js.html +0 -505
- package/coverage/lcov-report/natural/lib/natural/stemmers/stemmer_pl.js.html +0 -496
- package/coverage/lcov-report/natural/lib/natural/stemmers/stemmer_ru.js.html +0 -496
- package/coverage/lcov-report/natural/lib/natural/tfidf/index.html +0 -350
- package/coverage/lcov-report/natural/lib/natural/tfidf/tfidf.js.html +0 -904
- package/coverage/lcov-report/natural/lib/natural/tokenizers/aggressive_tokenizer.js.html +0 -430
- package/coverage/lcov-report/natural/lib/natural/tokenizers/aggressive_tokenizer_es.js.html +0 -430
- package/coverage/lcov-report/natural/lib/natural/tokenizers/aggressive_tokenizer_fa.js.html +0 -466
- package/coverage/lcov-report/natural/lib/natural/tokenizers/aggressive_tokenizer_fr.js.html +0 -430
- package/coverage/lcov-report/natural/lib/natural/tokenizers/aggressive_tokenizer_it.js.html +0 -430
- package/coverage/lcov-report/natural/lib/natural/tokenizers/aggressive_tokenizer_nl.js.html +0 -430
- package/coverage/lcov-report/natural/lib/natural/tokenizers/aggressive_tokenizer_no.js.html +0 -439
- package/coverage/lcov-report/natural/lib/natural/tokenizers/aggressive_tokenizer_pl.js.html +0 -457
- package/coverage/lcov-report/natural/lib/natural/tokenizers/aggressive_tokenizer_pt.js.html +0 -442
- package/coverage/lcov-report/natural/lib/natural/tokenizers/aggressive_tokenizer_ru.js.html +0 -457
- package/coverage/lcov-report/natural/lib/natural/tokenizers/index.html +0 -519
- package/coverage/lcov-report/natural/lib/natural/tokenizers/regexp_tokenizer.js.html +0 -580
- package/coverage/lcov-report/natural/lib/natural/tokenizers/tokenizer.js.html +0 -475
- package/coverage/lcov-report/natural/lib/natural/tokenizers/tokenizer_ja.js.html +0 -1153
- package/coverage/lcov-report/natural/lib/natural/tokenizers/treebank_word_tokenizer.js.html +0 -544
- package/coverage/lcov-report/natural/lib/natural/transliterators/ja/index.html +0 -350
- package/coverage/lcov-report/natural/lib/natural/transliterators/ja/index.js.html +0 -2068
- package/coverage/lcov-report/natural/lib/natural/trie/index.html +0 -350
- package/coverage/lcov-report/natural/lib/natural/trie/trie.js.html +0 -1012
- package/coverage/lcov-report/natural/lib/natural/util/bag.js.html +0 -472
- package/coverage/lcov-report/natural/lib/natural/util/edge_weighted_digraph.js.html +0 -658
- package/coverage/lcov-report/natural/lib/natural/util/index.html +0 -532
- package/coverage/lcov-report/natural/lib/natural/util/longest_path_tree.js.html +0 -619
- package/coverage/lcov-report/natural/lib/natural/util/shortest_path_tree.js.html +0 -622
- package/coverage/lcov-report/natural/lib/natural/util/stopwords.js.html +0 -445
- package/coverage/lcov-report/natural/lib/natural/util/stopwords_es.js.html +0 -430
- package/coverage/lcov-report/natural/lib/natural/util/stopwords_fa.js.html +0 -436
- package/coverage/lcov-report/natural/lib/natural/util/stopwords_fr.js.html +0 -904
- package/coverage/lcov-report/natural/lib/natural/util/stopwords_it.js.html +0 -478
- package/coverage/lcov-report/natural/lib/natural/util/stopwords_ja.js.html +0 -499
- package/coverage/lcov-report/natural/lib/natural/util/stopwords_no.js.html +0 -445
- package/coverage/lcov-report/natural/lib/natural/util/stopwords_pl.js.html +0 -508
- package/coverage/lcov-report/natural/lib/natural/util/stopwords_ru.js.html +0 -445
- package/coverage/lcov-report/natural/lib/natural/util/topological.js.html +0 -616
- package/coverage/lcov-report/natural/lib/natural/util/utils.js.html +0 -679
- package/coverage/lcov-report/natural/lib/natural/wordnet/data_file.js.html +0 -580
- package/coverage/lcov-report/natural/lib/natural/wordnet/index.html +0 -389
- package/coverage/lcov-report/natural/lib/natural/wordnet/index_file.js.html +0 -742
- package/coverage/lcov-report/natural/lib/natural/wordnet/wordnet.js.html +0 -829
- package/coverage/lcov-report/natural/lib/natural/wordnet/wordnet_file.js.html +0 -529
- package/coverage/lcov-report/natural/ngrams/index.html +0 -363
- package/coverage/lcov-report/natural/ngrams/ngrams.js.html +0 -595
- package/coverage/lcov-report/natural/ngrams/ngrams_zh.js.html +0 -571
- package/coverage/lcov-report/natural/normalizers/index.html +0 -389
- package/coverage/lcov-report/natural/normalizers/normalizer.js.html +0 -607
- package/coverage/lcov-report/natural/normalizers/normalizer_ja.js.html +0 -2194
- package/coverage/lcov-report/natural/normalizers/normalizer_no.js.html +0 -496
- package/coverage/lcov-report/natural/normalizers/remove_diacritics.js.html +0 -685
- package/coverage/lcov-report/natural/phonetics/dm_soundex.js.html +0 -1063
- package/coverage/lcov-report/natural/phonetics/double_metaphone.js.html +0 -1840
- package/coverage/lcov-report/natural/phonetics/index.html +0 -402
- package/coverage/lcov-report/natural/phonetics/metaphone.js.html +0 -886
- package/coverage/lcov-report/natural/phonetics/phonetic.js.html +0 -484
- package/coverage/lcov-report/natural/phonetics/soundex.js.html +0 -562
- package/coverage/lcov-report/natural/stemmers/index.html +0 -571
- package/coverage/lcov-report/natural/stemmers/lancaster_rules.js.html +0 -2692
- package/coverage/lcov-report/natural/stemmers/lancaster_stemmer.js.html +0 -544
- package/coverage/lcov-report/natural/stemmers/porter_stemmer.js.html +0 -937
- package/coverage/lcov-report/natural/stemmers/porter_stemmer_es.js.html +0 -985
- package/coverage/lcov-report/natural/stemmers/porter_stemmer_fa.js.html +0 -418
- package/coverage/lcov-report/natural/stemmers/porter_stemmer_fr.js.html +0 -1450
- package/coverage/lcov-report/natural/stemmers/porter_stemmer_it.js.html +0 -1018
- package/coverage/lcov-report/natural/stemmers/porter_stemmer_no.js.html +0 -784
- package/coverage/lcov-report/natural/stemmers/porter_stemmer_ru.js.html +0 -775
- package/coverage/lcov-report/natural/stemmers/stemmer.js.html +0 -505
- package/coverage/lcov-report/natural/stemmers/stemmer_es.js.html +0 -496
- package/coverage/lcov-report/natural/stemmers/stemmer_fa.js.html +0 -484
- package/coverage/lcov-report/natural/stemmers/stemmer_fr.js.html +0 -496
- package/coverage/lcov-report/natural/stemmers/stemmer_it.js.html +0 -427
- package/coverage/lcov-report/natural/stemmers/stemmer_ja.js.html +0 -736
- package/coverage/lcov-report/natural/stemmers/stemmer_no.js.html +0 -505
- package/coverage/lcov-report/natural/stemmers/stemmer_pl.js.html +0 -496
- package/coverage/lcov-report/natural/stemmers/stemmer_ru.js.html +0 -496
- package/coverage/lcov-report/natural/tfidf/index.html +0 -350
- package/coverage/lcov-report/natural/tfidf/tfidf.js.html +0 -904
- package/coverage/lcov-report/natural/tokenizers/aggressive_tokenizer.js.html +0 -430
- package/coverage/lcov-report/natural/tokenizers/aggressive_tokenizer_es.js.html +0 -430
- package/coverage/lcov-report/natural/tokenizers/aggressive_tokenizer_fa.js.html +0 -466
- package/coverage/lcov-report/natural/tokenizers/aggressive_tokenizer_fr.js.html +0 -430
- package/coverage/lcov-report/natural/tokenizers/aggressive_tokenizer_it.js.html +0 -430
- package/coverage/lcov-report/natural/tokenizers/aggressive_tokenizer_nl.js.html +0 -430
- package/coverage/lcov-report/natural/tokenizers/aggressive_tokenizer_no.js.html +0 -439
- package/coverage/lcov-report/natural/tokenizers/aggressive_tokenizer_pl.js.html +0 -457
- package/coverage/lcov-report/natural/tokenizers/aggressive_tokenizer_pt.js.html +0 -442
- package/coverage/lcov-report/natural/tokenizers/aggressive_tokenizer_ru.js.html +0 -457
- package/coverage/lcov-report/natural/tokenizers/index.html +0 -519
- package/coverage/lcov-report/natural/tokenizers/regexp_tokenizer.js.html +0 -580
- package/coverage/lcov-report/natural/tokenizers/tokenizer.js.html +0 -475
- package/coverage/lcov-report/natural/tokenizers/tokenizer_ja.js.html +0 -1153
- package/coverage/lcov-report/natural/tokenizers/treebank_word_tokenizer.js.html +0 -544
- package/coverage/lcov-report/natural/transliterators/ja/index.html +0 -350
- package/coverage/lcov-report/natural/transliterators/ja/index.js.html +0 -2068
- package/coverage/lcov-report/natural/trie/index.html +0 -350
- package/coverage/lcov-report/natural/trie/trie.js.html +0 -1012
- package/coverage/lcov-report/natural/util/bag.js.html +0 -472
- package/coverage/lcov-report/natural/util/edge_weighted_digraph.js.html +0 -658
- package/coverage/lcov-report/natural/util/index.html +0 -532
- package/coverage/lcov-report/natural/util/longest_path_tree.js.html +0 -619
- package/coverage/lcov-report/natural/util/shortest_path_tree.js.html +0 -622
- package/coverage/lcov-report/natural/util/stopwords.js.html +0 -445
- package/coverage/lcov-report/natural/util/stopwords_es.js.html +0 -430
- package/coverage/lcov-report/natural/util/stopwords_fa.js.html +0 -436
- package/coverage/lcov-report/natural/util/stopwords_fr.js.html +0 -904
- package/coverage/lcov-report/natural/util/stopwords_it.js.html +0 -478
- package/coverage/lcov-report/natural/util/stopwords_ja.js.html +0 -499
- package/coverage/lcov-report/natural/util/stopwords_no.js.html +0 -445
- package/coverage/lcov-report/natural/util/stopwords_pl.js.html +0 -508
- package/coverage/lcov-report/natural/util/stopwords_ru.js.html +0 -445
- package/coverage/lcov-report/natural/util/topological.js.html +0 -616
- package/coverage/lcov-report/natural/util/utils.js.html +0 -679
- package/coverage/lcov-report/natural/wordnet/data_file.js.html +0 -580
- package/coverage/lcov-report/natural/wordnet/index.html +0 -389
- package/coverage/lcov-report/natural/wordnet/index_file.js.html +0 -742
- package/coverage/lcov-report/natural/wordnet/wordnet.js.html +0 -829
- package/coverage/lcov-report/natural/wordnet/wordnet_file.js.html +0 -529
- package/coverage/lcov-report/normalizers/index.html +0 -350
- package/coverage/lcov-report/normalizers/normalizer.js.html +0 -607
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -1
- package/coverage/lcov-report/spec/aggressive_tokenizer_es_spec.js.html +0 -430
- package/coverage/lcov-report/spec/aggressive_tokenizer_fr_spec.js.html +0 -625
- package/coverage/lcov-report/spec/aggressive_tokenizer_nl_spec.js.html +0 -430
- package/coverage/lcov-report/spec/aggressive_tokenizer_pt_spec.js.html +0 -490
- package/coverage/lcov-report/spec/aggressive_tokenizer_spec.js.html +0 -490
- package/coverage/lcov-report/spec/bayes_classifier_spec.js.html +0 -841
- package/coverage/lcov-report/spec/classifier_spec.js.html +0 -847
- package/coverage/lcov-report/spec/count_inflector_fr_spec.js.html +0 -454
- package/coverage/lcov-report/spec/count_inflector_spec.js.html +0 -538
- package/coverage/lcov-report/spec/dice_coefficient_spec.js.html +0 -400
- package/coverage/lcov-report/spec/double_metaphone_spec.js.html +0 -2548
- package/coverage/lcov-report/spec/index.html +0 -883
- package/coverage/lcov-report/spec/jaro-winkler_spec.js.html +0 -481
- package/coverage/lcov-report/spec/lancaster_stemmer_spec.js.html +0 -541
- package/coverage/lcov-report/spec/levenshtein_spec.js.html +0 -520
- package/coverage/lcov-report/spec/logistic_regression_classifier_spec.js.html +0 -688
- package/coverage/lcov-report/spec/longest_path_tree_spec.js.html +0 -628
- package/coverage/lcov-report/spec/metaphone_spec.js.html +0 -1063
- package/coverage/lcov-report/spec/ngram_spec.js.html +0 -712
- package/coverage/lcov-report/spec/ngram_zh_spec.js.html +0 -688
- package/coverage/lcov-report/spec/normalizer_ja_spec.js.html +0 -802
- package/coverage/lcov-report/spec/normalizer_no_spec.js.html +0 -655
- package/coverage/lcov-report/spec/normalizer_spec.js.html +0 -742
- package/coverage/lcov-report/spec/noun_inflector_fr_spec.js.html +0 -1750
- package/coverage/lcov-report/spec/noun_inflector_ja_spec.js.html +0 -658
- package/coverage/lcov-report/spec/noun_inflector_spec.js.html +0 -1132
- package/coverage/lcov-report/spec/porter_stemmer_fr_spec.js.html +0 -625
- package/coverage/lcov-report/spec/porter_stemmer_it_spec.js.html +0 -454
- package/coverage/lcov-report/spec/porter_stemmer_no_spec.js.html +0 -751
- package/coverage/lcov-report/spec/porter_stemmer_ru_spec.js.html +0 -511
- package/coverage/lcov-report/spec/porter_stemmer_spec.js.html +0 -733
- package/coverage/lcov-report/spec/present_verb_inflector_spec.js.html +0 -697
- package/coverage/lcov-report/spec/remove_diacritics_spec.js.html +0 -415
- package/coverage/lcov-report/spec/sentence_analyzer_spec.js.html +0 -1153
- package/coverage/lcov-report/spec/shortest_path_tree_spec.js.html +0 -718
- package/coverage/lcov-report/spec/soundex_spec.js.html +0 -784
- package/coverage/lcov-report/spec/spellcheck_spec.js.html +0 -598
- package/coverage/lcov-report/spec/stemmer_ja_spec.js.html +0 -520
- package/coverage/lcov-report/spec/tfidf_spec.js.html +0 -1288
- package/coverage/lcov-report/spec/tokenizer_ja_spec.js.html +0 -496
- package/coverage/lcov-report/spec/transliterator_ja_spec.js.html +0 -631
- package/coverage/lcov-report/spec/treebank_word_tokenizer_spec.js.html +0 -430
- package/coverage/lcov-report/spec/trie_spec.js.html +0 -940
- package/coverage/lcov-report/util/index.html +0 -350
- package/coverage/lcov-report/util/utils.js.html +0 -679
- package/coverage/lcov.info +0 -11094
- package/lib/natural/parsers/Agenda.js +0 -68
- package/lib/natural/parsers/CYKParser.js +0 -87
- package/lib/natural/parsers/CYK_Item.js +0 -159
- package/lib/natural/parsers/Chart.js +0 -211
- package/lib/natural/parsers/ChartParser.js +0 -60
- package/lib/natural/parsers/DoubleDottedItem.js +0 -226
- package/lib/natural/parsers/EarleyItem.js +0 -155
- package/lib/natural/parsers/EarleyParser.js +0 -58
- package/lib/natural/parsers/FunctionWordTagger.js +0 -84
- package/lib/natural/parsers/GoalItem.js +0 -206
- package/lib/natural/parsers/GrammarParser.js +0 -1289
- package/lib/natural/parsers/HeadCornerParser.js +0 -101
- package/lib/natural/parsers/LeftCornerParser.js +0 -58
- package/lib/natural/parsers/PEG-grammar-for-unification-grammar.txt +0 -345
|
@@ -1,1153 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<title>Code coverage report for natural/lib/natural/tokenizers/tokenizer_ja.js</title>
|
|
5
|
-
<meta charset="utf-8">
|
|
6
|
-
|
|
7
|
-
<link rel="stylesheet" href="../../../../prettify.css">
|
|
8
|
-
|
|
9
|
-
<style>
|
|
10
|
-
body, html {
|
|
11
|
-
margin:0; padding: 0;
|
|
12
|
-
}
|
|
13
|
-
body {
|
|
14
|
-
font-family: Helvetica Neue, Helvetica,Arial;
|
|
15
|
-
font-size: 10pt;
|
|
16
|
-
}
|
|
17
|
-
div.header, div.footer {
|
|
18
|
-
background: #eee;
|
|
19
|
-
padding: 1em;
|
|
20
|
-
}
|
|
21
|
-
div.header {
|
|
22
|
-
z-index: 100;
|
|
23
|
-
position: fixed;
|
|
24
|
-
top: 0;
|
|
25
|
-
border-bottom: 1px solid #666;
|
|
26
|
-
width: 100%;
|
|
27
|
-
}
|
|
28
|
-
div.footer {
|
|
29
|
-
border-top: 1px solid #666;
|
|
30
|
-
}
|
|
31
|
-
div.body {
|
|
32
|
-
margin-top: 10em;
|
|
33
|
-
}
|
|
34
|
-
div.meta {
|
|
35
|
-
font-size: 90%;
|
|
36
|
-
text-align: center;
|
|
37
|
-
}
|
|
38
|
-
h1, h2, h3 {
|
|
39
|
-
font-weight: normal;
|
|
40
|
-
}
|
|
41
|
-
h1 {
|
|
42
|
-
font-size: 12pt;
|
|
43
|
-
}
|
|
44
|
-
h2 {
|
|
45
|
-
font-size: 10pt;
|
|
46
|
-
}
|
|
47
|
-
pre {
|
|
48
|
-
font-family: Consolas, Menlo, Monaco, monospace;
|
|
49
|
-
margin: 0;
|
|
50
|
-
padding: 0;
|
|
51
|
-
line-height: 14px;
|
|
52
|
-
font-size: 14px;
|
|
53
|
-
-moz-tab-size: 2;
|
|
54
|
-
-o-tab-size: 2;
|
|
55
|
-
tab-size: 2;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
div.path { font-size: 110%; }
|
|
59
|
-
div.path a:link, div.path a:visited { color: #000; }
|
|
60
|
-
table.coverage { border-collapse: collapse; margin:0; padding: 0 }
|
|
61
|
-
|
|
62
|
-
table.coverage td {
|
|
63
|
-
margin: 0;
|
|
64
|
-
padding: 0;
|
|
65
|
-
color: #111;
|
|
66
|
-
vertical-align: top;
|
|
67
|
-
}
|
|
68
|
-
table.coverage td.line-count {
|
|
69
|
-
width: 50px;
|
|
70
|
-
text-align: right;
|
|
71
|
-
padding-right: 5px;
|
|
72
|
-
}
|
|
73
|
-
table.coverage td.line-coverage {
|
|
74
|
-
color: #777 !important;
|
|
75
|
-
text-align: right;
|
|
76
|
-
border-left: 1px solid #666;
|
|
77
|
-
border-right: 1px solid #666;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
table.coverage td.text {
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
table.coverage td span.cline-any {
|
|
84
|
-
display: inline-block;
|
|
85
|
-
padding: 0 5px;
|
|
86
|
-
width: 40px;
|
|
87
|
-
}
|
|
88
|
-
table.coverage td span.cline-neutral {
|
|
89
|
-
background: #eee;
|
|
90
|
-
}
|
|
91
|
-
table.coverage td span.cline-yes {
|
|
92
|
-
background: #b5d592;
|
|
93
|
-
color: #999;
|
|
94
|
-
}
|
|
95
|
-
table.coverage td span.cline-no {
|
|
96
|
-
background: #fc8c84;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.cstat-yes { color: #111; }
|
|
100
|
-
.cstat-no { background: #fc8c84; color: #111; }
|
|
101
|
-
.fstat-no { background: #ffc520; color: #111 !important; }
|
|
102
|
-
.cbranch-no { background: yellow !important; color: #111; }
|
|
103
|
-
|
|
104
|
-
.cstat-skip { background: #ddd; color: #111; }
|
|
105
|
-
.fstat-skip { background: #ddd; color: #111 !important; }
|
|
106
|
-
.cbranch-skip { background: #ddd !important; color: #111; }
|
|
107
|
-
|
|
108
|
-
.missing-if-branch {
|
|
109
|
-
display: inline-block;
|
|
110
|
-
margin-right: 10px;
|
|
111
|
-
position: relative;
|
|
112
|
-
padding: 0 4px;
|
|
113
|
-
background: black;
|
|
114
|
-
color: yellow;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.skip-if-branch {
|
|
118
|
-
display: none;
|
|
119
|
-
margin-right: 10px;
|
|
120
|
-
position: relative;
|
|
121
|
-
padding: 0 4px;
|
|
122
|
-
background: #ccc;
|
|
123
|
-
color: white;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.missing-if-branch .typ, .skip-if-branch .typ {
|
|
127
|
-
color: inherit !important;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.entity, .metric { font-weight: bold; }
|
|
131
|
-
.metric { display: inline-block; border: 1px solid #333; padding: 0.3em; background: white; }
|
|
132
|
-
.metric small { font-size: 80%; font-weight: normal; color: #666; }
|
|
133
|
-
|
|
134
|
-
div.coverage-summary table { border-collapse: collapse; margin: 3em; font-size: 110%; }
|
|
135
|
-
div.coverage-summary td, div.coverage-summary table th { margin: 0; padding: 0.25em 1em; border-top: 1px solid #666; border-bottom: 1px solid #666; }
|
|
136
|
-
div.coverage-summary th { text-align: left; border: 1px solid #666; background: #eee; font-weight: normal; }
|
|
137
|
-
div.coverage-summary th.file { border-right: none !important; }
|
|
138
|
-
div.coverage-summary th.pic { border-left: none !important; text-align: right; }
|
|
139
|
-
div.coverage-summary th.pct { border-right: none !important; }
|
|
140
|
-
div.coverage-summary th.abs { border-left: none !important; text-align: right; }
|
|
141
|
-
div.coverage-summary td.pct { text-align: right; border-left: 1px solid #666; }
|
|
142
|
-
div.coverage-summary td.abs { text-align: right; font-size: 90%; color: #444; border-right: 1px solid #666; }
|
|
143
|
-
div.coverage-summary td.file { text-align: right; border-left: 1px solid #666; white-space: nowrap; }
|
|
144
|
-
div.coverage-summary td.pic { min-width: 120px !important; }
|
|
145
|
-
div.coverage-summary a:link { text-decoration: none; color: #000; }
|
|
146
|
-
div.coverage-summary a:visited { text-decoration: none; color: #333; }
|
|
147
|
-
div.coverage-summary a:hover { text-decoration: underline; }
|
|
148
|
-
div.coverage-summary tfoot td { border-top: 1px solid #666; }
|
|
149
|
-
|
|
150
|
-
div.coverage-summary .yui3-datatable-sort-indicator, div.coverage-summary .dummy-sort-indicator {
|
|
151
|
-
height: 10px;
|
|
152
|
-
width: 7px;
|
|
153
|
-
display: inline-block;
|
|
154
|
-
margin-left: 0.5em;
|
|
155
|
-
}
|
|
156
|
-
div.coverage-summary .yui3-datatable-sort-indicator {
|
|
157
|
-
background: url("https://yui-s.yahooapis.com/3.6.0/build/datatable-sort/assets/skins/sam/sort-arrow-sprite.png") no-repeat scroll 0 0 transparent;
|
|
158
|
-
}
|
|
159
|
-
div.coverage-summary .yui3-datatable-sorted .yui3-datatable-sort-indicator {
|
|
160
|
-
background-position: 0 -20px;
|
|
161
|
-
}
|
|
162
|
-
div.coverage-summary .yui3-datatable-sorted-desc .yui3-datatable-sort-indicator {
|
|
163
|
-
background-position: 0 -10px;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.high { background: #b5d592 !important; }
|
|
167
|
-
.medium { background: #ffe87c !important; }
|
|
168
|
-
.low { background: #fc8c84 !important; }
|
|
169
|
-
|
|
170
|
-
span.cover-fill, span.cover-empty {
|
|
171
|
-
display:inline-block;
|
|
172
|
-
border:1px solid #444;
|
|
173
|
-
background: white;
|
|
174
|
-
height: 12px;
|
|
175
|
-
}
|
|
176
|
-
span.cover-fill {
|
|
177
|
-
background: #ccc;
|
|
178
|
-
border-right: 1px solid #444;
|
|
179
|
-
}
|
|
180
|
-
span.cover-empty {
|
|
181
|
-
background: white;
|
|
182
|
-
border-left: none;
|
|
183
|
-
}
|
|
184
|
-
span.cover-full {
|
|
185
|
-
border-right: none !important;
|
|
186
|
-
}
|
|
187
|
-
pre.prettyprint {
|
|
188
|
-
border: none !important;
|
|
189
|
-
padding: 0 !important;
|
|
190
|
-
margin: 0 !important;
|
|
191
|
-
}
|
|
192
|
-
.com { color: #999 !important; }
|
|
193
|
-
.ignore-none { color: #999; font-weight: normal; }
|
|
194
|
-
|
|
195
|
-
</style>
|
|
196
|
-
</head>
|
|
197
|
-
<body>
|
|
198
|
-
<div class="header low">
|
|
199
|
-
<h1>Code coverage report for <span class="entity">natural/lib/natural/tokenizers/tokenizer_ja.js</span></h1>
|
|
200
|
-
<h2>
|
|
201
|
-
|
|
202
|
-
Statements: <span class="metric">5.23% <small>(8 / 153)</small></span>
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
Branches: <span class="metric">0% <small>(0 / 11)</small></span>
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
Functions: <span class="metric">0% <small>(0 / 7)</small></span>
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
Lines: <span class="metric">5.26% <small>(8 / 152)</small></span>
|
|
212
|
-
|
|
213
|
-
Ignored: <span class="metric"><span class="ignore-none">none</span></span>
|
|
214
|
-
</h2>
|
|
215
|
-
<div class="path"><a href="../../../../index.html">All files</a> » <a href="index.html">natural/lib/natural/tokenizers/</a> » tokenizer_ja.js</div>
|
|
216
|
-
</div>
|
|
217
|
-
<div class="body">
|
|
218
|
-
<pre><table class="coverage">
|
|
219
|
-
<tr><td class="line-count">1
|
|
220
|
-
2
|
|
221
|
-
3
|
|
222
|
-
4
|
|
223
|
-
5
|
|
224
|
-
6
|
|
225
|
-
7
|
|
226
|
-
8
|
|
227
|
-
9
|
|
228
|
-
10
|
|
229
|
-
11
|
|
230
|
-
12
|
|
231
|
-
13
|
|
232
|
-
14
|
|
233
|
-
15
|
|
234
|
-
16
|
|
235
|
-
17
|
|
236
|
-
18
|
|
237
|
-
19
|
|
238
|
-
20
|
|
239
|
-
21
|
|
240
|
-
22
|
|
241
|
-
23
|
|
242
|
-
24
|
|
243
|
-
25
|
|
244
|
-
26
|
|
245
|
-
27
|
|
246
|
-
28
|
|
247
|
-
29
|
|
248
|
-
30
|
|
249
|
-
31
|
|
250
|
-
32
|
|
251
|
-
33
|
|
252
|
-
34
|
|
253
|
-
35
|
|
254
|
-
36
|
|
255
|
-
37
|
|
256
|
-
38
|
|
257
|
-
39
|
|
258
|
-
40
|
|
259
|
-
41
|
|
260
|
-
42
|
|
261
|
-
43
|
|
262
|
-
44
|
|
263
|
-
45
|
|
264
|
-
46
|
|
265
|
-
47
|
|
266
|
-
48
|
|
267
|
-
49
|
|
268
|
-
50
|
|
269
|
-
51
|
|
270
|
-
52
|
|
271
|
-
53
|
|
272
|
-
54
|
|
273
|
-
55
|
|
274
|
-
56
|
|
275
|
-
57
|
|
276
|
-
58
|
|
277
|
-
59
|
|
278
|
-
60
|
|
279
|
-
61
|
|
280
|
-
62
|
|
281
|
-
63
|
|
282
|
-
64
|
|
283
|
-
65
|
|
284
|
-
66
|
|
285
|
-
67
|
|
286
|
-
68
|
|
287
|
-
69
|
|
288
|
-
70
|
|
289
|
-
71
|
|
290
|
-
72
|
|
291
|
-
73
|
|
292
|
-
74
|
|
293
|
-
75
|
|
294
|
-
76
|
|
295
|
-
77
|
|
296
|
-
78
|
|
297
|
-
79
|
|
298
|
-
80
|
|
299
|
-
81
|
|
300
|
-
82
|
|
301
|
-
83
|
|
302
|
-
84
|
|
303
|
-
85
|
|
304
|
-
86
|
|
305
|
-
87
|
|
306
|
-
88
|
|
307
|
-
89
|
|
308
|
-
90
|
|
309
|
-
91
|
|
310
|
-
92
|
|
311
|
-
93
|
|
312
|
-
94
|
|
313
|
-
95
|
|
314
|
-
96
|
|
315
|
-
97
|
|
316
|
-
98
|
|
317
|
-
99
|
|
318
|
-
100
|
|
319
|
-
101
|
|
320
|
-
102
|
|
321
|
-
103
|
|
322
|
-
104
|
|
323
|
-
105
|
|
324
|
-
106
|
|
325
|
-
107
|
|
326
|
-
108
|
|
327
|
-
109
|
|
328
|
-
110
|
|
329
|
-
111
|
|
330
|
-
112
|
|
331
|
-
113
|
|
332
|
-
114
|
|
333
|
-
115
|
|
334
|
-
116
|
|
335
|
-
117
|
|
336
|
-
118
|
|
337
|
-
119
|
|
338
|
-
120
|
|
339
|
-
121
|
|
340
|
-
122
|
|
341
|
-
123
|
|
342
|
-
124
|
|
343
|
-
125
|
|
344
|
-
126
|
|
345
|
-
127
|
|
346
|
-
128
|
|
347
|
-
129
|
|
348
|
-
130
|
|
349
|
-
131
|
|
350
|
-
132
|
|
351
|
-
133
|
|
352
|
-
134
|
|
353
|
-
135
|
|
354
|
-
136
|
|
355
|
-
137
|
|
356
|
-
138
|
|
357
|
-
139
|
|
358
|
-
140
|
|
359
|
-
141
|
|
360
|
-
142
|
|
361
|
-
143
|
|
362
|
-
144
|
|
363
|
-
145
|
|
364
|
-
146
|
|
365
|
-
147
|
|
366
|
-
148
|
|
367
|
-
149
|
|
368
|
-
150
|
|
369
|
-
151
|
|
370
|
-
152
|
|
371
|
-
153
|
|
372
|
-
154
|
|
373
|
-
155
|
|
374
|
-
156
|
|
375
|
-
157
|
|
376
|
-
158
|
|
377
|
-
159
|
|
378
|
-
160
|
|
379
|
-
161
|
|
380
|
-
162
|
|
381
|
-
163
|
|
382
|
-
164
|
|
383
|
-
165
|
|
384
|
-
166
|
|
385
|
-
167
|
|
386
|
-
168
|
|
387
|
-
169
|
|
388
|
-
170
|
|
389
|
-
171
|
|
390
|
-
172
|
|
391
|
-
173
|
|
392
|
-
174
|
|
393
|
-
175
|
|
394
|
-
176
|
|
395
|
-
177
|
|
396
|
-
178
|
|
397
|
-
179
|
|
398
|
-
180
|
|
399
|
-
181
|
|
400
|
-
182
|
|
401
|
-
183
|
|
402
|
-
184
|
|
403
|
-
185
|
|
404
|
-
186
|
|
405
|
-
187
|
|
406
|
-
188
|
|
407
|
-
189
|
|
408
|
-
190
|
|
409
|
-
191
|
|
410
|
-
192
|
|
411
|
-
193
|
|
412
|
-
194
|
|
413
|
-
195
|
|
414
|
-
196
|
|
415
|
-
197
|
|
416
|
-
198
|
|
417
|
-
199
|
|
418
|
-
200
|
|
419
|
-
201
|
|
420
|
-
202
|
|
421
|
-
203
|
|
422
|
-
204
|
|
423
|
-
205
|
|
424
|
-
206
|
|
425
|
-
207
|
|
426
|
-
208
|
|
427
|
-
209
|
|
428
|
-
210
|
|
429
|
-
211
|
|
430
|
-
212
|
|
431
|
-
213
|
|
432
|
-
214
|
|
433
|
-
215
|
|
434
|
-
216
|
|
435
|
-
217
|
|
436
|
-
218
|
|
437
|
-
219
|
|
438
|
-
220
|
|
439
|
-
221
|
|
440
|
-
222
|
|
441
|
-
223
|
|
442
|
-
224
|
|
443
|
-
225
|
|
444
|
-
226
|
|
445
|
-
227
|
|
446
|
-
228
|
|
447
|
-
229
|
|
448
|
-
230
|
|
449
|
-
231
|
|
450
|
-
232
|
|
451
|
-
233
|
|
452
|
-
234
|
|
453
|
-
235
|
|
454
|
-
236
|
|
455
|
-
237
|
|
456
|
-
238
|
|
457
|
-
239
|
|
458
|
-
240
|
|
459
|
-
241
|
|
460
|
-
242
|
|
461
|
-
243
|
|
462
|
-
244
|
|
463
|
-
245
|
|
464
|
-
246
|
|
465
|
-
247
|
|
466
|
-
248
|
|
467
|
-
249
|
|
468
|
-
250
|
|
469
|
-
251
|
|
470
|
-
252
|
|
471
|
-
253
|
|
472
|
-
254
|
|
473
|
-
255
|
|
474
|
-
256
|
|
475
|
-
257
|
|
476
|
-
258
|
|
477
|
-
259
|
|
478
|
-
260
|
|
479
|
-
261
|
|
480
|
-
262
|
|
481
|
-
263
|
|
482
|
-
264
|
|
483
|
-
265
|
|
484
|
-
266
|
|
485
|
-
267
|
|
486
|
-
268
|
|
487
|
-
269
|
|
488
|
-
270
|
|
489
|
-
271
|
|
490
|
-
272
|
|
491
|
-
273
|
|
492
|
-
274
|
|
493
|
-
275
|
|
494
|
-
276
|
|
495
|
-
277
|
|
496
|
-
278</td><td class="line-coverage"><span class="cline-any cline-neutral"> </span>
|
|
497
|
-
<span class="cline-any cline-neutral"> </span>
|
|
498
|
-
<span class="cline-any cline-neutral"> </span>
|
|
499
|
-
<span class="cline-any cline-neutral"> </span>
|
|
500
|
-
<span class="cline-any cline-neutral"> </span>
|
|
501
|
-
<span class="cline-any cline-neutral"> </span>
|
|
502
|
-
<span class="cline-any cline-neutral"> </span>
|
|
503
|
-
<span class="cline-any cline-neutral"> </span>
|
|
504
|
-
<span class="cline-any cline-neutral"> </span>
|
|
505
|
-
<span class="cline-any cline-neutral"> </span>
|
|
506
|
-
<span class="cline-any cline-neutral"> </span>
|
|
507
|
-
<span class="cline-any cline-neutral"> </span>
|
|
508
|
-
<span class="cline-any cline-neutral"> </span>
|
|
509
|
-
<span class="cline-any cline-neutral"> </span>
|
|
510
|
-
<span class="cline-any cline-neutral"> </span>
|
|
511
|
-
<span class="cline-any cline-neutral"> </span>
|
|
512
|
-
<span class="cline-any cline-neutral"> </span>
|
|
513
|
-
<span class="cline-any cline-neutral"> </span>
|
|
514
|
-
<span class="cline-any cline-neutral"> </span>
|
|
515
|
-
<span class="cline-any cline-neutral"> </span>
|
|
516
|
-
<span class="cline-any cline-neutral"> </span>
|
|
517
|
-
<span class="cline-any cline-neutral"> </span>
|
|
518
|
-
<span class="cline-any cline-neutral"> </span>
|
|
519
|
-
<span class="cline-any cline-neutral"> </span>
|
|
520
|
-
<span class="cline-any cline-neutral"> </span>
|
|
521
|
-
<span class="cline-any cline-neutral"> </span>
|
|
522
|
-
<span class="cline-any cline-neutral"> </span>
|
|
523
|
-
<span class="cline-any cline-neutral"> </span>
|
|
524
|
-
<span class="cline-any cline-neutral"> </span>
|
|
525
|
-
<span class="cline-any cline-neutral"> </span>
|
|
526
|
-
<span class="cline-any cline-neutral"> </span>
|
|
527
|
-
<span class="cline-any cline-neutral"> </span>
|
|
528
|
-
<span class="cline-any cline-neutral"> </span>
|
|
529
|
-
<span class="cline-any cline-neutral"> </span>
|
|
530
|
-
<span class="cline-any cline-neutral"> </span>
|
|
531
|
-
<span class="cline-any cline-neutral"> </span>
|
|
532
|
-
<span class="cline-any cline-neutral"> </span>
|
|
533
|
-
<span class="cline-any cline-neutral"> </span>
|
|
534
|
-
<span class="cline-any cline-neutral"> </span>
|
|
535
|
-
<span class="cline-any cline-neutral"> </span>
|
|
536
|
-
<span class="cline-any cline-neutral"> </span>
|
|
537
|
-
<span class="cline-any cline-neutral"> </span>
|
|
538
|
-
<span class="cline-any cline-neutral"> </span>
|
|
539
|
-
<span class="cline-any cline-neutral"> </span>
|
|
540
|
-
<span class="cline-any cline-neutral"> </span>
|
|
541
|
-
<span class="cline-any cline-neutral"> </span>
|
|
542
|
-
<span class="cline-any cline-neutral"> </span>
|
|
543
|
-
<span class="cline-any cline-neutral"> </span>
|
|
544
|
-
<span class="cline-any cline-neutral"> </span>
|
|
545
|
-
<span class="cline-any cline-neutral"> </span>
|
|
546
|
-
<span class="cline-any cline-neutral"> </span>
|
|
547
|
-
<span class="cline-any cline-neutral"> </span>
|
|
548
|
-
<span class="cline-any cline-neutral"> </span>
|
|
549
|
-
<span class="cline-any cline-neutral"> </span>
|
|
550
|
-
<span class="cline-any cline-neutral"> </span>
|
|
551
|
-
<span class="cline-any cline-neutral"> </span>
|
|
552
|
-
<span class="cline-any cline-neutral"> </span>
|
|
553
|
-
<span class="cline-any cline-neutral"> </span>
|
|
554
|
-
<span class="cline-any cline-neutral"> </span>
|
|
555
|
-
<span class="cline-any cline-yes">1</span>
|
|
556
|
-
<span class="cline-any cline-neutral"> </span>
|
|
557
|
-
<span class="cline-any cline-neutral"> </span>
|
|
558
|
-
<span class="cline-any cline-neutral"> </span>
|
|
559
|
-
<span class="cline-any cline-neutral"> </span>
|
|
560
|
-
<span class="cline-any cline-neutral"> </span>
|
|
561
|
-
<span class="cline-any cline-neutral"> </span>
|
|
562
|
-
<span class="cline-any cline-neutral"> </span>
|
|
563
|
-
<span class="cline-any cline-neutral"> </span>
|
|
564
|
-
<span class="cline-any cline-yes">1</span>
|
|
565
|
-
<span class="cline-any cline-no"> </span>
|
|
566
|
-
<span class="cline-any cline-neutral"> </span>
|
|
567
|
-
<span class="cline-any cline-neutral"> </span>
|
|
568
|
-
<span class="cline-any cline-neutral"> </span>
|
|
569
|
-
<span class="cline-any cline-neutral"> </span>
|
|
570
|
-
<span class="cline-any cline-neutral"> </span>
|
|
571
|
-
<span class="cline-any cline-neutral"> </span>
|
|
572
|
-
<span class="cline-any cline-neutral"> </span>
|
|
573
|
-
<span class="cline-any cline-neutral"> </span>
|
|
574
|
-
<span class="cline-any cline-no"> </span>
|
|
575
|
-
<span class="cline-any cline-no"> </span>
|
|
576
|
-
<span class="cline-any cline-no"> </span>
|
|
577
|
-
<span class="cline-any cline-no"> </span>
|
|
578
|
-
<span class="cline-any cline-no"> </span>
|
|
579
|
-
<span class="cline-any cline-no"> </span>
|
|
580
|
-
<span class="cline-any cline-no"> </span>
|
|
581
|
-
<span class="cline-any cline-no"> </span>
|
|
582
|
-
<span class="cline-any cline-no"> </span>
|
|
583
|
-
<span class="cline-any cline-no"> </span>
|
|
584
|
-
<span class="cline-any cline-no"> </span>
|
|
585
|
-
<span class="cline-any cline-no"> </span>
|
|
586
|
-
<span class="cline-any cline-no"> </span>
|
|
587
|
-
<span class="cline-any cline-no"> </span>
|
|
588
|
-
<span class="cline-any cline-no"> </span>
|
|
589
|
-
<span class="cline-any cline-no"> </span>
|
|
590
|
-
<span class="cline-any cline-no"> </span>
|
|
591
|
-
<span class="cline-any cline-no"> </span>
|
|
592
|
-
<span class="cline-any cline-no"> </span>
|
|
593
|
-
<span class="cline-any cline-no"> </span>
|
|
594
|
-
<span class="cline-any cline-no"> </span>
|
|
595
|
-
<span class="cline-any cline-no"> </span>
|
|
596
|
-
<span class="cline-any cline-no"> </span>
|
|
597
|
-
<span class="cline-any cline-no"> </span>
|
|
598
|
-
<span class="cline-any cline-no"> </span>
|
|
599
|
-
<span class="cline-any cline-no"> </span>
|
|
600
|
-
<span class="cline-any cline-no"> </span>
|
|
601
|
-
<span class="cline-any cline-no"> </span>
|
|
602
|
-
<span class="cline-any cline-no"> </span>
|
|
603
|
-
<span class="cline-any cline-no"> </span>
|
|
604
|
-
<span class="cline-any cline-no"> </span>
|
|
605
|
-
<span class="cline-any cline-no"> </span>
|
|
606
|
-
<span class="cline-any cline-no"> </span>
|
|
607
|
-
<span class="cline-any cline-no"> </span>
|
|
608
|
-
<span class="cline-any cline-no"> </span>
|
|
609
|
-
<span class="cline-any cline-no"> </span>
|
|
610
|
-
<span class="cline-any cline-no"> </span>
|
|
611
|
-
<span class="cline-any cline-no"> </span>
|
|
612
|
-
<span class="cline-any cline-no"> </span>
|
|
613
|
-
<span class="cline-any cline-no"> </span>
|
|
614
|
-
<span class="cline-any cline-no"> </span>
|
|
615
|
-
<span class="cline-any cline-no"> </span>
|
|
616
|
-
<span class="cline-any cline-no"> </span>
|
|
617
|
-
<span class="cline-any cline-neutral"> </span>
|
|
618
|
-
<span class="cline-any cline-no"> </span>
|
|
619
|
-
<span class="cline-any cline-neutral"> </span>
|
|
620
|
-
<span class="cline-any cline-neutral"> </span>
|
|
621
|
-
<span class="cline-any cline-yes">1</span>
|
|
622
|
-
<span class="cline-any cline-neutral"> </span>
|
|
623
|
-
<span class="cline-any cline-neutral"> </span>
|
|
624
|
-
<span class="cline-any cline-neutral"> </span>
|
|
625
|
-
<span class="cline-any cline-neutral"> </span>
|
|
626
|
-
<span class="cline-any cline-neutral"> </span>
|
|
627
|
-
<span class="cline-any cline-neutral"> </span>
|
|
628
|
-
<span class="cline-any cline-neutral"> </span>
|
|
629
|
-
<span class="cline-any cline-yes">1</span>
|
|
630
|
-
<span class="cline-any cline-no"> </span>
|
|
631
|
-
<span class="cline-any cline-no"> </span>
|
|
632
|
-
<span class="cline-any cline-no"> </span>
|
|
633
|
-
<span class="cline-any cline-neutral"> </span>
|
|
634
|
-
<span class="cline-any cline-neutral"> </span>
|
|
635
|
-
<span class="cline-any cline-no"> </span>
|
|
636
|
-
<span class="cline-any cline-neutral"> </span>
|
|
637
|
-
<span class="cline-any cline-neutral"> </span>
|
|
638
|
-
<span class="cline-any cline-neutral"> </span>
|
|
639
|
-
<span class="cline-any cline-neutral"> </span>
|
|
640
|
-
<span class="cline-any cline-neutral"> </span>
|
|
641
|
-
<span class="cline-any cline-neutral"> </span>
|
|
642
|
-
<span class="cline-any cline-neutral"> </span>
|
|
643
|
-
<span class="cline-any cline-neutral"> </span>
|
|
644
|
-
<span class="cline-any cline-yes">1</span>
|
|
645
|
-
<span class="cline-any cline-no"> </span>
|
|
646
|
-
<span class="cline-any cline-no"> </span>
|
|
647
|
-
<span class="cline-any cline-neutral"> </span>
|
|
648
|
-
<span class="cline-any cline-neutral"> </span>
|
|
649
|
-
<span class="cline-any cline-neutral"> </span>
|
|
650
|
-
<span class="cline-any cline-neutral"> </span>
|
|
651
|
-
<span class="cline-any cline-neutral"> </span>
|
|
652
|
-
<span class="cline-any cline-neutral"> </span>
|
|
653
|
-
<span class="cline-any cline-neutral"> </span>
|
|
654
|
-
<span class="cline-any cline-neutral"> </span>
|
|
655
|
-
<span class="cline-any cline-neutral"> </span>
|
|
656
|
-
<span class="cline-any cline-neutral"> </span>
|
|
657
|
-
<span class="cline-any cline-yes">1</span>
|
|
658
|
-
<span class="cline-any cline-no"> </span>
|
|
659
|
-
<span class="cline-any cline-neutral"> </span>
|
|
660
|
-
<span class="cline-any cline-no"> </span>
|
|
661
|
-
<span class="cline-any cline-neutral"> </span>
|
|
662
|
-
<span class="cline-any cline-neutral"> </span>
|
|
663
|
-
<span class="cline-any cline-no"> </span>
|
|
664
|
-
<span class="cline-any cline-neutral"> </span>
|
|
665
|
-
<span class="cline-any cline-neutral"> </span>
|
|
666
|
-
<span class="cline-any cline-neutral"> </span>
|
|
667
|
-
<span class="cline-any cline-neutral"> </span>
|
|
668
|
-
<span class="cline-any cline-neutral"> </span>
|
|
669
|
-
<span class="cline-any cline-neutral"> </span>
|
|
670
|
-
<span class="cline-any cline-neutral"> </span>
|
|
671
|
-
<span class="cline-any cline-neutral"> </span>
|
|
672
|
-
<span class="cline-any cline-yes">1</span>
|
|
673
|
-
<span class="cline-any cline-no"> </span>
|
|
674
|
-
<span class="cline-any cline-no"> </span>
|
|
675
|
-
<span class="cline-any cline-neutral"> </span>
|
|
676
|
-
<span class="cline-any cline-no"> </span>
|
|
677
|
-
<span class="cline-any cline-no"> </span>
|
|
678
|
-
<span class="cline-any cline-no"> </span>
|
|
679
|
-
<span class="cline-any cline-no"> </span>
|
|
680
|
-
<span class="cline-any cline-no"> </span>
|
|
681
|
-
<span class="cline-any cline-no"> </span>
|
|
682
|
-
<span class="cline-any cline-no"> </span>
|
|
683
|
-
<span class="cline-any cline-no"> </span>
|
|
684
|
-
<span class="cline-any cline-no"> </span>
|
|
685
|
-
<span class="cline-any cline-no"> </span>
|
|
686
|
-
<span class="cline-any cline-neutral"> </span>
|
|
687
|
-
<span class="cline-any cline-no"> </span>
|
|
688
|
-
<span class="cline-any cline-no"> </span>
|
|
689
|
-
<span class="cline-any cline-no"> </span>
|
|
690
|
-
<span class="cline-any cline-no"> </span>
|
|
691
|
-
<span class="cline-any cline-no"> </span>
|
|
692
|
-
<span class="cline-any cline-no"> </span>
|
|
693
|
-
<span class="cline-any cline-no"> </span>
|
|
694
|
-
<span class="cline-any cline-no"> </span>
|
|
695
|
-
<span class="cline-any cline-no"> </span>
|
|
696
|
-
<span class="cline-any cline-no"> </span>
|
|
697
|
-
<span class="cline-any cline-no"> </span>
|
|
698
|
-
<span class="cline-any cline-no"> </span>
|
|
699
|
-
<span class="cline-any cline-no"> </span>
|
|
700
|
-
<span class="cline-any cline-no"> </span>
|
|
701
|
-
<span class="cline-any cline-no"> </span>
|
|
702
|
-
<span class="cline-any cline-no"> </span>
|
|
703
|
-
<span class="cline-any cline-no"> </span>
|
|
704
|
-
<span class="cline-any cline-no"> </span>
|
|
705
|
-
<span class="cline-any cline-no"> </span>
|
|
706
|
-
<span class="cline-any cline-no"> </span>
|
|
707
|
-
<span class="cline-any cline-no"> </span>
|
|
708
|
-
<span class="cline-any cline-no"> </span>
|
|
709
|
-
<span class="cline-any cline-no"> </span>
|
|
710
|
-
<span class="cline-any cline-no"> </span>
|
|
711
|
-
<span class="cline-any cline-no"> </span>
|
|
712
|
-
<span class="cline-any cline-no"> </span>
|
|
713
|
-
<span class="cline-any cline-no"> </span>
|
|
714
|
-
<span class="cline-any cline-no"> </span>
|
|
715
|
-
<span class="cline-any cline-no"> </span>
|
|
716
|
-
<span class="cline-any cline-no"> </span>
|
|
717
|
-
<span class="cline-any cline-no"> </span>
|
|
718
|
-
<span class="cline-any cline-no"> </span>
|
|
719
|
-
<span class="cline-any cline-no"> </span>
|
|
720
|
-
<span class="cline-any cline-no"> </span>
|
|
721
|
-
<span class="cline-any cline-no"> </span>
|
|
722
|
-
<span class="cline-any cline-no"> </span>
|
|
723
|
-
<span class="cline-any cline-no"> </span>
|
|
724
|
-
<span class="cline-any cline-no"> </span>
|
|
725
|
-
<span class="cline-any cline-no"> </span>
|
|
726
|
-
<span class="cline-any cline-no"> </span>
|
|
727
|
-
<span class="cline-any cline-no"> </span>
|
|
728
|
-
<span class="cline-any cline-no"> </span>
|
|
729
|
-
<span class="cline-any cline-no"> </span>
|
|
730
|
-
<span class="cline-any cline-no"> </span>
|
|
731
|
-
<span class="cline-any cline-no"> </span>
|
|
732
|
-
<span class="cline-any cline-no"> </span>
|
|
733
|
-
<span class="cline-any cline-no"> </span>
|
|
734
|
-
<span class="cline-any cline-no"> </span>
|
|
735
|
-
<span class="cline-any cline-no"> </span>
|
|
736
|
-
<span class="cline-any cline-no"> </span>
|
|
737
|
-
<span class="cline-any cline-no"> </span>
|
|
738
|
-
<span class="cline-any cline-no"> </span>
|
|
739
|
-
<span class="cline-any cline-no"> </span>
|
|
740
|
-
<span class="cline-any cline-no"> </span>
|
|
741
|
-
<span class="cline-any cline-no"> </span>
|
|
742
|
-
<span class="cline-any cline-neutral"> </span>
|
|
743
|
-
<span class="cline-any cline-no"> </span>
|
|
744
|
-
<span class="cline-any cline-no"> </span>
|
|
745
|
-
<span class="cline-any cline-no"> </span>
|
|
746
|
-
<span class="cline-any cline-no"> </span>
|
|
747
|
-
<span class="cline-any cline-no"> </span>
|
|
748
|
-
<span class="cline-any cline-no"> </span>
|
|
749
|
-
<span class="cline-any cline-no"> </span>
|
|
750
|
-
<span class="cline-any cline-no"> </span>
|
|
751
|
-
<span class="cline-any cline-no"> </span>
|
|
752
|
-
<span class="cline-any cline-no"> </span>
|
|
753
|
-
<span class="cline-any cline-no"> </span>
|
|
754
|
-
<span class="cline-any cline-no"> </span>
|
|
755
|
-
<span class="cline-any cline-no"> </span>
|
|
756
|
-
<span class="cline-any cline-no"> </span>
|
|
757
|
-
<span class="cline-any cline-no"> </span>
|
|
758
|
-
<span class="cline-any cline-no"> </span>
|
|
759
|
-
<span class="cline-any cline-neutral"> </span>
|
|
760
|
-
<span class="cline-any cline-no"> </span>
|
|
761
|
-
<span class="cline-any cline-no"> </span>
|
|
762
|
-
<span class="cline-any cline-no"> </span>
|
|
763
|
-
<span class="cline-any cline-no"> </span>
|
|
764
|
-
<span class="cline-any cline-neutral"> </span>
|
|
765
|
-
<span class="cline-any cline-no"> </span>
|
|
766
|
-
<span class="cline-any cline-neutral"> </span>
|
|
767
|
-
<span class="cline-any cline-no"> </span>
|
|
768
|
-
<span class="cline-any cline-neutral"> </span>
|
|
769
|
-
<span class="cline-any cline-no"> </span>
|
|
770
|
-
<span class="cline-any cline-neutral"> </span>
|
|
771
|
-
<span class="cline-any cline-neutral"> </span>
|
|
772
|
-
<span class="cline-any cline-yes">1</span>
|
|
773
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">// Original copyright:
|
|
774
|
-
/*
|
|
775
|
-
Copyright (c) 2008, Taku Kudo
|
|
776
|
-
|
|
777
|
-
All rights reserved.
|
|
778
|
-
|
|
779
|
-
Redistribution and use in source and binary forms, with or without
|
|
780
|
-
modification, are permitted provided that the following conditions are met:
|
|
781
|
-
|
|
782
|
-
* Redistributions of source code must retain the above copyright notice,
|
|
783
|
-
this list of conditions and the following disclaimer.
|
|
784
|
-
* Redistributions in binary form must reproduce the above copyright
|
|
785
|
-
notice, this list of conditions and the following disclaimer in the
|
|
786
|
-
documentation and/or other materials provided with the distribution.
|
|
787
|
-
* Neither the name of the <ORGANIZATION> nor the names of its
|
|
788
|
-
contributors may be used to endorse or promote products derived from this
|
|
789
|
-
software without specific prior written permission.
|
|
790
|
-
|
|
791
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
792
|
-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
793
|
-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
794
|
-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
795
|
-
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
796
|
-
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
797
|
-
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
798
|
-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
799
|
-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
800
|
-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
801
|
-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
802
|
-
*/
|
|
803
|
-
|
|
804
|
-
// This version:
|
|
805
|
-
/*
|
|
806
|
-
Copyright (c) 2012, Guillaume Marty
|
|
807
|
-
|
|
808
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
809
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
810
|
-
in the Software without restriction, including without limitation the rights
|
|
811
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
812
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
813
|
-
furnished to do so, subject to the following conditions:
|
|
814
|
-
|
|
815
|
-
The above copyright notice and this permission notice shall be included in
|
|
816
|
-
all copies or substantial portions of the Software.
|
|
817
|
-
|
|
818
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
819
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
820
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
821
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
822
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
823
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
824
|
-
THE SOFTWARE.
|
|
825
|
-
*/
|
|
826
|
-
|
|
827
|
-
// TinySegmenter 0.1 -- Super compact Japanese tokenizer in Javascript
|
|
828
|
-
// (c) 2008 Taku Kudo <taku@chasen.org>
|
|
829
|
-
// TinySegmenter is freely distributable under the terms of a new BSD licence.
|
|
830
|
-
// For details, see http://chasen.org/~taku/software/TinySegmenter/LICENCE.txt
|
|
831
|
-
|
|
832
|
-
var Tokenizer = require('./tokenizer'),
|
|
833
|
-
normalize = require('../normalizers/normalizer_ja').normalize_ja,
|
|
834
|
-
util = require('util');
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
/**
|
|
839
|
-
* @constructor
|
|
840
|
-
*/
|
|
841
|
-
var TokenizerJa = <span class="fstat-no" title="function not covered" >function() {</span>
|
|
842
|
-
<span class="cstat-no" title="statement not covered" > this.chartype_ = [</span>
|
|
843
|
-
[/[〇一二三四五六七八九十百千万億兆]/, 'M'],
|
|
844
|
-
[/[一-鿌〆]/, 'H'],
|
|
845
|
-
[/[ぁ-ゟ]/, 'I'],
|
|
846
|
-
[/[゠-ヿ]/, 'K'],
|
|
847
|
-
[/[a-zA-Z]/, 'A'],
|
|
848
|
-
[/[0-9]/, 'N']
|
|
849
|
-
];
|
|
850
|
-
|
|
851
|
-
<span class="cstat-no" title="statement not covered" > this.BIAS__ = -332;</span>
|
|
852
|
-
<span class="cstat-no" title="statement not covered" > this.BC1__ = {'HH': 6, 'II': 2461, 'KH': 406, 'OH': -1378};</span>
|
|
853
|
-
<span class="cstat-no" title="statement not covered" > this.BC2__ = {'AA': -3267, 'AI': 2744, 'AN': -878, 'HH': -4070, 'HM': -1711, 'HN': 4012, 'HO': 3761, 'IA': 1327, 'IH': -1184, 'II': -1332, 'IK': 1721, 'IO': 5492, 'KI': 3831, 'KK': -8741, 'MH': -3132, 'MK': 3334, 'OO': -2920};</span>
|
|
854
|
-
<span class="cstat-no" title="statement not covered" > this.BC3__ = {'HH': 996, 'HI': 626, 'HK': -721, 'HN': -1307, 'HO': -836, 'IH': -301, 'KK': 2762, 'MK': 1079, 'MM': 4034, 'OA': -1652, 'OH': 266};</span>
|
|
855
|
-
<span class="cstat-no" title="statement not covered" > this.BP1__ = {'BB': 295, 'OB': 304, 'OO': -125, 'UB': 352};</span>
|
|
856
|
-
<span class="cstat-no" title="statement not covered" > this.BP2__ = {'BO': 60, 'OO': -1762};</span>
|
|
857
|
-
<span class="cstat-no" title="statement not covered" > this.BQ1__ = {'BHH': 1150, 'BHM': 1521, 'BII': -1158, 'BIM': 886, 'BMH': 1208, 'BNH': 449, 'BOH': -91, 'BOO': -2597, 'OHI': 451, 'OIH': -296, 'OKA': 1851, 'OKH': -1020, 'OKK': 904, 'OOO': 2965};</span>
|
|
858
|
-
<span class="cstat-no" title="statement not covered" > this.BQ2__ = {'BHH': 118, 'BHI': -1159, 'BHM': 466, 'BIH': -919, 'BKK': -1720, 'BKO': 864, 'OHH': -1139, 'OHM': -181, 'OIH': 153, 'UHI': -1146};</span>
|
|
859
|
-
<span class="cstat-no" title="statement not covered" > this.BQ3__ = {'BHH': -792, 'BHI': 2664, 'BII': -299, 'BKI': 419, 'BMH': 937, 'BMM': 8335, 'BNN': 998, 'BOH': 775, 'OHH': 2174, 'OHM': 439, 'OII': 280, 'OKH': 1798, 'OKI': -793, 'OKO': -2242, 'OMH': -2402, 'OOO': 11699};</span>
|
|
860
|
-
<span class="cstat-no" title="statement not covered" > this.BQ4__ = {'BHH': -3895, 'BIH': 3761, 'BII': -4654, 'BIK': 1348, 'BKK': -1806, 'BMI': -3385, 'BOO': -12396, 'OAH': 926, 'OHH': 266, 'OHK': -2036, 'ONN': -973};</span>
|
|
861
|
-
<span class="cstat-no" title="statement not covered" > this.BW1__ = {',と': 660, ',同': 727, 'B1あ': 1404, 'B1同': 542, '、と': 660, '、同': 727, '」と': 1682, 'あっ': 1505, 'いう': 1743, 'いっ': -2055, 'いる': 672, 'うし': -4817, 'うん': 665, 'から': 3472, 'がら': 600, 'こう': -790, 'こと': 2083, 'こん': -1262, 'さら': -4143, 'さん': 4573, 'した': 2641, 'して': 1104, 'すで': -3399, 'そこ': 1977, 'それ': -871, 'たち': 1122, 'ため': 601, 'った': 3463, 'つい': -802, 'てい': 805, 'てき': 1249, 'でき': 1127, 'です': 3445, 'では': 844, 'とい': -4915, 'とみ': 1922, 'どこ': 3887, 'ない': 5713, 'なっ': 3015, 'など': 7379, 'なん': -1113, 'にし': 2468, 'には': 1498, 'にも': 1671, 'に対': -912, 'の一': -501, 'の中': 741, 'ませ': 2448, 'まで': 1711, 'まま': 2600, 'まる': -2155, 'やむ': -1947, 'よっ': -2565, 'れた': 2369, 'れで': -913, 'をし': 1860, 'を見': 731, '亡く': -1886, '京都': 2558, '取り': -2784, '大き': -2604, '大阪': 1497, '平方': -2314, '引き': -1336, '日本': -195, '本当': -2423, '毎日': -2113, '目指': -724};</span>
|
|
862
|
-
<span class="cstat-no" title="statement not covered" > this.BW2__ = {'11': -669, '..': -11822, '――': -5730, '−−': -13175, 'いう': -1609, 'うか': 2490, 'かし': -1350, 'かも': -602, 'から': -7194, 'かれ': 4612, 'がい': 853, 'がら': -3198, 'きた': 1941, 'くな': -1597, 'こと': -8392, 'この': -4193, 'させ': 4533, 'され': 13168, 'さん': -3977, 'しい': -1819, 'しか': -545, 'した': 5078, 'して': 972, 'しな': 939, 'その': -3744, 'たい': -1253, 'たた': -662, 'ただ': -3857, 'たち': -786, 'たと': 1224, 'たは': -939, 'った': 4589, 'って': 1647, 'っと': -2094, 'てい': 6144, 'てき': 3640, 'てく': 2551, 'ては': -3110, 'ても': -3065, 'でい': 2666, 'でき': -1528, 'でし': -3828, 'です': -4761, 'でも': -4203, 'とい': 1890, 'とこ': -1746, 'とと': -2279, 'との': 720, 'とみ': 5168, 'とも': -3941, 'ない': -2488, 'なが': -1313, 'など': -6509, 'なの': 2614, 'なん': 3099, 'にお': -1615, 'にし': 2748, 'にな': 2454, 'によ': -7236, 'に対': -14943, 'に従': -4688, 'に関': -11388, 'のか': 2093, 'ので': -7059, 'のに': -6041, 'のの': -6125, 'はい': 1073, 'はが': -1033, 'はず': -2532, 'ばれ': 1813, 'まし': -1316, 'まで': -6621, 'まれ': 5409, 'めて': -3153, 'もい': 2230, 'もの': -10713, 'らか': -944, 'らし': -1611, 'らに': -1897, 'りし': 651, 'りま': 1620, 'れた': 4270, 'れて': 849, 'れば': 4114, 'ろう': 6067, 'われ': 7901, 'を通': -11877, 'んだ': 728, 'んな': -4115, '一人': 602, '一方': -1375, '一日': 970, '一部': -1051, '上が': -4479, '会社': -1116, '出て': 2163, '分の': -7758, '同党': 970, '同日': -913, '大阪': -2471, '委員': -1250, '少な': -1050, '年度': -8669, '年間': -1626, '府県': -2363, '手権': -1982, '新聞': -4066, '日新': -722, '日本': -7068, '日米': 3372, '曜日': -601, '朝鮮': -2355, '本人': -2697, '東京': -1543, '然と': -1384, '社会': -1276, '立て': -990, '第に': -1612, '米国': -4268};</span>
|
|
863
|
-
<span class="cstat-no" title="statement not covered" > this.BW3__ = {'あた': -2194, 'あり': 719, 'ある': 3846, 'い.': -1185, 'い。': -1185, 'いい': 5308, 'いえ': 2079, 'いく': 3029, 'いた': 2056, 'いっ': 1883, 'いる': 5600, 'いわ': 1527, 'うち': 1117, 'うと': 4798, 'えと': 1454, 'か.': 2857, 'か。': 2857, 'かけ': -743, 'かっ': -4098, 'かに': -669, 'から': 6520, 'かり': -2670, 'が,': 1816, 'が、': 1816, 'がき': -4855, 'がけ': -1127, 'がっ': -913, 'がら': -4977, 'がり': -2064, 'きた': 1645, 'けど': 1374, 'こと': 7397, 'この': 1542, 'ころ': -2757, 'さい': -714, 'さを': 976, 'し,': 1557, 'し、': 1557, 'しい': -3714, 'した': 3562, 'して': 1449, 'しな': 2608, 'しま': 1200, 'す.': -1310, 'す。': -1310, 'する': 6521, 'ず,': 3426, 'ず、': 3426, 'ずに': 841, 'そう': 428, 'た.': 8875, 'た。': 8875, 'たい': -594, 'たの': 812, 'たり': -1183, 'たる': -853, 'だ.': 4098, 'だ。': 4098, 'だっ': 1004, 'った': -4748, 'って': 300, 'てい': 6240, 'てお': 855, 'ても': 302, 'です': 1437, 'でに': -1482, 'では': 2295, 'とう': -1387, 'とし': 2266, 'との': 541, 'とも': -3543, 'どう': 4664, 'ない': 1796, 'なく': -903, 'など': 2135, 'に,': -1021, 'に、': -1021, 'にし': 1771, 'にな': 1906, 'には': 2644, 'の,': -724, 'の、': -724, 'の子': -1000, 'は,': 1337, 'は、': 1337, 'べき': 2181, 'まし': 1113, 'ます': 6943, 'まっ': -1549, 'まで': 6154, 'まれ': -793, 'らし': 1479, 'られ': 6820, 'るる': 3818, 'れ,': 854, 'れ、': 854, 'れた': 1850, 'れて': 1375, 'れば': -3246, 'れる': 1091, 'われ': -605, 'んだ': 606, 'んで': 798, 'カ月': 990, '会議': 860, '入り': 1232, '大会': 2217, '始め': 1681, '市': 965, '新聞': -5055, '日,': 974, '日、': 974, '社会': 2024};</span>
|
|
864
|
-
<span class="cstat-no" title="statement not covered" > this.TC1__ = {'AAA': 1093, 'HHH': 1029, 'HHM': 580, 'HII': 998, 'HOH': -390, 'HOM': -331, 'IHI': 1169, 'IOH': -142, 'IOI': -1015, 'IOM': 467, 'MMH': 187, 'OOI': -1832};</span>
|
|
865
|
-
<span class="cstat-no" title="statement not covered" > this.TC2__ = {'HHO': 2088, 'HII': -1023, 'HMM': -1154, 'IHI': -1965, 'KKH': 703, 'OII': -2649};</span>
|
|
866
|
-
<span class="cstat-no" title="statement not covered" > this.TC3__ = {'AAA': -294, 'HHH': 346, 'HHI': -341, 'HII': -1088, 'HIK': 731, 'HOH': -1486, 'IHH': 128, 'IHI': -3041, 'IHO': -1935, 'IIH': -825, 'IIM': -1035, 'IOI': -542, 'KHH': -1216, 'KKA': 491, 'KKH': -1217, 'KOK': -1009, 'MHH': -2694, 'MHM': -457, 'MHO': 123, 'MMH': -471, 'NNH': -1689, 'NNO': 662, 'OHO': -3393};</span>
|
|
867
|
-
<span class="cstat-no" title="statement not covered" > this.TC4__ = {'HHH': -203, 'HHI': 1344, 'HHK': 365, 'HHM': -122, 'HHN': 182, 'HHO': 669, 'HIH': 804, 'HII': 679, 'HOH': 446, 'IHH': 695, 'IHO': -2324, 'IIH': 321, 'III': 1497, 'IIO': 656, 'IOO': 54, 'KAK': 4845, 'KKA': 3386, 'KKK': 3065, 'MHH': -405, 'MHI': 201, 'MMH': -241, 'MMM': 661, 'MOM': 841};</span>
|
|
868
|
-
<span class="cstat-no" title="statement not covered" > this.TQ1__ = {'BHHH': -227, 'BHHI': 316, 'BHIH': -132, 'BIHH': 60, 'BIII': 1595, 'BNHH': -744, 'BOHH': 225, 'BOOO': -908, 'OAKK': 482, 'OHHH': 281, 'OHIH': 249, 'OIHI': 200, 'OIIH': -68};</span>
|
|
869
|
-
<span class="cstat-no" title="statement not covered" > this.TQ2__ = {'BIHH': -1401, 'BIII': -1033, 'BKAK': -543, 'BOOO': -5591};</span>
|
|
870
|
-
<span class="cstat-no" title="statement not covered" > this.TQ3__ = {'BHHH': 478, 'BHHM': -1073, 'BHIH': 222, 'BHII': -504, 'BIIH': -116, 'BIII': -105, 'BMHI': -863, 'BMHM': -464, 'BOMH': 620, 'OHHH': 346, 'OHHI': 1729, 'OHII': 997, 'OHMH': 481, 'OIHH': 623, 'OIIH': 1344, 'OKAK': 2792, 'OKHH': 587, 'OKKA': 679, 'OOHH': 110, 'OOII': -685};</span>
|
|
871
|
-
<span class="cstat-no" title="statement not covered" > this.TQ4__ = {'BHHH': -721, 'BHHM': -3604, 'BHII': -966, 'BIIH': -607, 'BIII': -2181, 'OAAA': -2763, 'OAKK': 180, 'OHHH': -294, 'OHHI': 2446, 'OHHO': 480, 'OHIH': -1573, 'OIHH': 1935, 'OIHI': -493, 'OIIH': 626, 'OIII': -4007, 'OKAK': -8156};</span>
|
|
872
|
-
<span class="cstat-no" title="statement not covered" > this.TW1__ = {'につい': -4681, '東京都': 2026};</span>
|
|
873
|
-
<span class="cstat-no" title="statement not covered" > this.TW2__ = {'ある程': -2049, 'いった': -1256, 'ころが': -2434, 'しょう': 3873, 'その後': -4430, 'だって': -1049, 'ていた': 1833, 'として': -4657, 'ともに': -4517, 'もので': 1882, '一気に': -792, '初めて': -1512, '同時に': -8097, '大きな': -1255, '対して': -2721, '社会党': -3216};</span>
|
|
874
|
-
<span class="cstat-no" title="statement not covered" > this.TW3__ = {'いただ': -1734, 'してい': 1314, 'として': -4314, 'につい': -5483, 'にとっ': -5989, 'に当た': -6247, 'ので,': -727, 'ので、': -727, 'のもの': -600, 'れから': -3752, '十二月': -2287};</span>
|
|
875
|
-
<span class="cstat-no" title="statement not covered" > this.TW4__ = {'いう.': 8576, 'いう。': 8576, 'からな': -2348, 'してい': 2958, 'たが,': 1516, 'たが、': 1516, 'ている': 1538, 'という': 1349, 'ました': 5543, 'ません': 1097, 'ようと': -4258, 'よると': 5865};</span>
|
|
876
|
-
<span class="cstat-no" title="statement not covered" > this.UC1__ = {'A': 484, 'K': 93, 'M': 645, 'O': -505};</span>
|
|
877
|
-
<span class="cstat-no" title="statement not covered" > this.UC2__ = {'A': 819, 'H': 1059, 'I': 409, 'M': 3987, 'N': 5775, 'O': 646};</span>
|
|
878
|
-
<span class="cstat-no" title="statement not covered" > this.UC3__ = {'A': -1370, 'I': 2311};</span>
|
|
879
|
-
<span class="cstat-no" title="statement not covered" > this.UC4__ = {'A': -2643, 'H': 1809, 'I': -1032, 'K': -3450, 'M': 3565, 'N': 3876, 'O': 6646};</span>
|
|
880
|
-
<span class="cstat-no" title="statement not covered" > this.UC5__ = {'H': 313, 'I': -1238, 'K': -799, 'M': 539, 'O': -831};</span>
|
|
881
|
-
<span class="cstat-no" title="statement not covered" > this.UC6__ = {'H': -506, 'I': -253, 'K': 87, 'M': 247, 'O': -387};</span>
|
|
882
|
-
<span class="cstat-no" title="statement not covered" > this.UP1__ = {'O': -214};</span>
|
|
883
|
-
<span class="cstat-no" title="statement not covered" > this.UP2__ = {'B': 69, 'O': 935};</span>
|
|
884
|
-
<span class="cstat-no" title="statement not covered" > this.UP3__ = {'B': 189};</span>
|
|
885
|
-
<span class="cstat-no" title="statement not covered" > this.UQ1__ = {'BH': 21, 'BI': -12, 'BK': -99, 'BN': 142, 'BO': -56, 'OH': -95, 'OI': 477, 'OK': 410, 'OO': -2422};</span>
|
|
886
|
-
<span class="cstat-no" title="statement not covered" > this.UQ2__ = {'BH': 216, 'BI': 113, 'OK': 1759};</span>
|
|
887
|
-
<span class="cstat-no" title="statement not covered" > this.UQ3__ = {'BA': -479, 'BH': 42, 'BI': 1913, 'BK': -7198, 'BM': 3160, 'BN': 6427, 'BO': 14761, 'OI': -827, 'ON': -3212};</span>
|
|
888
|
-
<span class="cstat-no" title="statement not covered" > this.UW1__ = {',': 156, '、': 156, '「': -463, 'あ': -941, 'う': -127, 'が': -553, 'き': 121, 'こ': 505, 'で': -201, 'と': -547, 'ど': -123, 'に': -789, 'の': -185, 'は': -847, 'も': -466, 'や': -470, 'よ': 182, 'ら': -292, 'り': 208, 'れ': 169, 'を': -446, 'ん': -137, '・': -135, '主': -402, '京': -268, '区': -912, '午': 871, '国': -460, '大': 561, '委': 729, '市': -411, '日': -141, '理': 361, '生': -408, '県': -386, '都': -718};</span>
|
|
889
|
-
<span class="cstat-no" title="statement not covered" > this.UW2__ = {',': -829, '、': -829, '〇': 892, '「': -645, '」': 3145, 'あ': -538, 'い': 505, 'う': 134, 'お': -502, 'か': 1454, 'が': -856, 'く': -412, 'こ': 1141, 'さ': 878, 'ざ': 540, 'し': 1529, 'す': -675, 'せ': 300, 'そ': -1011, 'た': 188, 'だ': 1837, 'つ': -949, 'て': -291, 'で': -268, 'と': -981, 'ど': 1273, 'な': 1063, 'に': -1764, 'の': 130, 'は': -409, 'ひ': -1273, 'べ': 1261, 'ま': 600, 'も': -1263, 'や': -402, 'よ': 1639, 'り': -579, 'る': -694, 'れ': 571, 'を': -2516, 'ん': 2095, 'ア': -587, 'カ': 306, 'キ': 568, 'ッ': 831, '三': -758, '不': -2150, '世': -302, '中': -968, '主': -861, '事': 492, '人': -123, '会': 978, '保': 362, '入': 548, '初': -3025, '副': -1566, '北': -3414, '区': -422, '大': -1769, '天': -865, '太': -483, '子': -1519, '学': 760, '実': 1023, '小': -2009, '市': -813, '年': -1060, '強': 1067, '手': -1519, '揺': -1033, '政': 1522, '文': -1355, '新': -1682, '日': -1815, '明': -1462, '最': -630, '朝': -1843, '本': -1650, '東': -931, '果': -665, '次': -2378, '民': -180, '気': -1740, '理': 752, '発': 529, '目': -1584, '相': -242, '県': -1165, '立': -763, '第': 810, '米': 509, '自': -1353, '行': 838, '西': -744, '見': -3874, '調': 1010, '議': 1198, '込': 3041, '開': 1758, '間': -1257};</span>
|
|
890
|
-
<span class="cstat-no" title="statement not covered" > this.UW3__ = {'1': -800, ',': 4889, '−': -1723, '、': 4889, '々': -2311, '〇': 5827, '」': 2670, '〓': -3573, 'あ': -2696, 'い': 1006, 'う': 2342, 'え': 1983, 'お': -4864, 'か': -1163, 'が': 3271, 'く': 1004, 'け': 388, 'げ': 401, 'こ': -3552, 'ご': -3116, 'さ': -1058, 'し': -395, 'す': 584, 'せ': 3685, 'そ': -5228, 'た': 842, 'ち': -521, 'っ': -1444, 'つ': -1081, 'て': 6167, 'で': 2318, 'と': 1691, 'ど': -899, 'な': -2788, 'に': 2745, 'の': 4056, 'は': 4555, 'ひ': -2171, 'ふ': -1798, 'へ': 1199, 'ほ': -5516, 'ま': -4384, 'み': -120, 'め': 1205, 'も': 2323, 'や': -788, 'よ': -202, 'ら': 727, 'り': 649, 'る': 5905, 'れ': 2773, 'わ': -1207, 'を': 6620, 'ん': -518, 'ア': 551, 'グ': 1319, 'ス': 874, 'ッ': -1350, 'ト': 521, 'ム': 1109, 'ル': 1591, 'ロ': 2201, 'ン': 278, '・': -3794, '一': -1619, '下': -1759, '世': -2087, '両': 3815, '中': 653, '主': -758, '予': -1193, '二': 974, '人': 2742, '今': 792, '他': 1889, '以': -1368, '低': 811, '何': 4265, '作': -361, '保': -2439, '元': 4858, '党': 3593, '全': 1574, '公': -3030, '六': 755, '共': -1880, '円': 5807, '再': 3095, '分': 457, '初': 2475, '別': 1129, '前': 2286, '副': 4437, '力': 365, '動': -949, '務': -1872, '化': 1327, '北': -1038, '区': 4646, '千': -2309, '午': -783, '協': -1006, '口': 483, '右': 1233, '各': 3588, '合': -241, '同': 3906, '和': -837, '員': 4513, '国': 642, '型': 1389, '場': 1219, '外': -241, '妻': 2016, '学': -1356, '安': -423, '実': -1008, '家': 1078, '小': -513, '少': -3102, '州': 1155, '市': 3197, '平': -1804, '年': 2416, '広': -1030, '府': 1605, '度': 1452, '建': -2352, '当': -3885, '得': 1905, '思': -1291, '性': 1822, '戸': -488, '指': -3973, '政': -2013, '教': -1479, '数': 3222, '文': -1489, '新': 1764, '日': 2099, '旧': 5792, '昨': -661, '時': -1248, '曜': -951, '最': -937, '月': 4125, '期': 360, '李': 3094, '村': 364, '東': -805, '核': 5156, '森': 2438, '業': 484, '氏': 2613, '民': -1694, '決': -1073, '法': 1868, '海': -495, '無': 979, '物': 461, '特': -3850, '生': -273, '用': 914, '町': 1215, '的': 7313, '直': -1835, '省': 792, '県': 6293, '知': -1528, '私': 4231, '税': 401, '立': -960, '第': 1201, '米': 7767, '系': 3066, '約': 3663, '級': 1384, '統': -4229, '総': 1163, '線': 1255, '者': 6457, '能': 725, '自': -2869, '英': 785, '見': 1044, '調': -562, '財': -733, '費': 1777, '車': 1835, '軍': 1375, '込': -1504, '通': -1136, '選': -681, '郎': 1026, '郡': 4404, '部': 1200, '金': 2163, '長': 421, '開': -1432, '間': 1302, '関': -1282, '雨': 2009, '電': -1045, '非': 2066, '駅': 1620};</span>
|
|
891
|
-
<span class="cstat-no" title="statement not covered" > this.UW4__ = {',': 3930, '.': 3508, '―': -4841, '、': 3930, '。': 3508, '〇': 4999, '「': 1895, '」': 3798, '〓': -5156, 'あ': 4752, 'い': -3435, 'う': -640, 'え': -2514, 'お': 2405, 'か': 530, 'が': 6006, 'き': -4482, 'ぎ': -3821, 'く': -3788, 'け': -4376, 'げ': -4734, 'こ': 2255, 'ご': 1979, 'さ': 2864, 'し': -843, 'じ': -2506, 'す': -731, 'ず': 1251, 'せ': 181, 'そ': 4091, 'た': 5034, 'だ': 5408, 'ち': -3654, 'っ': -5882, 'つ': -1659, 'て': 3994, 'で': 7410, 'と': 4547, 'な': 5433, 'に': 6499, 'ぬ': 1853, 'ね': 1413, 'の': 7396, 'は': 8578, 'ば': 1940, 'ひ': 4249, 'び': -4134, 'ふ': 1345, 'へ': 6665, 'べ': -744, 'ほ': 1464, 'ま': 1051, 'み': -2082, 'む': -882, 'め': -5046, 'も': 4169, 'ゃ': -2666, 'や': 2795, 'ょ': -1544, 'よ': 3351, 'ら': -2922, 'り': -9726, 'る': -14896, 'れ': -2613, 'ろ': -4570, 'わ': -1783, 'を': 13150, 'ん': -2352, 'カ': 2145, 'コ': 1789, 'セ': 1287, 'ッ': -724, 'ト': -403, 'メ': -1635, 'ラ': -881, 'リ': -541, 'ル': -856, 'ン': -3637, '・': -4371, 'ー': -11870, '一': -2069, '中': 2210, '予': 782, '事': -190, '井': -1768, '人': 1036, '以': 544, '会': 950, '体': -1286, '作': 530, '側': 4292, '先': 601, '党': -2006, '共': -1212, '内': 584, '円': 788, '初': 1347, '前': 1623, '副': 3879, '力': -302, '動': -740, '務': -2715, '化': 776, '区': 4517, '協': 1013, '参': 1555, '合': -1834, '和': -681, '員': -910, '器': -851, '回': 1500, '国': -619, '園': -1200, '地': 866, '場': -1410, '塁': -2094, '士': -1413, '多': 1067, '大': 571, '子': -4802, '学': -1397, '定': -1057, '寺': -809, '小': 1910, '屋': -1328, '山': -1500, '島': -2056, '川': -2667, '市': 2771, '年': 374, '庁': -4556, '後': 456, '性': 553, '感': 916, '所': -1566, '支': 856, '改': 787, '政': 2182, '教': 704, '文': 522, '方': -856, '日': 1798, '時': 1829, '最': 845, '月': -9066, '木': -485, '来': -442, '校': -360, '業': -1043, '氏': 5388, '民': -2716, '気': -910, '沢': -939, '済': -543, '物': -735, '率': 672, '球': -1267, '生': -1286, '産': -1101, '田': -2900, '町': 1826, '的': 2586, '目': 922, '省': -3485, '県': 2997, '空': -867, '立': -2112, '第': 788, '米': 2937, '系': 786, '約': 2171, '経': 1146, '統': -1169, '総': 940, '線': -994, '署': 749, '者': 2145, '能': -730, '般': -852, '行': -792, '規': 792, '警': -1184, '議': -244, '谷': -1000, '賞': 730, '車': -1481, '軍': 1158, '輪': -1433, '込': -3370, '近': 929, '道': -1291, '選': 2596, '郎': -4866, '都': 1192, '野': -1100, '銀': -2213, '長': 357, '間': -2344, '院': -2297, '際': -2604, '電': -878, '領': -1659, '題': -792, '館': -1984, '首': 1749, '高': 2120};</span>
|
|
892
|
-
<span class="cstat-no" title="statement not covered" > this.UW5__ = {'1': -514, ',': 465, '.': -299, 'E2': -32768, ']': -2762, '、': 465, '。': -299, '「': 363, 'あ': 1655, 'い': 331, 'う': -503, 'え': 1199, 'お': 527, 'か': 647, 'が': -421, 'き': 1624, 'ぎ': 1971, 'く': 312, 'げ': -983, 'さ': -1537, 'し': -1371, 'す': -852, 'だ': -1186, 'ち': 1093, 'っ': 52, 'つ': 921, 'て': -18, 'で': -850, 'と': -127, 'ど': 1682, 'な': -787, 'に': -1224, 'の': -635, 'は': -578, 'べ': 1001, 'み': 502, 'め': 865, 'ゃ': 3350, 'ょ': 854, 'り': -208, 'る': 429, 'れ': 504, 'わ': 419, 'を': -1264, 'ん': 327, 'イ': 241, 'ル': 451, 'ン': -343, '中': -871, '京': 722, '会': -1153, '党': -654, '務': 3519, '区': -901, '告': 848, '員': 2104, '大': -1296, '学': -548, '定': 1785, '嵐': -1304, '市': -2991, '席': 921, '年': 1763, '思': 872, '所': -814, '挙': 1618, '新': -1682, '日': 218, '月': -4353, '査': 932, '格': 1356, '機': -1508, '氏': -1347, '田': 240, '町': -3912, '的': -3149, '相': 1319, '省': -1052, '県': -4003, '研': -997, '社': -278, '空': -813, '統': 1955, '者': -2233, '表': 663, '語': -1073, '議': 1219, '選': -1018, '郎': -368, '長': 786, '間': 1191, '題': 2368, '館': -689};</span>
|
|
893
|
-
<span class="cstat-no" title="statement not covered" > this.UW6__ = {'1': -270, ',': 227, '.': 808, 'E1': 306, '、': 227, '。': 808, 'あ': -307, 'う': 189, 'か': 241, 'が': -73, 'く': -121, 'こ': -200, 'じ': 1782, 'す': 383, 'た': -428, 'っ': 573, 'て': -1014, 'で': 101, 'と': -105, 'な': -253, 'に': -149, 'の': -417, 'は': -236, 'も': -206, 'り': 187, 'る': -135, 'を': 195, 'ル': -673, 'ン': -496, '一': -277, '中': 201, '件': -800, '会': 624, '前': 302, '区': 1792, '員': -1212, '委': 798, '学': -960, '市': 887, '広': -695, '後': 535, '業': -697, '相': 753, '社': -507, '福': 974, '空': -822, '者': 1811, '連': 463, '郎': 1082};</span>
|
|
894
|
-
|
|
895
|
-
<span class="cstat-no" title="statement not covered" > return this;</span>
|
|
896
|
-
};
|
|
897
|
-
|
|
898
|
-
util.inherits(TokenizerJa, Tokenizer);
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
/**
|
|
902
|
-
* @param {string} str
|
|
903
|
-
* @return {string}
|
|
904
|
-
* @private
|
|
905
|
-
*/
|
|
906
|
-
TokenizerJa.prototype.ctype_ = <span class="fstat-no" title="function not covered" >function(str) {</span>
|
|
907
|
-
<span class="cstat-no" title="statement not covered" > for (var i = 0, length = this.chartype_.length; i < length; i++) {</span>
|
|
908
|
-
<span class="cstat-no" title="statement not covered" > if (str.match(this.chartype_[i][0])) {</span>
|
|
909
|
-
<span class="cstat-no" title="statement not covered" > return this.chartype_[i][1];</span>
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
<span class="cstat-no" title="statement not covered" > return 'O';</span>
|
|
913
|
-
};
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
/**
|
|
917
|
-
* @param {string} v
|
|
918
|
-
* @return {number}
|
|
919
|
-
* @private
|
|
920
|
-
*/
|
|
921
|
-
TokenizerJa.prototype.ts_ = <span class="fstat-no" title="function not covered" >function(v) {</span>
|
|
922
|
-
<span class="cstat-no" title="statement not covered" > if (v) { <span class="cstat-no" title="statement not covered" >return v; </span>}</span>
|
|
923
|
-
<span class="cstat-no" title="statement not covered" > return 0;</span>
|
|
924
|
-
};
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
/**
|
|
928
|
-
* Remove punctuations signs from tokens.
|
|
929
|
-
*
|
|
930
|
-
* @param {Array.<string>} tokens An array of tokens.
|
|
931
|
-
* @return {Array.<string>} An array of tokens.
|
|
932
|
-
* @private
|
|
933
|
-
*/
|
|
934
|
-
TokenizerJa.prototype.removePuncTokens = <span class="fstat-no" title="function not covered" >function(tokens) {</span>
|
|
935
|
-
<span class="cstat-no" title="statement not covered" > return tokens</span>
|
|
936
|
-
.map(<span class="fstat-no" title="function not covered" >function(token) {</span>
|
|
937
|
-
<span class="cstat-no" title="statement not covered" > return token.replace(/[_-・,、;:!?.。()[]{}「」@*\/&#%`^+<=>|~≪≫─$"_\-・,、;:!?.。()[\]{}「」@*\/&#%`^+<=>|~«»$"\s]+/g, '');</span>
|
|
938
|
-
})
|
|
939
|
-
.filter(<span class="fstat-no" title="function not covered" >function(token) {</span>
|
|
940
|
-
<span class="cstat-no" title="statement not covered" > return token != '';</span>
|
|
941
|
-
});
|
|
942
|
-
};
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
/**
|
|
946
|
-
* @param {string} text
|
|
947
|
-
* @return {Array.<string>}
|
|
948
|
-
*/
|
|
949
|
-
TokenizerJa.prototype.tokenize = <span class="fstat-no" title="function not covered" >function(text) {</span>
|
|
950
|
-
<span class="cstat-no" title="statement not covered" > if (text == null || text == undefined || text == '') {</span>
|
|
951
|
-
<span class="cstat-no" title="statement not covered" > return [];</span>
|
|
952
|
-
}
|
|
953
|
-
<span class="cstat-no" title="statement not covered" > text = normalize(text);</span>
|
|
954
|
-
<span class="cstat-no" title="statement not covered" > var result = [];</span>
|
|
955
|
-
<span class="cstat-no" title="statement not covered" > var seg = ['B3', 'B2', 'B1'];</span>
|
|
956
|
-
<span class="cstat-no" title="statement not covered" > var ctype = ['O', 'O', 'O'];</span>
|
|
957
|
-
<span class="cstat-no" title="statement not covered" > var o = text.split('');</span>
|
|
958
|
-
<span class="cstat-no" title="statement not covered" > var i;</span>
|
|
959
|
-
<span class="cstat-no" title="statement not covered" > var length;</span>
|
|
960
|
-
<span class="cstat-no" title="statement not covered" > for (i = 0, length = o.length; i < length; ++i) {</span>
|
|
961
|
-
<span class="cstat-no" title="statement not covered" > seg.push(o[i]);</span>
|
|
962
|
-
<span class="cstat-no" title="statement not covered" > ctype.push(this.ctype_(o[i]));</span>
|
|
963
|
-
}
|
|
964
|
-
<span class="cstat-no" title="statement not covered" > seg.push('E1');</span>
|
|
965
|
-
<span class="cstat-no" title="statement not covered" > seg.push('E2');</span>
|
|
966
|
-
<span class="cstat-no" title="statement not covered" > seg.push('E3');</span>
|
|
967
|
-
<span class="cstat-no" title="statement not covered" > ctype.push('O');</span>
|
|
968
|
-
<span class="cstat-no" title="statement not covered" > ctype.push('O');</span>
|
|
969
|
-
<span class="cstat-no" title="statement not covered" > ctype.push('O');</span>
|
|
970
|
-
<span class="cstat-no" title="statement not covered" > var word = seg[3];</span>
|
|
971
|
-
<span class="cstat-no" title="statement not covered" > var p1 = 'U';</span>
|
|
972
|
-
<span class="cstat-no" title="statement not covered" > var p2 = 'U';</span>
|
|
973
|
-
<span class="cstat-no" title="statement not covered" > var p3 = 'U';</span>
|
|
974
|
-
<span class="cstat-no" title="statement not covered" > for (i = 4, length = seg.length - 3; i < length; ++i) {</span>
|
|
975
|
-
<span class="cstat-no" title="statement not covered" > var score = this.BIAS__;</span>
|
|
976
|
-
<span class="cstat-no" title="statement not covered" > var w1 = seg[i - 3];</span>
|
|
977
|
-
<span class="cstat-no" title="statement not covered" > var w2 = seg[i - 2];</span>
|
|
978
|
-
<span class="cstat-no" title="statement not covered" > var w3 = seg[i - 1];</span>
|
|
979
|
-
<span class="cstat-no" title="statement not covered" > var w4 = seg[i];</span>
|
|
980
|
-
<span class="cstat-no" title="statement not covered" > var w5 = seg[i + 1];</span>
|
|
981
|
-
<span class="cstat-no" title="statement not covered" > var w6 = seg[i + 2];</span>
|
|
982
|
-
<span class="cstat-no" title="statement not covered" > var c1 = ctype[i - 3];</span>
|
|
983
|
-
<span class="cstat-no" title="statement not covered" > var c2 = ctype[i - 2];</span>
|
|
984
|
-
<span class="cstat-no" title="statement not covered" > var c3 = ctype[i - 1];</span>
|
|
985
|
-
<span class="cstat-no" title="statement not covered" > var c4 = ctype[i];</span>
|
|
986
|
-
<span class="cstat-no" title="statement not covered" > var c5 = ctype[i + 1];</span>
|
|
987
|
-
<span class="cstat-no" title="statement not covered" > var c6 = ctype[i + 2];</span>
|
|
988
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.UP1__[p1]);</span>
|
|
989
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.UP2__[p2]);</span>
|
|
990
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.UP3__[p3]);</span>
|
|
991
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.BP1__[p1 + p2]);</span>
|
|
992
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.BP2__[p2 + p3]);</span>
|
|
993
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.UW1__[w1]);</span>
|
|
994
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.UW2__[w2]);</span>
|
|
995
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.UW3__[w3]);</span>
|
|
996
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.UW4__[w4]);</span>
|
|
997
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.UW5__[w5]);</span>
|
|
998
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.UW6__[w6]);</span>
|
|
999
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.BW1__[w2 + w3]);</span>
|
|
1000
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.BW2__[w3 + w4]);</span>
|
|
1001
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.BW3__[w4 + w5]);</span>
|
|
1002
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.TW1__[w1 + w2 + w3]);</span>
|
|
1003
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.TW2__[w2 + w3 + w4]);</span>
|
|
1004
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.TW3__[w3 + w4 + w5]);</span>
|
|
1005
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.TW4__[w4 + w5 + w6]);</span>
|
|
1006
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.UC1__[c1]);</span>
|
|
1007
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.UC2__[c2]);</span>
|
|
1008
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.UC3__[c3]);</span>
|
|
1009
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.UC4__[c4]);</span>
|
|
1010
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.UC5__[c5]);</span>
|
|
1011
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.UC6__[c6]);</span>
|
|
1012
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.BC1__[c2 + c3]);</span>
|
|
1013
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.BC2__[c3 + c4]);</span>
|
|
1014
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.BC3__[c4 + c5]);</span>
|
|
1015
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.TC1__[c1 + c2 + c3]);</span>
|
|
1016
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.TC2__[c2 + c3 + c4]);</span>
|
|
1017
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.TC3__[c3 + c4 + c5]);</span>
|
|
1018
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.TC4__[c4 + c5 + c6]);</span>
|
|
1019
|
-
//score += this.ts_(this.TC5__[c4 + c5 + c6]);
|
|
1020
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.UQ1__[p1 + c1]);</span>
|
|
1021
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.UQ2__[p2 + c2]);</span>
|
|
1022
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.UQ3__[p3 + c3]);</span>
|
|
1023
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.BQ1__[p2 + c2 + c3]);</span>
|
|
1024
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.BQ2__[p2 + c3 + c4]);</span>
|
|
1025
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.BQ3__[p3 + c2 + c3]);</span>
|
|
1026
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.BQ4__[p3 + c3 + c4]);</span>
|
|
1027
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.TQ1__[p2 + c1 + c2 + c3]);</span>
|
|
1028
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.TQ2__[p2 + c2 + c3 + c4]);</span>
|
|
1029
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.TQ3__[p3 + c1 + c2 + c3]);</span>
|
|
1030
|
-
<span class="cstat-no" title="statement not covered" > score += this.ts_(this.TQ4__[p3 + c2 + c3 + c4]);</span>
|
|
1031
|
-
<span class="cstat-no" title="statement not covered" > var p = 'O';</span>
|
|
1032
|
-
<span class="cstat-no" title="statement not covered" > if (score > 0) {</span>
|
|
1033
|
-
<span class="cstat-no" title="statement not covered" > result.push(word);</span>
|
|
1034
|
-
<span class="cstat-no" title="statement not covered" > word = '';</span>
|
|
1035
|
-
<span class="cstat-no" title="statement not covered" > p = 'B';</span>
|
|
1036
|
-
}
|
|
1037
|
-
<span class="cstat-no" title="statement not covered" > p1 = p2;</span>
|
|
1038
|
-
<span class="cstat-no" title="statement not covered" > p2 = p3;</span>
|
|
1039
|
-
<span class="cstat-no" title="statement not covered" > p3 = p;</span>
|
|
1040
|
-
<span class="cstat-no" title="statement not covered" > word += seg[i];</span>
|
|
1041
|
-
}
|
|
1042
|
-
<span class="cstat-no" title="statement not covered" > result.push(word);</span>
|
|
1043
|
-
|
|
1044
|
-
<span class="cstat-no" title="statement not covered" > result = this.removePuncTokens(result);</span>
|
|
1045
|
-
|
|
1046
|
-
<span class="cstat-no" title="statement not covered" > return result;</span>
|
|
1047
|
-
};
|
|
1048
|
-
|
|
1049
|
-
module.exports = TokenizerJa;
|
|
1050
|
-
</pre></td></tr>
|
|
1051
|
-
</table></pre>
|
|
1052
|
-
|
|
1053
|
-
</div>
|
|
1054
|
-
<div class="footer">
|
|
1055
|
-
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Dec 22 2014 18:01:06 GMT-0500 (EST)</div>
|
|
1056
|
-
</div>
|
|
1057
|
-
|
|
1058
|
-
<script src="../../../../prettify.js"></script>
|
|
1059
|
-
|
|
1060
|
-
<script src="https://yui-s.yahooapis.com/3.6.0/build/yui/yui-min.js"></script>
|
|
1061
|
-
<script>
|
|
1062
|
-
|
|
1063
|
-
YUI().use('datatable', function (Y) {
|
|
1064
|
-
|
|
1065
|
-
var formatters = {
|
|
1066
|
-
pct: function (o) {
|
|
1067
|
-
o.className += o.record.get('classes')[o.column.key];
|
|
1068
|
-
try {
|
|
1069
|
-
return o.value.toFixed(2) + '%';
|
|
1070
|
-
} catch (ex) { return o.value + '%'; }
|
|
1071
|
-
},
|
|
1072
|
-
html: function (o) {
|
|
1073
|
-
o.className += o.record.get('classes')[o.column.key];
|
|
1074
|
-
return o.record.get(o.column.key + '_html');
|
|
1075
|
-
}
|
|
1076
|
-
},
|
|
1077
|
-
defaultFormatter = function (o) {
|
|
1078
|
-
o.className += o.record.get('classes')[o.column.key];
|
|
1079
|
-
return o.value;
|
|
1080
|
-
};
|
|
1081
|
-
|
|
1082
|
-
function getColumns(theadNode) {
|
|
1083
|
-
var colNodes = theadNode.all('tr th'),
|
|
1084
|
-
cols = [],
|
|
1085
|
-
col;
|
|
1086
|
-
colNodes.each(function (colNode) {
|
|
1087
|
-
col = {
|
|
1088
|
-
key: colNode.getAttribute('data-col'),
|
|
1089
|
-
label: colNode.get('innerHTML') || ' ',
|
|
1090
|
-
sortable: !colNode.getAttribute('data-nosort'),
|
|
1091
|
-
className: colNode.getAttribute('class'),
|
|
1092
|
-
type: colNode.getAttribute('data-type'),
|
|
1093
|
-
allowHTML: colNode.getAttribute('data-html') === 'true' || colNode.getAttribute('data-fmt') === 'html'
|
|
1094
|
-
};
|
|
1095
|
-
col.formatter = formatters[colNode.getAttribute('data-fmt')] || defaultFormatter;
|
|
1096
|
-
cols.push(col);
|
|
1097
|
-
});
|
|
1098
|
-
return cols;
|
|
1099
|
-
}
|
|
1100
|
-
|
|
1101
|
-
function getRowData(trNode, cols) {
|
|
1102
|
-
var tdNodes = trNode.all('td'),
|
|
1103
|
-
i,
|
|
1104
|
-
row = { classes: {} },
|
|
1105
|
-
node,
|
|
1106
|
-
name;
|
|
1107
|
-
for (i = 0; i < cols.length; i += 1) {
|
|
1108
|
-
name = cols[i].key;
|
|
1109
|
-
node = tdNodes.item(i);
|
|
1110
|
-
row[name] = node.getAttribute('data-value') || node.get('innerHTML');
|
|
1111
|
-
row[name + '_html'] = node.get('innerHTML');
|
|
1112
|
-
row.classes[name] = node.getAttribute('class');
|
|
1113
|
-
//Y.log('Name: ' + name + '; Value: ' + row[name]);
|
|
1114
|
-
if (cols[i].type === 'number') { row[name] = row[name] * 1; }
|
|
1115
|
-
}
|
|
1116
|
-
//Y.log(row);
|
|
1117
|
-
return row;
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
function getData(tbodyNode, cols) {
|
|
1121
|
-
var data = [];
|
|
1122
|
-
tbodyNode.all('tr').each(function (trNode) {
|
|
1123
|
-
data.push(getRowData(trNode, cols));
|
|
1124
|
-
});
|
|
1125
|
-
return data;
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
function replaceTable(node) {
|
|
1129
|
-
if (!node) { return; }
|
|
1130
|
-
var cols = getColumns(node.one('thead')),
|
|
1131
|
-
data = getData(node.one('tbody'), cols),
|
|
1132
|
-
table,
|
|
1133
|
-
parent = node.get('parentNode');
|
|
1134
|
-
|
|
1135
|
-
table = new Y.DataTable({
|
|
1136
|
-
columns: cols,
|
|
1137
|
-
data: data,
|
|
1138
|
-
sortBy: 'file'
|
|
1139
|
-
});
|
|
1140
|
-
parent.set('innerHTML', '');
|
|
1141
|
-
table.render(parent);
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
|
-
Y.on('domready', function () {
|
|
1145
|
-
replaceTable(Y.one('div.coverage-summary table'));
|
|
1146
|
-
if (typeof prettyPrint === 'function') {
|
|
1147
|
-
prettyPrint();
|
|
1148
|
-
}
|
|
1149
|
-
});
|
|
1150
|
-
});
|
|
1151
|
-
</script>
|
|
1152
|
-
</body>
|
|
1153
|
-
</html>
|