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,350 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<title>Code coverage report for lib/natural/</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 high">
|
|
199
|
-
<h1>Code coverage report for <span class="entity">lib/natural/</span></h1>
|
|
200
|
-
<h2>
|
|
201
|
-
|
|
202
|
-
Statements: <span class="metric">100% <small>(53 / 53)</small></span>
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
Branches: <span class="metric">100% <small>(0 / 0)</small></span>
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
Functions: <span class="metric">100% <small>(0 / 0)</small></span>
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
Lines: <span class="metric">100% <small>(53 / 53)</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> » lib/natural/</div>
|
|
216
|
-
</div>
|
|
217
|
-
<div class="body">
|
|
218
|
-
<div class="coverage-summary">
|
|
219
|
-
<table>
|
|
220
|
-
<thead>
|
|
221
|
-
<tr>
|
|
222
|
-
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
|
223
|
-
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
|
224
|
-
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
|
225
|
-
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
226
|
-
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
|
227
|
-
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
228
|
-
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
|
229
|
-
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
230
|
-
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
|
231
|
-
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
232
|
-
</tr>
|
|
233
|
-
</thead>
|
|
234
|
-
<tbody><tr>
|
|
235
|
-
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
|
|
236
|
-
<td data-value="100" class="pic high"><span class="cover-fill cover-full" style="width: 100px;"></span><span class="cover-empty" style="width:0px;"></span></td>
|
|
237
|
-
<td data-value="100" class="pct high">100%</td>
|
|
238
|
-
<td data-value="53" class="abs high">(53 / 53)</td>
|
|
239
|
-
<td data-value="100" class="pct high">100%</td>
|
|
240
|
-
<td data-value="0" class="abs high">(0 / 0)</td>
|
|
241
|
-
<td data-value="100" class="pct high">100%</td>
|
|
242
|
-
<td data-value="0" class="abs high">(0 / 0)</td>
|
|
243
|
-
<td data-value="100" class="pct high">100%</td>
|
|
244
|
-
<td data-value="53" class="abs high">(53 / 53)</td>
|
|
245
|
-
</tr>
|
|
246
|
-
|
|
247
|
-
</tbody>
|
|
248
|
-
</table>
|
|
249
|
-
</div>
|
|
250
|
-
</div>
|
|
251
|
-
<div class="footer">
|
|
252
|
-
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Dec 22 2014 18:17:21 GMT-0500 (EST)</div>
|
|
253
|
-
</div>
|
|
254
|
-
|
|
255
|
-
<script src="../../prettify.js"></script>
|
|
256
|
-
|
|
257
|
-
<script src="https://yui-s.yahooapis.com/3.6.0/build/yui/yui-min.js"></script>
|
|
258
|
-
<script>
|
|
259
|
-
|
|
260
|
-
YUI().use('datatable', function (Y) {
|
|
261
|
-
|
|
262
|
-
var formatters = {
|
|
263
|
-
pct: function (o) {
|
|
264
|
-
o.className += o.record.get('classes')[o.column.key];
|
|
265
|
-
try {
|
|
266
|
-
return o.value.toFixed(2) + '%';
|
|
267
|
-
} catch (ex) { return o.value + '%'; }
|
|
268
|
-
},
|
|
269
|
-
html: function (o) {
|
|
270
|
-
o.className += o.record.get('classes')[o.column.key];
|
|
271
|
-
return o.record.get(o.column.key + '_html');
|
|
272
|
-
}
|
|
273
|
-
},
|
|
274
|
-
defaultFormatter = function (o) {
|
|
275
|
-
o.className += o.record.get('classes')[o.column.key];
|
|
276
|
-
return o.value;
|
|
277
|
-
};
|
|
278
|
-
|
|
279
|
-
function getColumns(theadNode) {
|
|
280
|
-
var colNodes = theadNode.all('tr th'),
|
|
281
|
-
cols = [],
|
|
282
|
-
col;
|
|
283
|
-
colNodes.each(function (colNode) {
|
|
284
|
-
col = {
|
|
285
|
-
key: colNode.getAttribute('data-col'),
|
|
286
|
-
label: colNode.get('innerHTML') || ' ',
|
|
287
|
-
sortable: !colNode.getAttribute('data-nosort'),
|
|
288
|
-
className: colNode.getAttribute('class'),
|
|
289
|
-
type: colNode.getAttribute('data-type'),
|
|
290
|
-
allowHTML: colNode.getAttribute('data-html') === 'true' || colNode.getAttribute('data-fmt') === 'html'
|
|
291
|
-
};
|
|
292
|
-
col.formatter = formatters[colNode.getAttribute('data-fmt')] || defaultFormatter;
|
|
293
|
-
cols.push(col);
|
|
294
|
-
});
|
|
295
|
-
return cols;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
function getRowData(trNode, cols) {
|
|
299
|
-
var tdNodes = trNode.all('td'),
|
|
300
|
-
i,
|
|
301
|
-
row = { classes: {} },
|
|
302
|
-
node,
|
|
303
|
-
name;
|
|
304
|
-
for (i = 0; i < cols.length; i += 1) {
|
|
305
|
-
name = cols[i].key;
|
|
306
|
-
node = tdNodes.item(i);
|
|
307
|
-
row[name] = node.getAttribute('data-value') || node.get('innerHTML');
|
|
308
|
-
row[name + '_html'] = node.get('innerHTML');
|
|
309
|
-
row.classes[name] = node.getAttribute('class');
|
|
310
|
-
//Y.log('Name: ' + name + '; Value: ' + row[name]);
|
|
311
|
-
if (cols[i].type === 'number') { row[name] = row[name] * 1; }
|
|
312
|
-
}
|
|
313
|
-
//Y.log(row);
|
|
314
|
-
return row;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
function getData(tbodyNode, cols) {
|
|
318
|
-
var data = [];
|
|
319
|
-
tbodyNode.all('tr').each(function (trNode) {
|
|
320
|
-
data.push(getRowData(trNode, cols));
|
|
321
|
-
});
|
|
322
|
-
return data;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
function replaceTable(node) {
|
|
326
|
-
if (!node) { return; }
|
|
327
|
-
var cols = getColumns(node.one('thead')),
|
|
328
|
-
data = getData(node.one('tbody'), cols),
|
|
329
|
-
table,
|
|
330
|
-
parent = node.get('parentNode');
|
|
331
|
-
|
|
332
|
-
table = new Y.DataTable({
|
|
333
|
-
columns: cols,
|
|
334
|
-
data: data,
|
|
335
|
-
sortBy: 'file'
|
|
336
|
-
});
|
|
337
|
-
parent.set('innerHTML', '');
|
|
338
|
-
table.render(parent);
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
Y.on('domready', function () {
|
|
342
|
-
replaceTable(Y.one('div.coverage-summary table'));
|
|
343
|
-
if (typeof prettyPrint === 'function') {
|
|
344
|
-
prettyPrint();
|
|
345
|
-
}
|
|
346
|
-
});
|
|
347
|
-
});
|
|
348
|
-
</script>
|
|
349
|
-
</body>
|
|
350
|
-
</html>
|