├── .gitignore
├── .travis.yml
├── docs
└── NaiveBayesClassifier
│ ├── 0.1.0
│ ├── img
│ │ ├── glyphicons-halflings.png
│ │ └── glyphicons-halflings-white.png
│ ├── scripts
│ │ ├── prettify
│ │ │ ├── lang-css.js
│ │ │ └── Apache-License-2.0.txt
│ │ ├── toc.js
│ │ ├── bootstrap-tab.js
│ │ └── bootstrap-dropdown.js
│ ├── styles
│ │ ├── prettify-tomorrow.css
│ │ ├── sunlight.default.css
│ │ └── sunlight.dark.css
│ ├── classes.list.html
│ ├── UriInformation.html
│ ├── categorization.html
│ └── index.html
│ ├── 0.1.1
│ ├── img
│ │ ├── glyphicons-halflings.png
│ │ └── glyphicons-halflings-white.png
│ ├── scripts
│ │ ├── prettify
│ │ │ ├── lang-css.js
│ │ │ └── Apache-License-2.0.txt
│ │ ├── toc.js
│ │ ├── bootstrap-tab.js
│ │ └── bootstrap-dropdown.js
│ ├── styles
│ │ ├── prettify-tomorrow.css
│ │ ├── sunlight.default.css
│ │ └── sunlight.dark.css
│ ├── classes.list.html
│ └── index.html
│ └── 0.2.0
│ ├── img
│ ├── glyphicons-halflings.png
│ └── glyphicons-halflings-white.png
│ ├── scripts
│ ├── prettify
│ │ └── lang-css.js
│ ├── toc.js
│ ├── bootstrap-tab.js
│ └── bootstrap-dropdown.js
│ ├── styles
│ ├── prettify-tomorrow.css
│ ├── sunlight.default.css
│ └── sunlight.dark.css
│ ├── classes.list.html
│ └── index.html
├── resources
└── Comparison of Classification Methods Based on the Type of Attributes and Sample Size.pdf
├── gruntfile.js
├── .jshintrc
├── jsdoc.conf.json
├── bower.json
├── package.json
├── gulpfile.js
├── LICENSE
├── dist
└── NaiveBayesClassifier-min.js
├── README.md
└── test
└── NaiveBayesClassifier-test.js
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .deploy
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - "node"
4 | - "iojs"
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.0/img/glyphicons-halflings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hdmchl/NaiveBayesClassifier/HEAD/docs/NaiveBayesClassifier/0.1.0/img/glyphicons-halflings.png
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.1/img/glyphicons-halflings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hdmchl/NaiveBayesClassifier/HEAD/docs/NaiveBayesClassifier/0.1.1/img/glyphicons-halflings.png
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.2.0/img/glyphicons-halflings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hdmchl/NaiveBayesClassifier/HEAD/docs/NaiveBayesClassifier/0.2.0/img/glyphicons-halflings.png
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.0/img/glyphicons-halflings-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hdmchl/NaiveBayesClassifier/HEAD/docs/NaiveBayesClassifier/0.1.0/img/glyphicons-halflings-white.png
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.1/img/glyphicons-halflings-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hdmchl/NaiveBayesClassifier/HEAD/docs/NaiveBayesClassifier/0.1.1/img/glyphicons-halflings-white.png
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.2.0/img/glyphicons-halflings-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hdmchl/NaiveBayesClassifier/HEAD/docs/NaiveBayesClassifier/0.2.0/img/glyphicons-halflings-white.png
--------------------------------------------------------------------------------
/resources/Comparison of Classification Methods Based on the Type of Attributes and Sample Size.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hdmchl/NaiveBayesClassifier/HEAD/resources/Comparison of Classification Methods Based on the Type of Attributes and Sample Size.pdf
--------------------------------------------------------------------------------
/gruntfile.js:
--------------------------------------------------------------------------------
1 | module.exports = function(grunt) {
2 | 'use strict';
3 |
4 | grunt.initConfig({
5 | jsdoc : {
6 | dist : {
7 | src: ['src/*.js', 'README.md', 'package.json'],
8 | options: {
9 | destination: 'docs',
10 | template: 'node_modules/grunt-jsdoc/node_modules/ink-docstrap/template',
11 | configure: 'jsdoc.conf.json'
12 | }
13 | }
14 | }
15 | });
16 |
17 | grunt.loadNpmTasks('grunt-jsdoc');
18 | };
19 |
--------------------------------------------------------------------------------
/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "node": true,
3 | "browser": true,
4 | "esnext": true,
5 | "bitwise": true,
6 | "camelcase": true,
7 | "curly": true,
8 | "eqeqeq": true,
9 | "immed": true,
10 | "indent": 4,
11 | "latedef": true,
12 | "newcap": true,
13 | "noarg": true,
14 | "quotmark": "single",
15 | "undef": true,
16 | "unused": true,
17 | "strict": true,
18 | "trailing": true,
19 | "smarttabs": true,
20 | "globals": {
21 | "define": true,
22 | "describe": true,
23 | "it": true
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/jsdoc.conf.json:
--------------------------------------------------------------------------------
1 | {
2 | "templates" : {
3 | "cleverLinks" : true,
4 | "monospaceLinks" : true,
5 | "dateFormat" : "ddd, MMM Do, YYYY",
6 | "outputSourceFiles" : false,
7 | "outputSourcePath" : false,
8 | "systemName" : "NaiveBayesClassifier",
9 | "footer" : "",
10 | "copyright" : "Copyright (C) 2015, Hadi Michael. All rights reserved.",
11 | "navType" : "inline",
12 | "theme" : "cosmo",
13 | "linenums" : true,
14 | "collapseSymbols" : false,
15 | "inverseNav" : true,
16 | "highlightTutorialCode" : true
17 | }
18 | }
--------------------------------------------------------------------------------
/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "naivebayesclassifier",
3 | "title": "NaiveBayesClassifier",
4 | "homepage": "https://github.com/hadimichael/NaiveBayesClassifier",
5 | "author": {
6 | "name": "Hadi Michael",
7 | "url": "http://hadi.io"
8 | },
9 | "description": "NaiveBayesClassifier is a Multinomial Naive-Bayes Classifier that uses Laplace Smoothing.",
10 | "main": "dist/NaiveBayesClassifier-min.js",
11 | "moduleType": [
12 | "amd",
13 | "globals",
14 | "node"
15 | ],
16 | "keywords": [
17 | "naive",
18 | "bayes",
19 | "classifier",
20 | "multinomial",
21 | "machine learning",
22 | "learn",
23 | "categorize",
24 | "classify"
25 | ],
26 | "license": "BSD-3-Clause, see LICENSE file",
27 | "ignore": [
28 | "/*",
29 | "!/dist",
30 | "!LICENSE",
31 | "!README.md"
32 | ]
33 | }
34 |
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.0/scripts/prettify/lang-css.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([
2 | ["pln", /^[\t\n\f\r ]+/, null, " \t\r\n"]
3 | ], [
4 | ["str", /^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/, null],
5 | ["str", /^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/, null],
6 | ["lang-css-str", /^url\(([^"')]*)\)/i],
7 | ["kwd", /^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i, null],
8 | ["lang-css-kw", /^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],
9 | ["com", /^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],
10 | ["com", /^(?:<\!--|--\>)/],
11 | ["lit", /^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],
12 | ["lit", /^#[\da-f]{3,6}/i],
13 | ["pln", /^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],
14 | ["pun", /^[^\s\w"']+/]
15 | ]), ["css"]);
16 | PR.registerLangHandler(PR.createSimpleLexer([], [
17 | ["kwd", /^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]
18 | ]), ["css-kw"]);
19 | PR.registerLangHandler(PR.createSimpleLexer([], [
20 | ["str", /^[^"')]+/]
21 | ]), ["css-str"]);
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.1/scripts/prettify/lang-css.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([
2 | ["pln", /^[\t\n\f\r ]+/, null, " \t\r\n"]
3 | ], [
4 | ["str", /^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/, null],
5 | ["str", /^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/, null],
6 | ["lang-css-str", /^url\(([^"')]*)\)/i],
7 | ["kwd", /^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i, null],
8 | ["lang-css-kw", /^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],
9 | ["com", /^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],
10 | ["com", /^(?:<\!--|--\>)/],
11 | ["lit", /^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],
12 | ["lit", /^#[\da-f]{3,6}/i],
13 | ["pln", /^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],
14 | ["pun", /^[^\s\w"']+/]
15 | ]), ["css"]);
16 | PR.registerLangHandler(PR.createSimpleLexer([], [
17 | ["kwd", /^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]
18 | ]), ["css-kw"]);
19 | PR.registerLangHandler(PR.createSimpleLexer([], [
20 | ["str", /^[^"')]+/]
21 | ]), ["css-str"]);
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.2.0/scripts/prettify/lang-css.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([
2 | ["pln", /^[\t\n\f\r ]+/, null, " \t\r\n"]
3 | ], [
4 | ["str", /^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/, null],
5 | ["str", /^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/, null],
6 | ["lang-css-str", /^url\(([^"')]*)\)/i],
7 | ["kwd", /^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i, null],
8 | ["lang-css-kw", /^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],
9 | ["com", /^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],
10 | ["com", /^(?:<\!--|--\>)/],
11 | ["lit", /^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],
12 | ["lit", /^#[\da-f]{3,6}/i],
13 | ["pln", /^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],
14 | ["pun", /^[^\s\w"']+/]
15 | ]), ["css"]);
16 | PR.registerLangHandler(PR.createSimpleLexer([], [
17 | ["kwd", /^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]
18 | ]), ["css-kw"]);
19 | PR.registerLangHandler(PR.createSimpleLexer([], [
20 | ["str", /^[^"')]+/]
21 | ]), ["css-str"]);
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "naivebayesclassifier",
3 | "title": "NaiveBayesClassifier",
4 | "version": "0.2.0",
5 | "description": "NaiveBayesClassifier is a Multinomial Naive-Bayes Classifier that uses Laplace Smoothing.",
6 | "keywords": [ "naive", "bayes", "classifier", "multinomial", "machine learning", "learn", "categorize", "classify"],
7 | "main": "dist/NaiveBayesClassifier-min.js",
8 | "scripts": {
9 | "test": "gulp test"
10 | },
11 | "author": {
12 | "name": "Hadi Michael",
13 | "url": "http://hadi.io"
14 | },
15 | "repository": {
16 | "type": "git",
17 | "url": "git://github.com/hadimichael/NaiveBayesClassifier.git"
18 | },
19 | "license": "BSD-3-Clause, see LICENSE file",
20 | "devDependencies": {
21 | "grunt": "^0.4.5",
22 | "grunt-jsdoc": "^0.5.8",
23 | "gulp": "^3.8.11",
24 | "gulp-gh-pages": "^0.5.1",
25 | "gulp-grunt": "^0.5.2",
26 | "gulp-jshint": "^1.10.0",
27 | "gulp-minify": "0.0.5",
28 | "gulp-mocha": "^2.0.1",
29 | "gulp-umd": "^0.1.3",
30 | "mocha": "^2.2.5"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/gulpfile.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var pkg = require('./package.json'),
4 | gulp = require('gulp'),
5 | umd = require('gulp-umd'),
6 | minify = require('gulp-minify'),
7 | jshint = require('gulp-jshint'),
8 | mocha = require('gulp-mocha'),
9 | ghPages = require('gulp-gh-pages');
10 |
11 | var path = {
12 | scripts: 'src/*.js',
13 | dist: 'dist/*.js',
14 | test: 'test/NaiveBayesClassifier-test.js',
15 | readme: 'README.md',
16 | docs: './docs/NaiveBayesClassifier/' + pkg.version + '/**/*.*'
17 | };
18 |
19 | require('gulp-grunt')(gulp); // Require all grunt tasks, we need this because grunt-jsdoc is better than the gulp alternative
20 |
21 | gulp.task('docs', function () {
22 | gulp.start('grunt-jsdoc');
23 | });
24 |
25 | gulp.task('build', function() {
26 | gulp.src(path.scripts)
27 | .pipe(jshint())
28 | .pipe(jshint.reporter('default'))
29 | .pipe(umd()) // Ship in 'regular module' UMD format: returnExports.js
30 | .pipe(minify())
31 | .pipe(gulp.dest('./dist/'));
32 | });
33 |
34 | gulp.task('test', function() {
35 | gulp.start('build');
36 | gulp.src(path.test)
37 | .pipe(mocha({reporter: 'nyan'}));
38 | });
39 |
40 | gulp.task('default', function() {
41 | gulp.start('build', 'test', 'docs');
42 | });
43 |
44 | gulp.task('deploy', function() {
45 | return gulp.src(path.docs)
46 | .pipe(ghPages({
47 | force: true,
48 | cacheDir: '.deploy'
49 | }));
50 | });
51 |
52 | // Build, test and generate docs, every time we update the code
53 | gulp.task('watch', function() {
54 | gulp.watch(path.scripts, ['default']);
55 | gulp.watch(path.readme, ['docs']);
56 | gulp.watch(path.test, ['test']);
57 | });
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | BSD-3-Clause
2 | Copyright (C) 2015, Hadi Michael. All rights reserved.
3 |
4 | NaiveBayesClassifier can be downloaded from: https://github.com/hadimichael/NaiveBayesClassifier
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | * Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | * Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | * Neither the name of the copyright holder nor the names of its contributors
17 | may be used to endorse or promote products derived from this software without
18 | specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.0/styles/prettify-tomorrow.css:
--------------------------------------------------------------------------------
1 | /* Tomorrow Theme */
2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */
3 | /* Pretty printing styles. Used with prettify.js. */
4 | /* SPAN elements with the classes below are added by prettyprint. */
5 | /* plain text */
6 | .pln {
7 | color: #4d4d4c; }
8 |
9 | @media screen {
10 | /* string content */
11 | .str {
12 | color: #718c00; }
13 |
14 | /* a keyword */
15 | .kwd {
16 | color: #8959a8; }
17 |
18 | /* a comment */
19 | .com {
20 | color: #8e908c; }
21 |
22 | /* a type name */
23 | .typ {
24 | color: #4271ae; }
25 |
26 | /* a literal value */
27 | .lit {
28 | color: #f5871f; }
29 |
30 | /* punctuation */
31 | .pun {
32 | color: #4d4d4c; }
33 |
34 | /* lisp open bracket */
35 | .opn {
36 | color: #4d4d4c; }
37 |
38 | /* lisp close bracket */
39 | .clo {
40 | color: #4d4d4c; }
41 |
42 | /* a markup tag name */
43 | .tag {
44 | color: #c82829; }
45 |
46 | /* a markup attribute name */
47 | .atn {
48 | color: #f5871f; }
49 |
50 | /* a markup attribute value */
51 | .atv {
52 | color: #3e999f; }
53 |
54 | /* a declaration */
55 | .dec {
56 | color: #f5871f; }
57 |
58 | /* a variable name */
59 | .var {
60 | color: #c82829; }
61 |
62 | /* a function name */
63 | .fun {
64 | color: #4271ae; } }
65 | /* Use higher contrast and text-weight for printable form. */
66 | @media print, projection {
67 | .str {
68 | color: #060; }
69 |
70 | .kwd {
71 | color: #006;
72 | font-weight: bold; }
73 |
74 | .com {
75 | color: #600;
76 | font-style: italic; }
77 |
78 | .typ {
79 | color: #404;
80 | font-weight: bold; }
81 |
82 | .lit {
83 | color: #044; }
84 |
85 | .pun, .opn, .clo {
86 | color: #440; }
87 |
88 | .tag {
89 | color: #006;
90 | font-weight: bold; }
91 |
92 | .atn {
93 | color: #404; }
94 |
95 | .atv {
96 | color: #060; } }
97 | /* Style */
98 | /*
99 | pre.prettyprint {
100 | background: white;
101 | font-family: Menlo, Monaco, Consolas, monospace;
102 | font-size: 12px;
103 | line-height: 1.5;
104 | border: 1px solid #ccc;
105 | padding: 10px; }
106 | */
107 |
108 | /* Specify class=linenums on a pre to get line numbering */
109 | ol.linenums {
110 | margin-top: 0;
111 | margin-bottom: 0; }
112 |
113 | /* IE indents via margin-left */
114 | li.L0,
115 | li.L1,
116 | li.L2,
117 | li.L3,
118 | li.L4,
119 | li.L5,
120 | li.L6,
121 | li.L7,
122 | li.L8,
123 | li.L9 {
124 | /* */ }
125 |
126 | /* Alternate shading for lines */
127 | li.L1,
128 | li.L3,
129 | li.L5,
130 | li.L7,
131 | li.L9 {
132 | /* */ }
133 |
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.1/styles/prettify-tomorrow.css:
--------------------------------------------------------------------------------
1 | /* Tomorrow Theme */
2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */
3 | /* Pretty printing styles. Used with prettify.js. */
4 | /* SPAN elements with the classes below are added by prettyprint. */
5 | /* plain text */
6 | .pln {
7 | color: #4d4d4c; }
8 |
9 | @media screen {
10 | /* string content */
11 | .str {
12 | color: #718c00; }
13 |
14 | /* a keyword */
15 | .kwd {
16 | color: #8959a8; }
17 |
18 | /* a comment */
19 | .com {
20 | color: #8e908c; }
21 |
22 | /* a type name */
23 | .typ {
24 | color: #4271ae; }
25 |
26 | /* a literal value */
27 | .lit {
28 | color: #f5871f; }
29 |
30 | /* punctuation */
31 | .pun {
32 | color: #4d4d4c; }
33 |
34 | /* lisp open bracket */
35 | .opn {
36 | color: #4d4d4c; }
37 |
38 | /* lisp close bracket */
39 | .clo {
40 | color: #4d4d4c; }
41 |
42 | /* a markup tag name */
43 | .tag {
44 | color: #c82829; }
45 |
46 | /* a markup attribute name */
47 | .atn {
48 | color: #f5871f; }
49 |
50 | /* a markup attribute value */
51 | .atv {
52 | color: #3e999f; }
53 |
54 | /* a declaration */
55 | .dec {
56 | color: #f5871f; }
57 |
58 | /* a variable name */
59 | .var {
60 | color: #c82829; }
61 |
62 | /* a function name */
63 | .fun {
64 | color: #4271ae; } }
65 | /* Use higher contrast and text-weight for printable form. */
66 | @media print, projection {
67 | .str {
68 | color: #060; }
69 |
70 | .kwd {
71 | color: #006;
72 | font-weight: bold; }
73 |
74 | .com {
75 | color: #600;
76 | font-style: italic; }
77 |
78 | .typ {
79 | color: #404;
80 | font-weight: bold; }
81 |
82 | .lit {
83 | color: #044; }
84 |
85 | .pun, .opn, .clo {
86 | color: #440; }
87 |
88 | .tag {
89 | color: #006;
90 | font-weight: bold; }
91 |
92 | .atn {
93 | color: #404; }
94 |
95 | .atv {
96 | color: #060; } }
97 | /* Style */
98 | /*
99 | pre.prettyprint {
100 | background: white;
101 | font-family: Menlo, Monaco, Consolas, monospace;
102 | font-size: 12px;
103 | line-height: 1.5;
104 | border: 1px solid #ccc;
105 | padding: 10px; }
106 | */
107 |
108 | /* Specify class=linenums on a pre to get line numbering */
109 | ol.linenums {
110 | margin-top: 0;
111 | margin-bottom: 0; }
112 |
113 | /* IE indents via margin-left */
114 | li.L0,
115 | li.L1,
116 | li.L2,
117 | li.L3,
118 | li.L4,
119 | li.L5,
120 | li.L6,
121 | li.L7,
122 | li.L8,
123 | li.L9 {
124 | /* */ }
125 |
126 | /* Alternate shading for lines */
127 | li.L1,
128 | li.L3,
129 | li.L5,
130 | li.L7,
131 | li.L9 {
132 | /* */ }
133 |
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.2.0/styles/prettify-tomorrow.css:
--------------------------------------------------------------------------------
1 | /* Tomorrow Theme */
2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */
3 | /* Pretty printing styles. Used with prettify.js. */
4 | /* SPAN elements with the classes below are added by prettyprint. */
5 | /* plain text */
6 | .pln {
7 | color: #4d4d4c; }
8 |
9 | @media screen {
10 | /* string content */
11 | .str {
12 | color: #718c00; }
13 |
14 | /* a keyword */
15 | .kwd {
16 | color: #8959a8; }
17 |
18 | /* a comment */
19 | .com {
20 | color: #8e908c; }
21 |
22 | /* a type name */
23 | .typ {
24 | color: #4271ae; }
25 |
26 | /* a literal value */
27 | .lit {
28 | color: #f5871f; }
29 |
30 | /* punctuation */
31 | .pun {
32 | color: #4d4d4c; }
33 |
34 | /* lisp open bracket */
35 | .opn {
36 | color: #4d4d4c; }
37 |
38 | /* lisp close bracket */
39 | .clo {
40 | color: #4d4d4c; }
41 |
42 | /* a markup tag name */
43 | .tag {
44 | color: #c82829; }
45 |
46 | /* a markup attribute name */
47 | .atn {
48 | color: #f5871f; }
49 |
50 | /* a markup attribute value */
51 | .atv {
52 | color: #3e999f; }
53 |
54 | /* a declaration */
55 | .dec {
56 | color: #f5871f; }
57 |
58 | /* a variable name */
59 | .var {
60 | color: #c82829; }
61 |
62 | /* a function name */
63 | .fun {
64 | color: #4271ae; } }
65 | /* Use higher contrast and text-weight for printable form. */
66 | @media print, projection {
67 | .str {
68 | color: #060; }
69 |
70 | .kwd {
71 | color: #006;
72 | font-weight: bold; }
73 |
74 | .com {
75 | color: #600;
76 | font-style: italic; }
77 |
78 | .typ {
79 | color: #404;
80 | font-weight: bold; }
81 |
82 | .lit {
83 | color: #044; }
84 |
85 | .pun, .opn, .clo {
86 | color: #440; }
87 |
88 | .tag {
89 | color: #006;
90 | font-weight: bold; }
91 |
92 | .atn {
93 | color: #404; }
94 |
95 | .atv {
96 | color: #060; } }
97 | /* Style */
98 | /*
99 | pre.prettyprint {
100 | background: white;
101 | font-family: Menlo, Monaco, Consolas, monospace;
102 | font-size: 12px;
103 | line-height: 1.5;
104 | border: 1px solid #ccc;
105 | padding: 10px; }
106 | */
107 |
108 | /* Specify class=linenums on a pre to get line numbering */
109 | ol.linenums {
110 | margin-top: 0;
111 | margin-bottom: 0; }
112 |
113 | /* IE indents via margin-left */
114 | li.L0,
115 | li.L1,
116 | li.L2,
117 | li.L3,
118 | li.L4,
119 | li.L5,
120 | li.L6,
121 | li.L7,
122 | li.L8,
123 | li.L9 {
124 | /* */ }
125 |
126 | /* Alternate shading for lines */
127 | li.L1,
128 | li.L3,
129 | li.L5,
130 | li.L7,
131 | li.L9 {
132 | /* */ }
133 |
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.0/scripts/toc.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | $.fn.toc = function(options) {
3 | var self = this;
4 | var opts = $.extend({}, jQuery.fn.toc.defaults, options);
5 |
6 | var container = $(opts.container);
7 | var headings = $(opts.selectors, container);
8 | var headingOffsets = [];
9 | var activeClassName = opts.prefix+'-active';
10 |
11 | var scrollTo = function(e) {
12 | if (opts.smoothScrolling) {
13 | e.preventDefault();
14 | var elScrollTo = $(e.target).attr('href');
15 | var $el = $(elScrollTo);
16 |
17 | $('body,html').animate({ scrollTop: $el.offset().top }, 400, 'swing', function() {
18 | location.hash = elScrollTo;
19 | });
20 | }
21 | $('li', self).removeClass(activeClassName);
22 | $(e.target).parent().addClass(activeClassName);
23 | };
24 |
25 | //highlight on scroll
26 | var timeout;
27 | var highlightOnScroll = function(e) {
28 | if (timeout) {
29 | clearTimeout(timeout);
30 | }
31 | timeout = setTimeout(function() {
32 | var top = $(window).scrollTop(),
33 | highlighted;
34 | for (var i = 0, c = headingOffsets.length; i < c; i++) {
35 | if (headingOffsets[i] >= top) {
36 | $('li', self).removeClass(activeClassName);
37 | highlighted = $('li:eq('+(i-1)+')', self).addClass(activeClassName);
38 | opts.onHighlight(highlighted);
39 | break;
40 | }
41 | }
42 | }, 50);
43 | };
44 | if (opts.highlightOnScroll) {
45 | $(window).bind('scroll', highlightOnScroll);
46 | highlightOnScroll();
47 | }
48 |
49 | return this.each(function() {
50 | //build TOC
51 | var el = $(this);
52 | var ul = $('
');
53 | headings.each(function(i, heading) {
54 | var $h = $(heading);
55 | headingOffsets.push($h.offset().top - opts.highlightOffset);
56 |
57 | //add anchor
58 | var anchor = $(' ').attr('id', opts.anchorName(i, heading, opts.prefix)).insertBefore($h);
59 |
60 | //build TOC item
61 | var a = $(' ')
62 | .text(opts.headerText(i, heading, $h))
63 | .attr('href', '#' + opts.anchorName(i, heading, opts.prefix))
64 | .bind('click', function(e) {
65 | scrollTo(e);
66 | el.trigger('selected', $(this).attr('href'));
67 | });
68 |
69 | var li = $(' ')
70 | .addClass(opts.itemClass(i, heading, $h, opts.prefix))
71 | .append(a);
72 |
73 | ul.append(li);
74 | });
75 | el.html(ul);
76 | });
77 | };
78 |
79 |
80 | jQuery.fn.toc.defaults = {
81 | container: 'body',
82 | selectors: 'h1,h2,h3',
83 | smoothScrolling: true,
84 | prefix: 'toc',
85 | onHighlight: function() {},
86 | highlightOnScroll: true,
87 | highlightOffset: 100,
88 | anchorName: function(i, heading, prefix) {
89 | return prefix+i;
90 | },
91 | headerText: function(i, heading, $heading) {
92 | return $heading.text();
93 | },
94 | itemClass: function(i, heading, $heading, prefix) {
95 | return prefix + '-' + $heading[0].tagName.toLowerCase();
96 | }
97 |
98 | };
99 |
100 | })(jQuery);
101 |
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.1/scripts/toc.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | $.fn.toc = function(options) {
3 | var self = this;
4 | var opts = $.extend({}, jQuery.fn.toc.defaults, options);
5 |
6 | var container = $(opts.container);
7 | var headings = $(opts.selectors, container);
8 | var headingOffsets = [];
9 | var activeClassName = opts.prefix+'-active';
10 |
11 | var scrollTo = function(e) {
12 | if (opts.smoothScrolling) {
13 | e.preventDefault();
14 | var elScrollTo = $(e.target).attr('href');
15 | var $el = $(elScrollTo);
16 |
17 | $('body,html').animate({ scrollTop: $el.offset().top }, 400, 'swing', function() {
18 | location.hash = elScrollTo;
19 | });
20 | }
21 | $('li', self).removeClass(activeClassName);
22 | $(e.target).parent().addClass(activeClassName);
23 | };
24 |
25 | //highlight on scroll
26 | var timeout;
27 | var highlightOnScroll = function(e) {
28 | if (timeout) {
29 | clearTimeout(timeout);
30 | }
31 | timeout = setTimeout(function() {
32 | var top = $(window).scrollTop(),
33 | highlighted;
34 | for (var i = 0, c = headingOffsets.length; i < c; i++) {
35 | if (headingOffsets[i] >= top) {
36 | $('li', self).removeClass(activeClassName);
37 | highlighted = $('li:eq('+(i-1)+')', self).addClass(activeClassName);
38 | opts.onHighlight(highlighted);
39 | break;
40 | }
41 | }
42 | }, 50);
43 | };
44 | if (opts.highlightOnScroll) {
45 | $(window).bind('scroll', highlightOnScroll);
46 | highlightOnScroll();
47 | }
48 |
49 | return this.each(function() {
50 | //build TOC
51 | var el = $(this);
52 | var ul = $('');
53 | headings.each(function(i, heading) {
54 | var $h = $(heading);
55 | headingOffsets.push($h.offset().top - opts.highlightOffset);
56 |
57 | //add anchor
58 | var anchor = $(' ').attr('id', opts.anchorName(i, heading, opts.prefix)).insertBefore($h);
59 |
60 | //build TOC item
61 | var a = $(' ')
62 | .text(opts.headerText(i, heading, $h))
63 | .attr('href', '#' + opts.anchorName(i, heading, opts.prefix))
64 | .bind('click', function(e) {
65 | scrollTo(e);
66 | el.trigger('selected', $(this).attr('href'));
67 | });
68 |
69 | var li = $(' ')
70 | .addClass(opts.itemClass(i, heading, $h, opts.prefix))
71 | .append(a);
72 |
73 | ul.append(li);
74 | });
75 | el.html(ul);
76 | });
77 | };
78 |
79 |
80 | jQuery.fn.toc.defaults = {
81 | container: 'body',
82 | selectors: 'h1,h2,h3',
83 | smoothScrolling: true,
84 | prefix: 'toc',
85 | onHighlight: function() {},
86 | highlightOnScroll: true,
87 | highlightOffset: 100,
88 | anchorName: function(i, heading, prefix) {
89 | return prefix+i;
90 | },
91 | headerText: function(i, heading, $heading) {
92 | return $heading.text();
93 | },
94 | itemClass: function(i, heading, $heading, prefix) {
95 | return prefix + '-' + $heading[0].tagName.toLowerCase();
96 | }
97 |
98 | };
99 |
100 | })(jQuery);
101 |
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.2.0/scripts/toc.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | $.fn.toc = function(options) {
3 | var self = this;
4 | var opts = $.extend({}, jQuery.fn.toc.defaults, options);
5 |
6 | var container = $(opts.container);
7 | var headings = $(opts.selectors, container);
8 | var headingOffsets = [];
9 | var activeClassName = opts.prefix+'-active';
10 |
11 | var scrollTo = function(e) {
12 | if (opts.smoothScrolling) {
13 | e.preventDefault();
14 | var elScrollTo = $(e.target).attr('href');
15 | var $el = $(elScrollTo);
16 |
17 | $('body,html').animate({ scrollTop: $el.offset().top }, 400, 'swing', function() {
18 | location.hash = elScrollTo;
19 | });
20 | }
21 | $('li', self).removeClass(activeClassName);
22 | $(e.target).parent().addClass(activeClassName);
23 | };
24 |
25 | //highlight on scroll
26 | var timeout;
27 | var highlightOnScroll = function(e) {
28 | if (timeout) {
29 | clearTimeout(timeout);
30 | }
31 | timeout = setTimeout(function() {
32 | var top = $(window).scrollTop(),
33 | highlighted;
34 | for (var i = 0, c = headingOffsets.length; i < c; i++) {
35 | if (headingOffsets[i] >= top) {
36 | $('li', self).removeClass(activeClassName);
37 | highlighted = $('li:eq('+(i-1)+')', self).addClass(activeClassName);
38 | opts.onHighlight(highlighted);
39 | break;
40 | }
41 | }
42 | }, 50);
43 | };
44 | if (opts.highlightOnScroll) {
45 | $(window).bind('scroll', highlightOnScroll);
46 | highlightOnScroll();
47 | }
48 |
49 | return this.each(function() {
50 | //build TOC
51 | var el = $(this);
52 | var ul = $('');
53 | headings.each(function(i, heading) {
54 | var $h = $(heading);
55 | headingOffsets.push($h.offset().top - opts.highlightOffset);
56 |
57 | //add anchor
58 | var anchor = $(' ').attr('id', opts.anchorName(i, heading, opts.prefix)).insertBefore($h);
59 |
60 | //build TOC item
61 | var a = $(' ')
62 | .text(opts.headerText(i, heading, $h))
63 | .attr('href', '#' + opts.anchorName(i, heading, opts.prefix))
64 | .bind('click', function(e) {
65 | scrollTo(e);
66 | el.trigger('selected', $(this).attr('href'));
67 | });
68 |
69 | var li = $(' ')
70 | .addClass(opts.itemClass(i, heading, $h, opts.prefix))
71 | .append(a);
72 |
73 | ul.append(li);
74 | });
75 | el.html(ul);
76 | });
77 | };
78 |
79 |
80 | jQuery.fn.toc.defaults = {
81 | container: 'body',
82 | selectors: 'h1,h2,h3',
83 | smoothScrolling: true,
84 | prefix: 'toc',
85 | onHighlight: function() {},
86 | highlightOnScroll: true,
87 | highlightOffset: 100,
88 | anchorName: function(i, heading, prefix) {
89 | return prefix+i;
90 | },
91 | headerText: function(i, heading, $heading) {
92 | return $heading.text();
93 | },
94 | itemClass: function(i, heading, $heading, prefix) {
95 | return prefix + '-' + $heading[0].tagName.toLowerCase();
96 | }
97 |
98 | };
99 |
100 | })(jQuery);
101 |
--------------------------------------------------------------------------------
/dist/NaiveBayesClassifier-min.js:
--------------------------------------------------------------------------------
1 | !function(e,r){"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?module.exports=r():e.NaiveBayesClassifier=r()}(this,function(){"use strict";var e=function(r){this.VERSION=e.VERSION;var o=function(e){var r=new RegExp(/[^\w\s]/g),o=e.replace(r," ").toLowerCase();return o.split(/\s+/)};if(this.options={},r){if("object"!=typeof r||Array.isArray(r))throw new TypeError("NaiveBayesClassifier got invalid `options`: `"+r+"`. Please pass in an object.");this.options=r}this.tokenizer=this.options.tokenizer||o,this.vocabulary={},this.vocabularySize=0,this.categories={},this.docFrequencyCount={},this.totalNumberOfDocuments=0,this.wordFrequencyCount={},this.wordCount={}};return e.VERSION="0.2.0",e.withClassifier=function(r){var o="The classifier provided is not of the correct type or has been corrupted.";if("object"!=typeof r||Array.isArray(r))throw new TypeError(o);var t=new e(r.options);if("object"!=typeof r.vocabulary||Array.isArray(r.vocabulary))throw new TypeError(o+" Please check `classifier.vocabulary`:"+r.vocabulary);if(Object.keys(r.vocabulary).forEach(function(e){t.addWordToVocabulary(e)}),"object"!=typeof r.categories||Array.isArray(r.categories))throw new TypeError(o+" Please check `classifier.categories`:"+r.categories);if(Object.keys(r.categories).forEach(function(e){t.getOrCreateCategory(e)}),"object"!=typeof r.docFrequencyCount||Array.isArray(r.docFrequencyCount))throw new TypeError(o+" Please check `classifier.docFrequencyCount`:"+r.docFrequencyCount);if(t.docFrequencyCount=r.docFrequencyCount,"number"!=typeof r.totalNumberOfDocuments||r.totalNumberOfDocuments<0)throw new TypeError(o+" Please check `classifier.totalNumberOfDocuments`:"+r.totalNumberOfDocuments);if(t.totalNumberOfDocuments=r.totalNumberOfDocuments,"object"!=typeof r.wordFrequencyCount||Array.isArray(r.wordFrequencyCount))throw new TypeError(o+" Please check `classifier.wordFrequencyCount`:"+r.wordFrequencyCount);if(t.wordFrequencyCount=r.wordFrequencyCount,"object"!=typeof r.wordCount||Array.isArray(r.wordCount))throw new TypeError(o+" Please check `classifier.wordCount`:"+r.wordCount);if(t.wordCount=r.wordCount,"number"!=typeof parseFloat(r.VERSION)||"number"!=typeof parseFloat(e.VERSION)||parseFloat(r.VERSION)!==parseFloat(e.VERSION))throw new Error("The classifier provided has a (major.minor) version number:"+r.VERSION+" that is different to the library's current version number:"+e.VERSION);return t},e.prototype.addWordToVocabulary=function(e){this.vocabulary[e]||(this.vocabulary[e]=!0,this.vocabularySize+=1)},e.prototype.getOrCreateCategory=function(e){if(!e||"string"!=typeof e)throw new TypeError("Category creator got invalid category name: `"+e+"`. Please pass in a String.");return this.categories[e]||(this.docFrequencyCount[e]=0,this.wordFrequencyCount[e]={},this.wordCount[e]=0,this.categories[e]=!0),this.categories[e]?e:void 0},e.prototype.frequencyTable=function(e){var r={};return e.forEach(function(e){r[e]?r[e]+=1:r[e]=1}),r},e.prototype.learn=function(e,r){var o=this;r=o.getOrCreateCategory(r),o.docFrequencyCount[r]+=1,o.totalNumberOfDocuments+=1;var t=o.tokenizer(e),n=o.frequencyTable(t);return Object.keys(n).forEach(function(e){o.addWordToVocabulary(e);var t=n[e];o.wordFrequencyCount[r][e]?o.wordFrequencyCount[r][e]+=t:o.wordFrequencyCount[r][e]=t,o.wordCount[r]+=t}),o},e.prototype.tokenProbability=function(e,r){var o=this.wordFrequencyCount[r][e]||0,t=this.wordCount[r];return(o+1)/(t+this.vocabularySize)},e.prototype.categorize=function(e){var r=this,o=-(1/0),t=0,n={},a={},i=r.tokenizer(e),c=r.frequencyTable(i);return Object.keys(r.categories).forEach(function(e){if(r.categories[e]){var i=r.docFrequencyCount[e]/r.totalNumberOfDocuments,u=Math.log(i);Object.keys(c).forEach(function(o){var t=r.tokenProbability(o,e);u+=Math.log(t)*c[o]}),i=Math.exp(u),t+=i,u>o&&(o=u,n={category:e,probability:i}),a[e]=i}}),Object.keys(a).forEach(function(e){a[e]/=t}),{category:n.category||"unclassified",probability:(n.probability/=t)||-(1/0),categories:a}},e});
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.0/scripts/bootstrap-tab.js:
--------------------------------------------------------------------------------
1 | /* ========================================================
2 | * bootstrap-tab.js v2.3.0
3 | * http://twitter.github.com/bootstrap/javascript.html#tabs
4 | * ========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ======================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* TAB CLASS DEFINITION
27 | * ==================== */
28 |
29 | var Tab = function (element) {
30 | this.element = $(element)
31 | }
32 |
33 | Tab.prototype = {
34 |
35 | constructor: Tab
36 |
37 | , show: function () {
38 | var $this = this.element
39 | , $ul = $this.closest('ul:not(.dropdown-menu)')
40 | , selector = $this.attr('data-target')
41 | , previous
42 | , $target
43 | , e
44 |
45 | if (!selector) {
46 | selector = $this.attr('href')
47 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
48 | }
49 |
50 | if ( $this.parent('li').hasClass('active') ) return
51 |
52 | previous = $ul.find('.active:last a')[0]
53 |
54 | e = $.Event('show', {
55 | relatedTarget: previous
56 | })
57 |
58 | $this.trigger(e)
59 |
60 | if (e.isDefaultPrevented()) return
61 |
62 | $target = $(selector)
63 |
64 | this.activate($this.parent('li'), $ul)
65 | this.activate($target, $target.parent(), function () {
66 | $this.trigger({
67 | type: 'shown'
68 | , relatedTarget: previous
69 | })
70 | })
71 | }
72 |
73 | , activate: function ( element, container, callback) {
74 | var $active = container.find('> .active')
75 | , transition = callback
76 | && $.support.transition
77 | && $active.hasClass('fade')
78 |
79 | function next() {
80 | $active
81 | .removeClass('active')
82 | .find('> .dropdown-menu > .active')
83 | .removeClass('active')
84 |
85 | element.addClass('active')
86 |
87 | if (transition) {
88 | element[0].offsetWidth // reflow for transition
89 | element.addClass('in')
90 | } else {
91 | element.removeClass('fade')
92 | }
93 |
94 | if ( element.parent('.dropdown-menu') ) {
95 | element.closest('li.dropdown').addClass('active')
96 | }
97 |
98 | callback && callback()
99 | }
100 |
101 | transition ?
102 | $active.one($.support.transition.end, next) :
103 | next()
104 |
105 | $active.removeClass('in')
106 | }
107 | }
108 |
109 |
110 | /* TAB PLUGIN DEFINITION
111 | * ===================== */
112 |
113 | var old = $.fn.tab
114 |
115 | $.fn.tab = function ( option ) {
116 | return this.each(function () {
117 | var $this = $(this)
118 | , data = $this.data('tab')
119 | if (!data) $this.data('tab', (data = new Tab(this)))
120 | if (typeof option == 'string') data[option]()
121 | })
122 | }
123 |
124 | $.fn.tab.Constructor = Tab
125 |
126 |
127 | /* TAB NO CONFLICT
128 | * =============== */
129 |
130 | $.fn.tab.noConflict = function () {
131 | $.fn.tab = old
132 | return this
133 | }
134 |
135 |
136 | /* TAB DATA-API
137 | * ============ */
138 |
139 | $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
140 | e.preventDefault()
141 | $(this).tab('show')
142 | })
143 |
144 | }(window.jQuery);
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.1/scripts/bootstrap-tab.js:
--------------------------------------------------------------------------------
1 | /* ========================================================
2 | * bootstrap-tab.js v2.3.0
3 | * http://twitter.github.com/bootstrap/javascript.html#tabs
4 | * ========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ======================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* TAB CLASS DEFINITION
27 | * ==================== */
28 |
29 | var Tab = function (element) {
30 | this.element = $(element)
31 | }
32 |
33 | Tab.prototype = {
34 |
35 | constructor: Tab
36 |
37 | , show: function () {
38 | var $this = this.element
39 | , $ul = $this.closest('ul:not(.dropdown-menu)')
40 | , selector = $this.attr('data-target')
41 | , previous
42 | , $target
43 | , e
44 |
45 | if (!selector) {
46 | selector = $this.attr('href')
47 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
48 | }
49 |
50 | if ( $this.parent('li').hasClass('active') ) return
51 |
52 | previous = $ul.find('.active:last a')[0]
53 |
54 | e = $.Event('show', {
55 | relatedTarget: previous
56 | })
57 |
58 | $this.trigger(e)
59 |
60 | if (e.isDefaultPrevented()) return
61 |
62 | $target = $(selector)
63 |
64 | this.activate($this.parent('li'), $ul)
65 | this.activate($target, $target.parent(), function () {
66 | $this.trigger({
67 | type: 'shown'
68 | , relatedTarget: previous
69 | })
70 | })
71 | }
72 |
73 | , activate: function ( element, container, callback) {
74 | var $active = container.find('> .active')
75 | , transition = callback
76 | && $.support.transition
77 | && $active.hasClass('fade')
78 |
79 | function next() {
80 | $active
81 | .removeClass('active')
82 | .find('> .dropdown-menu > .active')
83 | .removeClass('active')
84 |
85 | element.addClass('active')
86 |
87 | if (transition) {
88 | element[0].offsetWidth // reflow for transition
89 | element.addClass('in')
90 | } else {
91 | element.removeClass('fade')
92 | }
93 |
94 | if ( element.parent('.dropdown-menu') ) {
95 | element.closest('li.dropdown').addClass('active')
96 | }
97 |
98 | callback && callback()
99 | }
100 |
101 | transition ?
102 | $active.one($.support.transition.end, next) :
103 | next()
104 |
105 | $active.removeClass('in')
106 | }
107 | }
108 |
109 |
110 | /* TAB PLUGIN DEFINITION
111 | * ===================== */
112 |
113 | var old = $.fn.tab
114 |
115 | $.fn.tab = function ( option ) {
116 | return this.each(function () {
117 | var $this = $(this)
118 | , data = $this.data('tab')
119 | if (!data) $this.data('tab', (data = new Tab(this)))
120 | if (typeof option == 'string') data[option]()
121 | })
122 | }
123 |
124 | $.fn.tab.Constructor = Tab
125 |
126 |
127 | /* TAB NO CONFLICT
128 | * =============== */
129 |
130 | $.fn.tab.noConflict = function () {
131 | $.fn.tab = old
132 | return this
133 | }
134 |
135 |
136 | /* TAB DATA-API
137 | * ============ */
138 |
139 | $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
140 | e.preventDefault()
141 | $(this).tab('show')
142 | })
143 |
144 | }(window.jQuery);
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.2.0/scripts/bootstrap-tab.js:
--------------------------------------------------------------------------------
1 | /* ========================================================
2 | * bootstrap-tab.js v2.3.0
3 | * http://twitter.github.com/bootstrap/javascript.html#tabs
4 | * ========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ======================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* TAB CLASS DEFINITION
27 | * ==================== */
28 |
29 | var Tab = function (element) {
30 | this.element = $(element)
31 | }
32 |
33 | Tab.prototype = {
34 |
35 | constructor: Tab
36 |
37 | , show: function () {
38 | var $this = this.element
39 | , $ul = $this.closest('ul:not(.dropdown-menu)')
40 | , selector = $this.attr('data-target')
41 | , previous
42 | , $target
43 | , e
44 |
45 | if (!selector) {
46 | selector = $this.attr('href')
47 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
48 | }
49 |
50 | if ( $this.parent('li').hasClass('active') ) return
51 |
52 | previous = $ul.find('.active:last a')[0]
53 |
54 | e = $.Event('show', {
55 | relatedTarget: previous
56 | })
57 |
58 | $this.trigger(e)
59 |
60 | if (e.isDefaultPrevented()) return
61 |
62 | $target = $(selector)
63 |
64 | this.activate($this.parent('li'), $ul)
65 | this.activate($target, $target.parent(), function () {
66 | $this.trigger({
67 | type: 'shown'
68 | , relatedTarget: previous
69 | })
70 | })
71 | }
72 |
73 | , activate: function ( element, container, callback) {
74 | var $active = container.find('> .active')
75 | , transition = callback
76 | && $.support.transition
77 | && $active.hasClass('fade')
78 |
79 | function next() {
80 | $active
81 | .removeClass('active')
82 | .find('> .dropdown-menu > .active')
83 | .removeClass('active')
84 |
85 | element.addClass('active')
86 |
87 | if (transition) {
88 | element[0].offsetWidth // reflow for transition
89 | element.addClass('in')
90 | } else {
91 | element.removeClass('fade')
92 | }
93 |
94 | if ( element.parent('.dropdown-menu') ) {
95 | element.closest('li.dropdown').addClass('active')
96 | }
97 |
98 | callback && callback()
99 | }
100 |
101 | transition ?
102 | $active.one($.support.transition.end, next) :
103 | next()
104 |
105 | $active.removeClass('in')
106 | }
107 | }
108 |
109 |
110 | /* TAB PLUGIN DEFINITION
111 | * ===================== */
112 |
113 | var old = $.fn.tab
114 |
115 | $.fn.tab = function ( option ) {
116 | return this.each(function () {
117 | var $this = $(this)
118 | , data = $this.data('tab')
119 | if (!data) $this.data('tab', (data = new Tab(this)))
120 | if (typeof option == 'string') data[option]()
121 | })
122 | }
123 |
124 | $.fn.tab.Constructor = Tab
125 |
126 |
127 | /* TAB NO CONFLICT
128 | * =============== */
129 |
130 | $.fn.tab.noConflict = function () {
131 | $.fn.tab = old
132 | return this
133 | }
134 |
135 |
136 | /* TAB DATA-API
137 | * ============ */
138 |
139 | $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
140 | e.preventDefault()
141 | $(this).tab('show')
142 | })
143 |
144 | }(window.jQuery);
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.0/classes.list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | NaiveBayesClassifier Classes
7 |
8 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
Classes
52 |
53 |
54 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 | Classes
112 |
113 |
114 | NaiveBayesClassifier
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 | Copyright (C) 2015, Hadi Michael. All rights reserved.
143 |
144 |
145 |
146 |
147 | Documentation generated by JSDoc 3.2.2
148 | on Sun, May 17th, 2015 using the DocStrap template .
150 |
151 |
152 |
153 |
154 |
155 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.1/classes.list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | NaiveBayesClassifier Classes
7 |
8 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
Classes
52 |
53 |
54 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 | Classes
112 |
113 |
114 | NaiveBayesClassifier
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 | Copyright (C) 2015, Hadi Michael. All rights reserved.
143 |
144 |
145 |
146 |
147 | Documentation generated by JSDoc 3.2.2
148 | on Sun, May 17th, 2015 using the DocStrap template .
150 |
151 |
152 |
153 |
154 |
155 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.2.0/classes.list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | NaiveBayesClassifier Classes
7 |
8 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
Classes
52 |
53 |
54 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 | Classes
112 |
113 |
114 | NaiveBayesClassifier
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 | Copyright (C) 2015, Hadi Michael. All rights reserved.
143 |
144 |
145 |
146 |
147 | Documentation generated by JSDoc 3.2.2
148 | on Fri, May 29th, 2015 using the DocStrap template .
150 |
151 |
152 |
153 |
154 |
155 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.0/scripts/bootstrap-dropdown.js:
--------------------------------------------------------------------------------
1 | /* ============================================================
2 | * bootstrap-dropdown.js v2.3.2
3 | * http://getbootstrap.com/2.3.2/javascript.html#dropdowns
4 | * ============================================================
5 | * Copyright 2013 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ============================================================ */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* DROPDOWN CLASS DEFINITION
27 | * ========================= */
28 |
29 | var toggle = '[data-toggle=dropdown]'
30 | , Dropdown = function (element) {
31 | var $el = $(element).on('click.dropdown.data-api', this.toggle)
32 | $('html').on('click.dropdown.data-api', function () {
33 | $el.parent().removeClass('open')
34 | })
35 | }
36 |
37 | Dropdown.prototype = {
38 |
39 | constructor: Dropdown
40 |
41 | , toggle: function (e) {
42 | var $this = $(this)
43 | , $parent
44 | , isActive
45 |
46 | if ($this.is('.disabled, :disabled')) return
47 |
48 | $parent = getParent($this)
49 |
50 | isActive = $parent.hasClass('open')
51 |
52 | clearMenus()
53 |
54 | if (!isActive) {
55 | if ('ontouchstart' in document.documentElement) {
56 | // if mobile we we use a backdrop because click events don't delegate
57 | $('
').insertBefore($(this)).on('click', clearMenus)
58 | }
59 | $parent.toggleClass('open')
60 | }
61 |
62 | $this.focus()
63 |
64 | return false
65 | }
66 |
67 | , keydown: function (e) {
68 | var $this
69 | , $items
70 | , $active
71 | , $parent
72 | , isActive
73 | , index
74 |
75 | if (!/(38|40|27)/.test(e.keyCode)) return
76 |
77 | $this = $(this)
78 |
79 | e.preventDefault()
80 | e.stopPropagation()
81 |
82 | if ($this.is('.disabled, :disabled')) return
83 |
84 | $parent = getParent($this)
85 |
86 | isActive = $parent.hasClass('open')
87 |
88 | if (!isActive || (isActive && e.keyCode == 27)) {
89 | if (e.which == 27) $parent.find(toggle).focus()
90 | return $this.click()
91 | }
92 |
93 | $items = $('[role=menu] li:not(.divider):visible a', $parent)
94 |
95 | if (!$items.length) return
96 |
97 | index = $items.index($items.filter(':focus'))
98 |
99 | if (e.keyCode == 38 && index > 0) index-- // up
100 | if (e.keyCode == 40 && index < $items.length - 1) index++ // down
101 | if (!~index) index = 0
102 |
103 | $items
104 | .eq(index)
105 | .focus()
106 | }
107 |
108 | }
109 |
110 | function clearMenus() {
111 | $('.dropdown-backdrop').remove()
112 | $(toggle).each(function () {
113 | getParent($(this)).removeClass('open')
114 | })
115 | }
116 |
117 | function getParent($this) {
118 | var selector = $this.attr('data-target')
119 | , $parent
120 |
121 | if (!selector) {
122 | selector = $this.attr('href')
123 | selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
124 | }
125 |
126 | $parent = selector && $(selector)
127 |
128 | if (!$parent || !$parent.length) $parent = $this.parent()
129 |
130 | return $parent
131 | }
132 |
133 |
134 | /* DROPDOWN PLUGIN DEFINITION
135 | * ========================== */
136 |
137 | var old = $.fn.dropdown
138 |
139 | $.fn.dropdown = function (option) {
140 | return this.each(function () {
141 | var $this = $(this)
142 | , data = $this.data('dropdown')
143 | if (!data) $this.data('dropdown', (data = new Dropdown(this)))
144 | if (typeof option == 'string') data[option].call($this)
145 | })
146 | }
147 |
148 | $.fn.dropdown.Constructor = Dropdown
149 |
150 |
151 | /* DROPDOWN NO CONFLICT
152 | * ==================== */
153 |
154 | $.fn.dropdown.noConflict = function () {
155 | $.fn.dropdown = old
156 | return this
157 | }
158 |
159 |
160 | /* APPLY TO STANDARD DROPDOWN ELEMENTS
161 | * =================================== */
162 |
163 | $(document)
164 | .on('click.dropdown.data-api', clearMenus)
165 | .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
166 | .on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
167 | .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
168 |
169 | }(window.jQuery);
170 |
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.1/scripts/bootstrap-dropdown.js:
--------------------------------------------------------------------------------
1 | /* ============================================================
2 | * bootstrap-dropdown.js v2.3.2
3 | * http://getbootstrap.com/2.3.2/javascript.html#dropdowns
4 | * ============================================================
5 | * Copyright 2013 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ============================================================ */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* DROPDOWN CLASS DEFINITION
27 | * ========================= */
28 |
29 | var toggle = '[data-toggle=dropdown]'
30 | , Dropdown = function (element) {
31 | var $el = $(element).on('click.dropdown.data-api', this.toggle)
32 | $('html').on('click.dropdown.data-api', function () {
33 | $el.parent().removeClass('open')
34 | })
35 | }
36 |
37 | Dropdown.prototype = {
38 |
39 | constructor: Dropdown
40 |
41 | , toggle: function (e) {
42 | var $this = $(this)
43 | , $parent
44 | , isActive
45 |
46 | if ($this.is('.disabled, :disabled')) return
47 |
48 | $parent = getParent($this)
49 |
50 | isActive = $parent.hasClass('open')
51 |
52 | clearMenus()
53 |
54 | if (!isActive) {
55 | if ('ontouchstart' in document.documentElement) {
56 | // if mobile we we use a backdrop because click events don't delegate
57 | $('
').insertBefore($(this)).on('click', clearMenus)
58 | }
59 | $parent.toggleClass('open')
60 | }
61 |
62 | $this.focus()
63 |
64 | return false
65 | }
66 |
67 | , keydown: function (e) {
68 | var $this
69 | , $items
70 | , $active
71 | , $parent
72 | , isActive
73 | , index
74 |
75 | if (!/(38|40|27)/.test(e.keyCode)) return
76 |
77 | $this = $(this)
78 |
79 | e.preventDefault()
80 | e.stopPropagation()
81 |
82 | if ($this.is('.disabled, :disabled')) return
83 |
84 | $parent = getParent($this)
85 |
86 | isActive = $parent.hasClass('open')
87 |
88 | if (!isActive || (isActive && e.keyCode == 27)) {
89 | if (e.which == 27) $parent.find(toggle).focus()
90 | return $this.click()
91 | }
92 |
93 | $items = $('[role=menu] li:not(.divider):visible a', $parent)
94 |
95 | if (!$items.length) return
96 |
97 | index = $items.index($items.filter(':focus'))
98 |
99 | if (e.keyCode == 38 && index > 0) index-- // up
100 | if (e.keyCode == 40 && index < $items.length - 1) index++ // down
101 | if (!~index) index = 0
102 |
103 | $items
104 | .eq(index)
105 | .focus()
106 | }
107 |
108 | }
109 |
110 | function clearMenus() {
111 | $('.dropdown-backdrop').remove()
112 | $(toggle).each(function () {
113 | getParent($(this)).removeClass('open')
114 | })
115 | }
116 |
117 | function getParent($this) {
118 | var selector = $this.attr('data-target')
119 | , $parent
120 |
121 | if (!selector) {
122 | selector = $this.attr('href')
123 | selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
124 | }
125 |
126 | $parent = selector && $(selector)
127 |
128 | if (!$parent || !$parent.length) $parent = $this.parent()
129 |
130 | return $parent
131 | }
132 |
133 |
134 | /* DROPDOWN PLUGIN DEFINITION
135 | * ========================== */
136 |
137 | var old = $.fn.dropdown
138 |
139 | $.fn.dropdown = function (option) {
140 | return this.each(function () {
141 | var $this = $(this)
142 | , data = $this.data('dropdown')
143 | if (!data) $this.data('dropdown', (data = new Dropdown(this)))
144 | if (typeof option == 'string') data[option].call($this)
145 | })
146 | }
147 |
148 | $.fn.dropdown.Constructor = Dropdown
149 |
150 |
151 | /* DROPDOWN NO CONFLICT
152 | * ==================== */
153 |
154 | $.fn.dropdown.noConflict = function () {
155 | $.fn.dropdown = old
156 | return this
157 | }
158 |
159 |
160 | /* APPLY TO STANDARD DROPDOWN ELEMENTS
161 | * =================================== */
162 |
163 | $(document)
164 | .on('click.dropdown.data-api', clearMenus)
165 | .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
166 | .on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
167 | .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
168 |
169 | }(window.jQuery);
170 |
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.2.0/scripts/bootstrap-dropdown.js:
--------------------------------------------------------------------------------
1 | /* ============================================================
2 | * bootstrap-dropdown.js v2.3.2
3 | * http://getbootstrap.com/2.3.2/javascript.html#dropdowns
4 | * ============================================================
5 | * Copyright 2013 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ============================================================ */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* DROPDOWN CLASS DEFINITION
27 | * ========================= */
28 |
29 | var toggle = '[data-toggle=dropdown]'
30 | , Dropdown = function (element) {
31 | var $el = $(element).on('click.dropdown.data-api', this.toggle)
32 | $('html').on('click.dropdown.data-api', function () {
33 | $el.parent().removeClass('open')
34 | })
35 | }
36 |
37 | Dropdown.prototype = {
38 |
39 | constructor: Dropdown
40 |
41 | , toggle: function (e) {
42 | var $this = $(this)
43 | , $parent
44 | , isActive
45 |
46 | if ($this.is('.disabled, :disabled')) return
47 |
48 | $parent = getParent($this)
49 |
50 | isActive = $parent.hasClass('open')
51 |
52 | clearMenus()
53 |
54 | if (!isActive) {
55 | if ('ontouchstart' in document.documentElement) {
56 | // if mobile we we use a backdrop because click events don't delegate
57 | $('
').insertBefore($(this)).on('click', clearMenus)
58 | }
59 | $parent.toggleClass('open')
60 | }
61 |
62 | $this.focus()
63 |
64 | return false
65 | }
66 |
67 | , keydown: function (e) {
68 | var $this
69 | , $items
70 | , $active
71 | , $parent
72 | , isActive
73 | , index
74 |
75 | if (!/(38|40|27)/.test(e.keyCode)) return
76 |
77 | $this = $(this)
78 |
79 | e.preventDefault()
80 | e.stopPropagation()
81 |
82 | if ($this.is('.disabled, :disabled')) return
83 |
84 | $parent = getParent($this)
85 |
86 | isActive = $parent.hasClass('open')
87 |
88 | if (!isActive || (isActive && e.keyCode == 27)) {
89 | if (e.which == 27) $parent.find(toggle).focus()
90 | return $this.click()
91 | }
92 |
93 | $items = $('[role=menu] li:not(.divider):visible a', $parent)
94 |
95 | if (!$items.length) return
96 |
97 | index = $items.index($items.filter(':focus'))
98 |
99 | if (e.keyCode == 38 && index > 0) index-- // up
100 | if (e.keyCode == 40 && index < $items.length - 1) index++ // down
101 | if (!~index) index = 0
102 |
103 | $items
104 | .eq(index)
105 | .focus()
106 | }
107 |
108 | }
109 |
110 | function clearMenus() {
111 | $('.dropdown-backdrop').remove()
112 | $(toggle).each(function () {
113 | getParent($(this)).removeClass('open')
114 | })
115 | }
116 |
117 | function getParent($this) {
118 | var selector = $this.attr('data-target')
119 | , $parent
120 |
121 | if (!selector) {
122 | selector = $this.attr('href')
123 | selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
124 | }
125 |
126 | $parent = selector && $(selector)
127 |
128 | if (!$parent || !$parent.length) $parent = $this.parent()
129 |
130 | return $parent
131 | }
132 |
133 |
134 | /* DROPDOWN PLUGIN DEFINITION
135 | * ========================== */
136 |
137 | var old = $.fn.dropdown
138 |
139 | $.fn.dropdown = function (option) {
140 | return this.each(function () {
141 | var $this = $(this)
142 | , data = $this.data('dropdown')
143 | if (!data) $this.data('dropdown', (data = new Dropdown(this)))
144 | if (typeof option == 'string') data[option].call($this)
145 | })
146 | }
147 |
148 | $.fn.dropdown.Constructor = Dropdown
149 |
150 |
151 | /* DROPDOWN NO CONFLICT
152 | * ==================== */
153 |
154 | $.fn.dropdown.noConflict = function () {
155 | $.fn.dropdown = old
156 | return this
157 | }
158 |
159 |
160 | /* APPLY TO STANDARD DROPDOWN ELEMENTS
161 | * =================================== */
162 |
163 | $(document)
164 | .on('click.dropdown.data-api', clearMenus)
165 | .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
166 | .on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
167 | .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
168 |
169 | }(window.jQuery);
170 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://travis-ci.org/hadimichael/NaiveBayesClassifier) [](https://gitter.im/hadimichael/NaiveBayesClassifier?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
2 |
3 | NaiveBayesClassifier is an implementation of a [Multinomial Naive-Bayes Classifier](http://en.wikipedia.org/wiki/Naive_Bayes_classifier#Multinomial_naive_Bayes) that uses [Laplace Smoothing](http://en.wikipedia.org/wiki/Additive_smoothing). It can take in a piece of text and tell you which category it most likely belongs to.
4 |
5 | **I haven't really touched this in a few years... maybe I'll come back to it one day.**
6 |
7 | # ~~v0.3.0 IS COMING SOON~~
8 | ~~I'm working on the [next version of NaiveBayesClassifer](https://github.com/hadimichael/NaiveBayesClassifier/tree/v0.3.0). Here are some of the new features that you can expect:~~
9 | - ~~✓ Reduced memory (heap) footprint by using Streams.~~
10 | - ~~✓ Refactor to ES2015 and use "more appropriate" data-structures.~~
11 | - ~~Optional persistence, probably using REDIS.~~
12 | - ~~Asynchronous learning and classifying, using Promises.~~
13 | - ~~Categorisation speed improvements, using parallelisation via WebWorkers.~~
14 | - ~~Official node/iojs, Chrome OS and Firefox OS support. Other browsers or short-lived apps should use a web-service.~~
15 |
16 | ## What is this good for?
17 |
18 | "In machine learning, naive Bayes classifiers are a family of simple probabilistic classifiers based on applying Bayes' theorem with strong (naive) independence assumptions between the features." - [Wikipedia: Naive Bayes classifier](http://en.wikipedia.org/wiki/Naive_Bayes_classifier).
19 |
20 | You can use this implementation for categorizing any text content into any arbitrary set of categories. For example:
21 |
22 | - is an email **spam**, or **not spam**?
23 | - is a news article about **technology**, **politics**, or **sports**?
24 | - is some piece of text **javascript** or **objective-c**?
25 | - is a tweet expressing **positive** sentiment or **negative** sentiment?
26 |
27 | Depending on your specific attributes and sample size, there may be other algorithms that are better suited: [Comparison of Classification Methods Based on the Type of Attributes and Sample Size](http://www4.ncsu.edu/~arezaei2/paper/JCIT4-184028_Camera%20Ready.pdf).
28 |
29 | # Try it now
30 |
31 | You can experiment, test and play with `NaiveBayesClassifier` in your browser at [http://jsbin.com/xixuga/1/edit?html,js,console](http://jsbin.com/xixuga/1/edit?html,js,console)
32 |
33 | If you would like to try `NaiveBayesClassifier` as a web-service, you can use: [http://nbcaas.herokuapp.com/](http://nbcaas.herokuapp.com/)
34 |
35 | # Installing `NaiveBayesClassifier`
36 |
37 | `NaiveBayesClassifier` is shipped in UMD format, meaning that it is available as a CommonJS/AMD module or browser global. You can install it using [`npm`](https://www.npmjs.com/):
38 |
39 | ```bash
40 | $ npm install naivebayesclassifier
41 | ```
42 |
43 | OR using [`bower`](http://bower.io/):
44 |
45 | ```bash
46 | $ bower install naivebayesclassifier
47 | ```
48 |
49 | # Basic Usage
50 |
51 | ## `new NaiveBayesClassifier([options])`
52 |
53 | Using the default tokenization function, which splits on spaces:
54 | ```js
55 | var NaiveBayesClassifier = require('NaiveBayesClassifier'),
56 | classifier = new NaiveBayesClassifier();
57 | ```
58 |
59 | Or with an optional custom tokenization function that you specify:
60 | ```js
61 | var NaiveBayesClassifier = require('NaiveBayesClassifier');
62 | var splitOnChar = function(text) {
63 | return text.split('');
64 | };
65 | var classifier = new NaiveBayesClassifier({ tokenizer: splitOnChar });
66 | ```
67 |
68 | ## `.withClassifier(classifier)`
69 |
70 | Recover an existing `classifier`, which you may have retrieved from a database or localstorage:
71 |
72 | ```js
73 | var NaiveBayesClassifier = require('NaiveBayesClassifier'),
74 | classifier = NaiveBayesClassifier.withClassifier(existingClassifier);
75 | ```
76 |
77 | ## `.learn(text, category)`
78 |
79 | Teach your classifier what `category` the `text` belongs to. The more you teach your classifier, the more reliable it becomes. It will use what it has learned to identify new documents that it hasn't seen before.
80 |
81 | ```js
82 | classifier.learn('amazing, awesome movie!! Yeah!!', 'positive');
83 | classifier.learn('terrible, shitty thing. Damn. Sucks!!', 'negative');
84 | classifier.learn('I dont really know what to make of this.', 'neutral');
85 | ```
86 |
87 | ## `.categorize(text)`
88 |
89 | ```js
90 | classifier.categorize('awesome, cool, amazing!! Yay.');
91 | ```
92 |
93 | This will return the most likely `category` it thinks `text` belongs to and its `probability`. Its judgement is based on what you have taught it with `.learn(text, category)`.
94 |
95 | ```json
96 | {
97 | "category": "positive",
98 | "probability": 0.7687012152002337,
99 | "categories":
100 | {
101 | "positive": 0.7687012152002337,
102 | "negative": 0.15669449587155299,
103 | "neutral": 0.07460428892821332
104 | }
105 | }
106 | ```
107 |
108 | ## Complete API Documentation
109 |
110 | If you would like to explore the full API, you can find auto-generated documentation at: [https://hadi.io/NaiveBayesClassifier](http://hadi.io/NaiveBayesClassifier/NaiveBayesClassifier.html).
111 |
112 | # Acknowledgements
113 |
114 | The theory and implementation used in this library is based on the [Stanford Natural Language Processing Coursera](https://www.coursera.org/course/nlp) class, by Professor Dan Jurafsky & Chris Manning.
115 |
116 | # License
117 |
118 | Copyright (C) 2015, Hadi Michael. All rights reserved.
119 |
120 | Licensed under [BSD-3-Clause](LICENSE)
121 |
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.0/UriInformation.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | NaiveBayesClassifier Class: UriInformation
7 |
8 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
Class: UriInformation
56 |
57 |
58 |
59 |
60 | UriInformation
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 | Properties:
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | Name
99 |
100 |
101 | Type
102 |
103 |
104 |
105 |
106 |
107 | Description
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 | hostName
117 |
118 |
119 |
120 |
121 |
122 | String
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 | portNumber
140 |
141 |
142 |
143 |
144 |
145 | Integer
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 | Copyright (C) 2015, Hadi Michael. All rights reserved.
241 |
242 |
243 |
244 |
245 | Documentation generated by JSDoc 3.2.2
246 | on Sat, May 16th, 2015 using the DocStrap template .
248 |
249 |
250 |
251 |
252 |
253 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.0/categorization.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | NaiveBayesClassifier Class: Categorization
7 |
8 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
Class: Categorization
56 |
57 |
58 |
59 |
60 | Categorization
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 | <private> new Categorization()
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 | Properties:
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | Name
99 |
100 |
101 | Type
102 |
103 |
104 |
105 |
106 |
107 | Description
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 | category
117 |
118 |
119 |
120 |
121 |
122 | String
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 | Category of “maximum a posteriori” (i.e. most likely category), or 'unclassified'
133 |
134 |
135 |
136 |
137 |
138 |
139 | probability
140 |
141 |
142 |
143 |
144 |
145 | Number
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 | The probablity for the category specified
156 |
157 |
158 |
159 |
160 |
161 |
162 | categories
163 |
164 |
165 |
166 |
167 |
168 | Object
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 | Hashmap of probabilities for each category
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 | Copyright (C) 2015, Hadi Michael. All rights reserved.
264 |
265 |
266 |
267 |
268 | Documentation generated by JSDoc 3.2.2
269 | on Sat, May 16th, 2015 using the DocStrap template .
271 |
272 |
273 |
274 |
275 |
276 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
--------------------------------------------------------------------------------
/test/NaiveBayesClassifier-test.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var assert = require('assert'),
4 | NaiveBayesClassifier = require('../dist/NaiveBayesClassifier');
5 |
6 | describe('new NaiveBayesClassifier()', function () {
7 | it('should not raise Errors when initialised with valid options (falsey or with an object).', function () {
8 | var validOptionsCases = [ null, undefined, {} ];
9 |
10 | validOptionsCases.forEach(function (validOptions) {
11 | var classifier = new NaiveBayesClassifier(validOptions);
12 | assert.deepEqual(classifier.options, {});
13 | });
14 | });
15 |
16 | it('should raise a TypeError when initialised with invalid options (truthy and not object).', function () {
17 | var invalidOptions = [ true, 1, 'a', [], function(){} ];
18 |
19 | invalidOptions.forEach(function (invalidOption) {
20 | assert.throws(function () { new NaiveBayesClassifier(invalidOption); }, Error);
21 | assert.throws(function () { new NaiveBayesClassifier(invalidOption); }, TypeError); // check that it's a TypeError
22 | });
23 | });
24 |
25 | it('should use custom tokenization function, if one is provided in `options`.', function () {
26 | var splitOnChar = function (text) {
27 | return text.split('');
28 | };
29 |
30 | var classifier = new NaiveBayesClassifier({ tokenizer: splitOnChar });
31 |
32 | classifier.learn('abcd', 'happy');
33 |
34 | // check classifier's state is as expected
35 | assert.equal(classifier.totalNumberOfDocuments, 1);
36 | assert.equal(classifier.docFrequencyCount.happy, 1);
37 | assert.deepEqual(classifier.vocabulary, { a: 1, b: 1, c: 1, d: 1 });
38 | assert.equal(classifier.vocabularySize, 4);
39 | assert.equal(classifier.wordCount.happy, 4);
40 | assert.equal(classifier.wordFrequencyCount.happy.a, 1);
41 | assert.equal(classifier.wordFrequencyCount.happy.b, 1);
42 | assert.equal(classifier.wordFrequencyCount.happy.c, 1);
43 | assert.equal(classifier.wordFrequencyCount.happy.d, 1);
44 | assert.deepEqual(classifier.categories, { happy: 1 });
45 | });
46 | });
47 |
48 | describe('classifier initialisation and recreation', function () {
49 | it('should create a new (identical) classifier from an existing classifer object', function (done) {
50 | var firstClassifier = new NaiveBayesClassifier();
51 | firstClassifier.learn('Fun times were had by all', 'positive');
52 | firstClassifier.learn('sad dark rainy day in the cave', 'negative');
53 |
54 | var secondClassifier = NaiveBayesClassifier.withClassifier(firstClassifier);
55 |
56 | //check that the classifiers are the same
57 | assert.equal(JSON.stringify(firstClassifier), JSON.stringify(secondClassifier));
58 |
59 | //and that they return the same kind of results
60 | var testPhrase = 'sad rainy times on a great day';
61 | assert.deepEqual(firstClassifier.categorize(testPhrase), secondClassifier.categorize(testPhrase));
62 |
63 | done();
64 | });
65 |
66 | it('should raise a TypeError if the classifier provided is not of the correct type or has been corrupted', function() {
67 | //Test overall object
68 | var invalidObjectOptions = [ true, 1, 'a', [], function(){} ];
69 |
70 | invalidObjectOptions.forEach(function (invalidOption) {
71 | assert.throws(function () { NaiveBayesClassifier.withClassifier(invalidOption); }, Error);
72 | assert.throws(function () { NaiveBayesClassifier.withClassifier(invalidOption); }, TypeError);
73 | });
74 |
75 | //Test for corruption
76 | var propertiesToTest = ['vocabulary', 'categories', 'docFrequencyCount', 'wordFrequencyCount', 'wordCount'];
77 |
78 | propertiesToTest.forEach(function (property) {
79 | var classifer = new NaiveBayesClassifier();
80 |
81 | invalidObjectOptions.forEach(function (invalidOption) {
82 | classifer[property] = invalidOption;
83 | assert.throws(function () { NaiveBayesClassifier.withClassifier(classifer); }, Error);
84 | assert.throws(function () { NaiveBayesClassifier.withClassifier(classifer); }, TypeError);
85 | });
86 | });
87 |
88 | var invalidNumberOptions = [ -1, {}, true, 'a', [], function(){} ];
89 | invalidNumberOptions.forEach(function (invalidOption) {
90 | var classifer = new NaiveBayesClassifier();
91 | classifer.totalNumberOfDocuments = invalidOption;
92 | assert.throws(function () { NaiveBayesClassifier.withClassifier(classifer); }, Error);
93 | assert.throws(function () { NaiveBayesClassifier.withClassifier(classifer); }, TypeError);
94 | });
95 | });
96 |
97 | it('should raise an Error if the version of the current library is different to the existing classifier\'s version', function() {
98 | var invalidVersionOptions = [ '', 1, {}, true, 'a', [], function(){} ];
99 |
100 | invalidVersionOptions.forEach(function (invalidOption) {
101 | var classifer = new NaiveBayesClassifier();
102 | classifer.VERSION = invalidOption;
103 | assert.throws(function () { NaiveBayesClassifier.withClassifier(classifer); }, Error);
104 | });
105 | });
106 | });
107 |
108 | describe('classifier correctness', function () {
109 | //sentiment analysis test
110 | it('should categorizes correctly for `positive` and `negative` categories', function (done) {
111 |
112 | var classifier = new NaiveBayesClassifier();
113 |
114 | //teach it positive phrases
115 | classifier.learn('amazing, awesome movie!! Yeah!!', 'positive');
116 | classifier.learn('Sweet, this is incredibly, amazing, perfect, great!!', 'positive');
117 |
118 | //teach it a negative phrase
119 | classifier.learn('terrible, shitty thing. Damn. Sucks!!', 'negative');
120 |
121 | //teach it a neutral phrase
122 | classifier.learn('I dont really know what to make of this.', 'neutral');
123 |
124 | //now test it to see that it correctly categorizes a new document
125 | assert.equal(classifier.categorize('awesome, cool, amazing!! Yay.').category, 'positive');
126 |
127 | done();
128 | });
129 |
130 | //topic analysis test
131 | it('should categorizes correctly for `chinese` and `japanese` categories', function (done) {
132 |
133 | var classifier = new NaiveBayesClassifier();
134 |
135 | //teach it how to identify the `chinese` category
136 | classifier.learn('Chinese Beijing Chinese', 'chinese');
137 | classifier.learn('Chinese Chinese Shanghai', 'chinese');
138 | classifier.learn('Chinese Macao', 'chinese');
139 |
140 | //teach it how to identify the `japanese` category
141 | classifier.learn('Tokyo Japan Chinese', 'japanese');
142 |
143 | //make sure it learned the `chinese` category correctly
144 | var chineseFrequencyCount = classifier.wordFrequencyCount.chinese;
145 |
146 | assert.equal(chineseFrequencyCount.chinese, 5);
147 | assert.equal(chineseFrequencyCount.beijing, 1);
148 | assert.equal(chineseFrequencyCount.shanghai, 1);
149 | assert.equal(chineseFrequencyCount.macao, 1);
150 |
151 | //make sure it learned the `japanese` category correctly
152 | var japaneseFrequencyCount = classifier.wordFrequencyCount.japanese;
153 |
154 | assert.equal(japaneseFrequencyCount.tokyo, 1);
155 | assert.equal(japaneseFrequencyCount.japan, 1);
156 | assert.equal(japaneseFrequencyCount.chinese, 1);
157 |
158 | //now test it to see that it correctly categorizes a new document
159 | var classification = classifier.categorize('Chinese Chinese Chinese Japan Tokyo');
160 | assert.equal(classification.category, 'chinese');
161 | assert(Math.round(classification.probability*10000)/10000 === 0.6898, 'probability of chinese category (' + classification.probability + ') should be approximately 0.6898');
162 |
163 | done();
164 | });
165 | });
166 |
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.0/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | NaiveBayesClassifier Index
7 |
8 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
Index
53 |
54 |
55 |
56 |
57 |
58 |
NaiveBayesClassifier 0.1.0
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | NaiveBayesClassifier is an implementation of a Multinomial Naive-Bayes Classifier that uses Laplace Smoothing . It takes in a piece of text and tells you which category it most likely belongs to.
79 | What is this good for?
80 | "In machine learning, naive Bayes classifiers are a family of simple probabilistic classifiers based on applying Bayes' theorem with strong (naive) independence assumptions between the features." - Wikipedia: Naive Bayes classifier .
81 | You can use this implementation for categorizing any text content into any arbitrary set of categories. For example:
82 |
83 | is an email spam , or not spam ?
84 | is a news article about technology , politics , or sports ?
85 | is the author of some piece of text male , or female ?
86 | is a tweet expressing positive sentiment or negative sentiment?
87 |
88 | Depending on your specific attributes and sample size, there may be other algorithms that are better suited: Comparison of Classification Methods Based on the Type of Attributes and Sample Size .
89 | Basic Usage
90 | Installing NaiveBayesClassifier
91 | NaiveBayesClassifier is shipped in UMD format, meaning that it is available as a CommonJS/AMD module or browser global.
92 | You can install it using:
93 | $ npm install NaiveBayesClassifier
94 | Create a new classifier: new NaiveBayesClassifier([options])
95 | Create a brand new classifier using:
96 | var NaiveBayesClassifier = require('NaiveBayesClassifier'),
97 | classifier = new NaiveBayesClassifier();
98 | Recover an existing classifier: NaiveBayesClassifier.withClassifier(classifier)
99 | Recover an existing classifier, which you may have retrieved from a database or localstorage:
100 | var NaiveBayesClassifier = require('NaiveBayesClassifier'),
101 | classifier = NaiveBayesClassifier.withClassifier(existingClassifier);
102 | classifier.learn(text, category)
103 | Teach your classifier what category the text belongs to. The more you teach your classifier, the more reliable it becomes. It will use what it has learned to identify new documents that it hasn't seen before.
104 | classifier.learn('amazing, awesome movie!! Yeah!!', 'positive');
105 | classifier.learn('terrible, shitty thing. Damn. Sucks!!', 'negative');
106 | classifier.learn('I dont really know what to make of this.', 'neutral');
107 | classifier.categorize(text)
108 | This will return the most likely category it thinks text belongs to and its probability of certainty. Its judgement is based on what you have taught it with .learn().
109 | classifier.categorize('awesome, cool, amazing!! Yay.');
110 | Complete API Documentation
111 | If you would like to explore the full API, you can find auto-generated documentation at: https://hadi.io/NaiveBayesClassifier .
112 | Acknowledgements
113 | This implementation is based on the Stanford NLP video series by Professor Dan Jurafsky & Chris Manning. This library modifies and extends work first investigated by Tolga Tezel .
114 | License
115 | Copyright (C) 2015, Hadi Michael. All rights reserved.
116 | Licensed under BSD-3-Clause
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 | Copyright (C) 2015, Hadi Michael. All rights reserved.
133 |
134 |
135 |
136 |
137 | Documentation generated by JSDoc 3.2.2
138 | on Sun, May 17th, 2015 using the DocStrap template .
140 |
141 |
142 |
143 |
144 |
145 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.1/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | NaiveBayesClassifier Index
7 |
8 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
Index
53 |
54 |
55 |
56 |
57 |
58 |
naivebayesclassifier 0.1.1
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | NaiveBayesClassifier is an implementation of a Multinomial Naive-Bayes Classifier that uses Laplace Smoothing . It takes in a piece of text and tells you which category it most likely belongs to.
79 | What is this good for?
80 | "In machine learning, naive Bayes classifiers are a family of simple probabilistic classifiers based on applying Bayes' theorem with strong (naive) independence assumptions between the features." - Wikipedia: Naive Bayes classifier .
81 | You can use this implementation for categorizing any text content into any arbitrary set of categories. For example:
82 |
83 | is an email spam , or not spam ?
84 | is a news article about technology , politics , or sports ?
85 | is the author of some piece of text male , or female ?
86 | is a tweet expressing positive sentiment or negative sentiment?
87 |
88 | Depending on your specific attributes and sample size, there may be other algorithms that are better suited: Comparison of Classification Methods Based on the Type of Attributes and Sample Size .
89 | Installing NaiveBayesClassifier
90 | NaiveBayesClassifier is shipped in UMD format, meaning that it is available as a CommonJS/AMD module or browser global. You can install it using:
91 | $ npm install naivebayesclassifier
92 | Basic Usage
93 | new NaiveBayesClassifier([options])
94 | var NaiveBayesClassifier = require('NaiveBayesClassifier'),
95 | classifier = new NaiveBayesClassifier();
96 | Or with a custom tokenization function:
97 | var NaiveBayesClassifier = require('NaiveBayesClassifier');
98 | var splitOnChar = function(text) {
99 | return text.split('');
100 | };
101 | var classifier = new NaiveBayesClassifier({ tokenizer: splitOnChar });
102 | .withClassifier(classifier)
103 | Recover an existing classifier, which you may have retrieved from a database or localstorage:
104 | var NaiveBayesClassifier = require('NaiveBayesClassifier'),
105 | classifier = NaiveBayesClassifier.withClassifier(existingClassifier);
106 | .learn(text, category)
107 | Teach your classifier what category the text belongs to. The more you teach your classifier, the more reliable it becomes. It will use what it has learned to identify new documents that it hasn't seen before.
108 | classifier.learn('amazing, awesome movie!! Yeah!!', 'positive');
109 | classifier.learn('terrible, shitty thing. Damn. Sucks!!', 'negative');
110 | classifier.learn('I dont really know what to make of this.', 'neutral');
111 | .categorize(text)
112 | classifier.categorize('awesome, cool, amazing!! Yay.');
113 | This will return the most likely category it thinks text belongs to and its probability. Its judgement is based on what you have taught it with .learn(text, category).
114 | {
115 | "category": "positive",
116 | "probability": 0.768701215200234,
117 | "categories":
118 | {
119 | "positive": 0.768701215200234,
120 | "negative": 0.15669449587155276,
121 | "neutral": 0.07460428892821327
122 | }
123 | }
124 | Complete API Documentation
125 | If you would like to explore the full API, you can find auto-generated documentation at: https://hadi.io/NaiveBayesClassifier .
126 | Acknowledgements
127 | This implementation is based on the Stanford NLP video series by Professor Dan Jurafsky & Chris Manning. This library modifies and extends work first investigated by Tolga Tezel .
128 | License
129 | Copyright (C) 2015, Hadi Michael. All rights reserved.
130 | Licensed under BSD-3-Clause
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 | Copyright (C) 2015, Hadi Michael. All rights reserved.
147 |
148 |
149 |
150 |
151 | Documentation generated by JSDoc 3.2.2
152 | on Sun, May 17th, 2015 using the DocStrap template .
154 |
155 |
156 |
157 |
158 |
159 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.0/styles/sunlight.default.css:
--------------------------------------------------------------------------------
1 | /* global styles */
2 | .sunlight-container {
3 | clear: both !important;
4 | position: relative !important;
5 | margin: 10px 0 !important;
6 | }
7 | .sunlight-code-container {
8 | clear: both !important;
9 | position: relative !important;
10 | border: none;
11 | border-color: #969696 !important;
12 | background-color: #FFFFFF !important;
13 | }
14 | .sunlight-highlighted, .sunlight-container, .sunlight-container textarea {
15 | font-family: Consolas, Inconsolata, Monaco, "Courier New" !important;
16 | font-size: 12px !important;
17 | line-height: 15px !important;
18 | }
19 | .sunlight-highlighted, .sunlight-container textarea {
20 | color: #000000 !important;
21 | margin: 0 !important;
22 | }
23 | .sunlight-container textarea {
24 | padding-left: 0 !important;
25 | margin-left: 0 !important;
26 | margin-right: 0 !important;
27 | padding-right: 0 !important;
28 | }
29 | .sunlight-code-container > .sunlight-highlighted {
30 | white-space: pre;
31 | overflow-x: auto;
32 | overflow-y: hidden; /* ie requires this wtf? */
33 | }
34 | .sunlight-highlighted {
35 | z-index: 1;
36 | position: relative;
37 | }
38 | .sunlight-highlighted * {
39 | background: transparent;
40 | }
41 | .sunlight-line-number-margin {
42 | float: left !important;
43 | margin-right: 5px !important;
44 | margin-top: 0 !important;
45 | margin-bottom: 0 !important;
46 | padding: 0 !important;
47 | padding-right: 4px !important;
48 | padding-left: 4px !important;
49 | border-right: 1px solid #CCCCCC !important;
50 | background-color: #EEEEEE !important;
51 | color: #848484 !important;
52 | text-align: right !important;
53 | position: relative;
54 | z-index: 3;
55 | }
56 | .sunlight-highlighted a, .sunlight-line-number-margin a {
57 | border: none !important;
58 | text-decoration: none !important;
59 | font-weight: normal !important;
60 | font-style: normal !important;
61 | padding: 0 !important;
62 | }
63 | .sunlight-line-number-margin a {
64 | color: inherit !important;
65 | }
66 | .sunlight-line-highlight-overlay {
67 | position: absolute;
68 | top: 0;
69 | left: 0;
70 | width: 100%;
71 | z-index: 0;
72 | }
73 | .sunlight-line-highlight-overlay div {
74 | height: 15px;
75 | width: 100%;
76 | }
77 | .sunlight-line-highlight-overlay .sunlight-line-highlight-active {
78 | background-color: #E7FCFA;
79 | }
80 |
81 | /* menu */
82 | .sunlight-menu {
83 | background-color: #FFFFCC;
84 | color: #000000;
85 | }
86 | .sunlight-menu ul {
87 | margin: 0 !important;
88 | padding: 0 !important;
89 | list-style-type: none !important;
90 | }
91 | .sunlight-menu li {
92 | float: right !important;
93 | margin-left: 5px !important;
94 | }
95 | .sunlight-menu a, .sunlight-menu img {
96 | color: #000099 !important;
97 | text-decoration: none !important;
98 | border: none !important;
99 | }
100 |
101 |
102 |
103 |
104 | .sunlight-string,
105 | .sunlight-char,
106 | .sunlight-heredoc,
107 | .sunlight-heredocDeclaration,
108 | .sunlight-nowdoc,
109 | .sunlight-longString,
110 | .sunlight-rawString,
111 | .sunlight-binaryString,
112 | .sunlight-rawLongString,
113 | .sunlight-binaryLongString,
114 | .sunlight-verbatimString,
115 | .sunlight-diff .sunlight-removed {
116 | color: #990000 !important;
117 | }
118 |
119 | .sunlight-ident,
120 | .sunlight-operator,
121 | .sunlight-punctuation,
122 | .sunlight-delimiter,
123 | .sunlight-diff .sunlight-unchanged {
124 | color: #000000 !important;
125 | }
126 |
127 | .sunlight-comment,
128 | .sunlight-xmlDocCommentContent,
129 | .sunlight-nginx .sunlight-ssiCommand,
130 | .sunlight-sln .sunlight-formatDeclaration,
131 | .sunlight-diff .sunlight-added {
132 | color: #009900 !important;
133 | }
134 | .sunlight-number,
135 | .sunlight-guid,
136 | .sunlight-cdata {
137 | color: #CC6600 !important;
138 | }
139 |
140 | .sunlight-named-ident,
141 | .sunlight-constant,
142 | .sunlight-javascript .sunlight-globalVariable,
143 | .sunlight-globalObject,
144 | .sunlight-python .sunlight-attribute,
145 | .sunlight-nginx .sunlight-context,
146 | .sunlight-httpd .sunlight-context,
147 | .sunlight-haskell .sunlight-class,
148 | .sunlight-haskell .sunlight-type,
149 | .sunlight-lisp .sunlight-declarationSpecifier,
150 | .sunlight-erlang .sunlight-userDefinedFunction,
151 | .sunlight-diff .sunlight-header {
152 | color: #2B91AF !important;
153 | }
154 | .sunlight-keyword,
155 | .sunlight-languageConstruct,
156 | .sunlight-css
157 | .sunlight-element,
158 | .sunlight-bash .sunlight-command,
159 | .sunlight-specialOperator,
160 | .sunlight-erlang .sunlight-moduleAttribute,
161 | .sunlight-xml .sunlight-tagName,
162 | .sunlight-xml .sunlight-operator,
163 | .sunlight-diff .sunlight-modified {
164 | color: #0000FF !important;
165 | }
166 | .sunlight-shortOpenTag,
167 | .sunlight-openTag,
168 | .sunlight-closeTag,
169 | .sunlight-xmlOpenTag,
170 | .sunlight-xmlCloseTag,
171 | .sunlight-aspOpenTag,
172 | .sunlight-aspCloseTag,
173 | .sunlight-label,
174 | .sunlight-css .sunlight-importantFlag {
175 | background-color: #FFFF99 !important;
176 | color: #000000 !important;
177 | }
178 | .sunlight-function,
179 | .sunlight-globalFunction,
180 | .sunlight-ruby .sunlight-specialFunction,
181 | .sunlight-objective-c .sunlight-messageDestination,
182 | .sunlight-6502asm .sunlight-illegalOpcode,
183 | .sunlight-powershell .sunlight-switch,
184 | .sunlight-lisp .sunlight-macro,
185 | .sunlight-lisp .sunlight-specialForm,
186 | .sunlight-lisp .sunlight-type,
187 | .sunlight-sln .sunlight-sectionName,
188 | .sunlight-diff .sunlight-rangeInfo {
189 | color: #B069AF !important;
190 | }
191 |
192 | .sunlight-variable,
193 | .sunlight-specialVariable,
194 | .sunlight-environmentVariable,
195 | .sunlight-objective-c .sunlight-messageArgumentName,
196 | .sunlight-lisp .sunlight-globalVariable,
197 | .sunlight-ruby .sunlight-globalVariable,
198 | .sunlight-ruby .sunlight-instanceVariable,
199 | .sunlight-sln .sunlight-operator {
200 | color: #325484 !important;
201 | }
202 | .sunlight-regexLiteral,
203 | .sunlight-lisp .sunlight-operator,
204 | .sunlight-6502asm .sunlight-pseudoOp,
205 | .sunlight-erlang .sunlight-macro {
206 | color: #FF00B2 !important;
207 | }
208 | .sunlight-specialVariable {
209 | font-style: italic !important;
210 | font-weight: bold !important;
211 | }
212 | .sunlight-csharp .sunlight-pragma,
213 | .sunlight-preprocessorDirective,
214 | .sunlight-vb .sunlight-compilerDirective,
215 | .sunlight-diff .sunlight-mergeHeader,
216 | .sunlight-diff .sunlight-noNewLine {
217 | color: #999999 !important;
218 | font-style: italic !important;
219 | }
220 | .sunlight-xmlDocCommentMeta,
221 | .sunlight-java .sunlight-annotation,
222 | .sunlight-scala .sunlight-annotation,
223 | .sunlight-docComment {
224 | color: #808080 !important;
225 | }
226 | .sunlight-quotedIdent,
227 | .sunlight-ruby .sunlight-subshellCommand,
228 | .sunlight-lisp .sunlight-keywordArgument,
229 | .sunlight-haskell .sunlight-infixOperator,
230 | .sunlight-erlang .sunlight-quotedAtom {
231 | color: #999900 !important;
232 | }
233 |
234 |
235 |
236 | /* xml */
237 | .sunlight-xml .sunlight-string {
238 | color: #990099 !important;
239 | }
240 | .sunlight-xml .sunlight-attribute {
241 | color: #FF0000 !important;
242 | }
243 | .sunlight-xml .sunlight-entity {
244 | background-color: #EEEEEE !important;
245 | color: #000000 !important;
246 | border: 1px solid #000000 !important;
247 | }
248 | .sunlight-xml .sunlight-doctype {
249 | color: #2B91AF !important;
250 | }
251 |
252 | /* javascript */
253 | .sunlight-javascript .sunlight-reservedWord {
254 | font-style: italic !important;
255 | }
256 |
257 | /* css */
258 | .sunlight-css .sunlight-microsoftFilterPrefix {
259 | color: #FF00FF !important;
260 | }
261 | .sunlight-css .sunlight-rule {
262 | color: #0099FF !important;
263 | }
264 | .sunlight-css .sunlight-keyword {
265 | color: #4E65B8 !important;
266 | }
267 | .sunlight-css .sunlight-class {
268 | color: #FF0000 !important;
269 | }
270 | .sunlight-css .sunlight-id {
271 | color: #8A8E13 !important;
272 | }
273 | .sunlight-css .sunlight-pseudoClass,
274 | .sunlight-css .sunlight-pseudoElement {
275 | color: #368B87 !important;
276 | }
277 |
278 | /* bash */
279 | .sunlight-bash .sunlight-hashBang {
280 | color: #3D97F5 !important;
281 | }
282 | .sunlight-bash .sunlight-verbatimCommand {
283 | color: #999900 !important;
284 | }
285 | .sunlight-bash .sunlight-variable,
286 | .sunlight-bash .sunlight-specialVariable {
287 | color: #FF0000 !important;
288 | }
289 |
290 | /* python */
291 | .sunlight-python .sunlight-specialMethod {
292 | font-weight: bold !important;
293 | color: #A07DD3;
294 | }
295 |
296 | /* ruby */
297 | .sunlight-ruby .sunlight-symbol {
298 | font-weight: bold !important;
299 | color: #ED7272 !important;
300 | }
301 |
302 | /* brainfuck */
303 | .sunlight-brainfuck {
304 | font-weight: bold !important;
305 | color: #000000 !important;
306 | }
307 | .sunlight-brainfuck .sunlight-increment {
308 | background-color: #FF9900 !important;
309 | }
310 | .sunlight-brainfuck .sunlight-decrement {
311 | background-color: #FF99FF !important;
312 | }
313 | .sunlight-brainfuck .sunlight-incrementPointer {
314 | background-color: #FFFF99 !important;
315 | }
316 | .sunlight-brainfuck .sunlight-decrementPointer {
317 | background-color: #66CCFF !important;
318 | }
319 | .sunlight-brainfuck .sunlight-read {
320 | background-color: #FFFFFF !important;
321 | }
322 | .sunlight-brainfuck .sunlight-write {
323 | background-color: #99FF99 !important;
324 | }
325 | .sunlight-brainfuck .sunlight-openLoop, .sunlight-brainfuck .sunlight-closeLoop {
326 | background-color: #FFFFFF !important;
327 | }
328 |
329 | /* 6502 asm */
330 | .sunlight-6502asm .sunlight-label {
331 | font-weight: bold !important;
332 | color: #000000 !important;
333 | background: none !important;
334 | }
335 |
336 | /* lisp */
337 | .sunlight-lisp .sunlight-macro {
338 | font-style: italic !important;
339 | }
340 |
341 | /* erlang */
342 | .sunlight-erlang .sunlight-atom {
343 | font-weight: bold !important;
344 | }
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.1/styles/sunlight.default.css:
--------------------------------------------------------------------------------
1 | /* global styles */
2 | .sunlight-container {
3 | clear: both !important;
4 | position: relative !important;
5 | margin: 10px 0 !important;
6 | }
7 | .sunlight-code-container {
8 | clear: both !important;
9 | position: relative !important;
10 | border: none;
11 | border-color: #969696 !important;
12 | background-color: #FFFFFF !important;
13 | }
14 | .sunlight-highlighted, .sunlight-container, .sunlight-container textarea {
15 | font-family: Consolas, Inconsolata, Monaco, "Courier New" !important;
16 | font-size: 12px !important;
17 | line-height: 15px !important;
18 | }
19 | .sunlight-highlighted, .sunlight-container textarea {
20 | color: #000000 !important;
21 | margin: 0 !important;
22 | }
23 | .sunlight-container textarea {
24 | padding-left: 0 !important;
25 | margin-left: 0 !important;
26 | margin-right: 0 !important;
27 | padding-right: 0 !important;
28 | }
29 | .sunlight-code-container > .sunlight-highlighted {
30 | white-space: pre;
31 | overflow-x: auto;
32 | overflow-y: hidden; /* ie requires this wtf? */
33 | }
34 | .sunlight-highlighted {
35 | z-index: 1;
36 | position: relative;
37 | }
38 | .sunlight-highlighted * {
39 | background: transparent;
40 | }
41 | .sunlight-line-number-margin {
42 | float: left !important;
43 | margin-right: 5px !important;
44 | margin-top: 0 !important;
45 | margin-bottom: 0 !important;
46 | padding: 0 !important;
47 | padding-right: 4px !important;
48 | padding-left: 4px !important;
49 | border-right: 1px solid #CCCCCC !important;
50 | background-color: #EEEEEE !important;
51 | color: #848484 !important;
52 | text-align: right !important;
53 | position: relative;
54 | z-index: 3;
55 | }
56 | .sunlight-highlighted a, .sunlight-line-number-margin a {
57 | border: none !important;
58 | text-decoration: none !important;
59 | font-weight: normal !important;
60 | font-style: normal !important;
61 | padding: 0 !important;
62 | }
63 | .sunlight-line-number-margin a {
64 | color: inherit !important;
65 | }
66 | .sunlight-line-highlight-overlay {
67 | position: absolute;
68 | top: 0;
69 | left: 0;
70 | width: 100%;
71 | z-index: 0;
72 | }
73 | .sunlight-line-highlight-overlay div {
74 | height: 15px;
75 | width: 100%;
76 | }
77 | .sunlight-line-highlight-overlay .sunlight-line-highlight-active {
78 | background-color: #E7FCFA;
79 | }
80 |
81 | /* menu */
82 | .sunlight-menu {
83 | background-color: #FFFFCC;
84 | color: #000000;
85 | }
86 | .sunlight-menu ul {
87 | margin: 0 !important;
88 | padding: 0 !important;
89 | list-style-type: none !important;
90 | }
91 | .sunlight-menu li {
92 | float: right !important;
93 | margin-left: 5px !important;
94 | }
95 | .sunlight-menu a, .sunlight-menu img {
96 | color: #000099 !important;
97 | text-decoration: none !important;
98 | border: none !important;
99 | }
100 |
101 |
102 |
103 |
104 | .sunlight-string,
105 | .sunlight-char,
106 | .sunlight-heredoc,
107 | .sunlight-heredocDeclaration,
108 | .sunlight-nowdoc,
109 | .sunlight-longString,
110 | .sunlight-rawString,
111 | .sunlight-binaryString,
112 | .sunlight-rawLongString,
113 | .sunlight-binaryLongString,
114 | .sunlight-verbatimString,
115 | .sunlight-diff .sunlight-removed {
116 | color: #990000 !important;
117 | }
118 |
119 | .sunlight-ident,
120 | .sunlight-operator,
121 | .sunlight-punctuation,
122 | .sunlight-delimiter,
123 | .sunlight-diff .sunlight-unchanged {
124 | color: #000000 !important;
125 | }
126 |
127 | .sunlight-comment,
128 | .sunlight-xmlDocCommentContent,
129 | .sunlight-nginx .sunlight-ssiCommand,
130 | .sunlight-sln .sunlight-formatDeclaration,
131 | .sunlight-diff .sunlight-added {
132 | color: #009900 !important;
133 | }
134 | .sunlight-number,
135 | .sunlight-guid,
136 | .sunlight-cdata {
137 | color: #CC6600 !important;
138 | }
139 |
140 | .sunlight-named-ident,
141 | .sunlight-constant,
142 | .sunlight-javascript .sunlight-globalVariable,
143 | .sunlight-globalObject,
144 | .sunlight-python .sunlight-attribute,
145 | .sunlight-nginx .sunlight-context,
146 | .sunlight-httpd .sunlight-context,
147 | .sunlight-haskell .sunlight-class,
148 | .sunlight-haskell .sunlight-type,
149 | .sunlight-lisp .sunlight-declarationSpecifier,
150 | .sunlight-erlang .sunlight-userDefinedFunction,
151 | .sunlight-diff .sunlight-header {
152 | color: #2B91AF !important;
153 | }
154 | .sunlight-keyword,
155 | .sunlight-languageConstruct,
156 | .sunlight-css
157 | .sunlight-element,
158 | .sunlight-bash .sunlight-command,
159 | .sunlight-specialOperator,
160 | .sunlight-erlang .sunlight-moduleAttribute,
161 | .sunlight-xml .sunlight-tagName,
162 | .sunlight-xml .sunlight-operator,
163 | .sunlight-diff .sunlight-modified {
164 | color: #0000FF !important;
165 | }
166 | .sunlight-shortOpenTag,
167 | .sunlight-openTag,
168 | .sunlight-closeTag,
169 | .sunlight-xmlOpenTag,
170 | .sunlight-xmlCloseTag,
171 | .sunlight-aspOpenTag,
172 | .sunlight-aspCloseTag,
173 | .sunlight-label,
174 | .sunlight-css .sunlight-importantFlag {
175 | background-color: #FFFF99 !important;
176 | color: #000000 !important;
177 | }
178 | .sunlight-function,
179 | .sunlight-globalFunction,
180 | .sunlight-ruby .sunlight-specialFunction,
181 | .sunlight-objective-c .sunlight-messageDestination,
182 | .sunlight-6502asm .sunlight-illegalOpcode,
183 | .sunlight-powershell .sunlight-switch,
184 | .sunlight-lisp .sunlight-macro,
185 | .sunlight-lisp .sunlight-specialForm,
186 | .sunlight-lisp .sunlight-type,
187 | .sunlight-sln .sunlight-sectionName,
188 | .sunlight-diff .sunlight-rangeInfo {
189 | color: #B069AF !important;
190 | }
191 |
192 | .sunlight-variable,
193 | .sunlight-specialVariable,
194 | .sunlight-environmentVariable,
195 | .sunlight-objective-c .sunlight-messageArgumentName,
196 | .sunlight-lisp .sunlight-globalVariable,
197 | .sunlight-ruby .sunlight-globalVariable,
198 | .sunlight-ruby .sunlight-instanceVariable,
199 | .sunlight-sln .sunlight-operator {
200 | color: #325484 !important;
201 | }
202 | .sunlight-regexLiteral,
203 | .sunlight-lisp .sunlight-operator,
204 | .sunlight-6502asm .sunlight-pseudoOp,
205 | .sunlight-erlang .sunlight-macro {
206 | color: #FF00B2 !important;
207 | }
208 | .sunlight-specialVariable {
209 | font-style: italic !important;
210 | font-weight: bold !important;
211 | }
212 | .sunlight-csharp .sunlight-pragma,
213 | .sunlight-preprocessorDirective,
214 | .sunlight-vb .sunlight-compilerDirective,
215 | .sunlight-diff .sunlight-mergeHeader,
216 | .sunlight-diff .sunlight-noNewLine {
217 | color: #999999 !important;
218 | font-style: italic !important;
219 | }
220 | .sunlight-xmlDocCommentMeta,
221 | .sunlight-java .sunlight-annotation,
222 | .sunlight-scala .sunlight-annotation,
223 | .sunlight-docComment {
224 | color: #808080 !important;
225 | }
226 | .sunlight-quotedIdent,
227 | .sunlight-ruby .sunlight-subshellCommand,
228 | .sunlight-lisp .sunlight-keywordArgument,
229 | .sunlight-haskell .sunlight-infixOperator,
230 | .sunlight-erlang .sunlight-quotedAtom {
231 | color: #999900 !important;
232 | }
233 |
234 |
235 |
236 | /* xml */
237 | .sunlight-xml .sunlight-string {
238 | color: #990099 !important;
239 | }
240 | .sunlight-xml .sunlight-attribute {
241 | color: #FF0000 !important;
242 | }
243 | .sunlight-xml .sunlight-entity {
244 | background-color: #EEEEEE !important;
245 | color: #000000 !important;
246 | border: 1px solid #000000 !important;
247 | }
248 | .sunlight-xml .sunlight-doctype {
249 | color: #2B91AF !important;
250 | }
251 |
252 | /* javascript */
253 | .sunlight-javascript .sunlight-reservedWord {
254 | font-style: italic !important;
255 | }
256 |
257 | /* css */
258 | .sunlight-css .sunlight-microsoftFilterPrefix {
259 | color: #FF00FF !important;
260 | }
261 | .sunlight-css .sunlight-rule {
262 | color: #0099FF !important;
263 | }
264 | .sunlight-css .sunlight-keyword {
265 | color: #4E65B8 !important;
266 | }
267 | .sunlight-css .sunlight-class {
268 | color: #FF0000 !important;
269 | }
270 | .sunlight-css .sunlight-id {
271 | color: #8A8E13 !important;
272 | }
273 | .sunlight-css .sunlight-pseudoClass,
274 | .sunlight-css .sunlight-pseudoElement {
275 | color: #368B87 !important;
276 | }
277 |
278 | /* bash */
279 | .sunlight-bash .sunlight-hashBang {
280 | color: #3D97F5 !important;
281 | }
282 | .sunlight-bash .sunlight-verbatimCommand {
283 | color: #999900 !important;
284 | }
285 | .sunlight-bash .sunlight-variable,
286 | .sunlight-bash .sunlight-specialVariable {
287 | color: #FF0000 !important;
288 | }
289 |
290 | /* python */
291 | .sunlight-python .sunlight-specialMethod {
292 | font-weight: bold !important;
293 | color: #A07DD3;
294 | }
295 |
296 | /* ruby */
297 | .sunlight-ruby .sunlight-symbol {
298 | font-weight: bold !important;
299 | color: #ED7272 !important;
300 | }
301 |
302 | /* brainfuck */
303 | .sunlight-brainfuck {
304 | font-weight: bold !important;
305 | color: #000000 !important;
306 | }
307 | .sunlight-brainfuck .sunlight-increment {
308 | background-color: #FF9900 !important;
309 | }
310 | .sunlight-brainfuck .sunlight-decrement {
311 | background-color: #FF99FF !important;
312 | }
313 | .sunlight-brainfuck .sunlight-incrementPointer {
314 | background-color: #FFFF99 !important;
315 | }
316 | .sunlight-brainfuck .sunlight-decrementPointer {
317 | background-color: #66CCFF !important;
318 | }
319 | .sunlight-brainfuck .sunlight-read {
320 | background-color: #FFFFFF !important;
321 | }
322 | .sunlight-brainfuck .sunlight-write {
323 | background-color: #99FF99 !important;
324 | }
325 | .sunlight-brainfuck .sunlight-openLoop, .sunlight-brainfuck .sunlight-closeLoop {
326 | background-color: #FFFFFF !important;
327 | }
328 |
329 | /* 6502 asm */
330 | .sunlight-6502asm .sunlight-label {
331 | font-weight: bold !important;
332 | color: #000000 !important;
333 | background: none !important;
334 | }
335 |
336 | /* lisp */
337 | .sunlight-lisp .sunlight-macro {
338 | font-style: italic !important;
339 | }
340 |
341 | /* erlang */
342 | .sunlight-erlang .sunlight-atom {
343 | font-weight: bold !important;
344 | }
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.2.0/styles/sunlight.default.css:
--------------------------------------------------------------------------------
1 | /* global styles */
2 | .sunlight-container {
3 | clear: both !important;
4 | position: relative !important;
5 | margin: 10px 0 !important;
6 | }
7 | .sunlight-code-container {
8 | clear: both !important;
9 | position: relative !important;
10 | border: none;
11 | border-color: #969696 !important;
12 | background-color: #FFFFFF !important;
13 | }
14 | .sunlight-highlighted, .sunlight-container, .sunlight-container textarea {
15 | font-family: Consolas, Inconsolata, Monaco, "Courier New" !important;
16 | font-size: 12px !important;
17 | line-height: 15px !important;
18 | }
19 | .sunlight-highlighted, .sunlight-container textarea {
20 | color: #000000 !important;
21 | margin: 0 !important;
22 | }
23 | .sunlight-container textarea {
24 | padding-left: 0 !important;
25 | margin-left: 0 !important;
26 | margin-right: 0 !important;
27 | padding-right: 0 !important;
28 | }
29 | .sunlight-code-container > .sunlight-highlighted {
30 | white-space: pre;
31 | overflow-x: auto;
32 | overflow-y: hidden; /* ie requires this wtf? */
33 | }
34 | .sunlight-highlighted {
35 | z-index: 1;
36 | position: relative;
37 | }
38 | .sunlight-highlighted * {
39 | background: transparent;
40 | }
41 | .sunlight-line-number-margin {
42 | float: left !important;
43 | margin-right: 5px !important;
44 | margin-top: 0 !important;
45 | margin-bottom: 0 !important;
46 | padding: 0 !important;
47 | padding-right: 4px !important;
48 | padding-left: 4px !important;
49 | border-right: 1px solid #CCCCCC !important;
50 | background-color: #EEEEEE !important;
51 | color: #848484 !important;
52 | text-align: right !important;
53 | position: relative;
54 | z-index: 3;
55 | }
56 | .sunlight-highlighted a, .sunlight-line-number-margin a {
57 | border: none !important;
58 | text-decoration: none !important;
59 | font-weight: normal !important;
60 | font-style: normal !important;
61 | padding: 0 !important;
62 | }
63 | .sunlight-line-number-margin a {
64 | color: inherit !important;
65 | }
66 | .sunlight-line-highlight-overlay {
67 | position: absolute;
68 | top: 0;
69 | left: 0;
70 | width: 100%;
71 | z-index: 0;
72 | }
73 | .sunlight-line-highlight-overlay div {
74 | height: 15px;
75 | width: 100%;
76 | }
77 | .sunlight-line-highlight-overlay .sunlight-line-highlight-active {
78 | background-color: #E7FCFA;
79 | }
80 |
81 | /* menu */
82 | .sunlight-menu {
83 | background-color: #FFFFCC;
84 | color: #000000;
85 | }
86 | .sunlight-menu ul {
87 | margin: 0 !important;
88 | padding: 0 !important;
89 | list-style-type: none !important;
90 | }
91 | .sunlight-menu li {
92 | float: right !important;
93 | margin-left: 5px !important;
94 | }
95 | .sunlight-menu a, .sunlight-menu img {
96 | color: #000099 !important;
97 | text-decoration: none !important;
98 | border: none !important;
99 | }
100 |
101 |
102 |
103 |
104 | .sunlight-string,
105 | .sunlight-char,
106 | .sunlight-heredoc,
107 | .sunlight-heredocDeclaration,
108 | .sunlight-nowdoc,
109 | .sunlight-longString,
110 | .sunlight-rawString,
111 | .sunlight-binaryString,
112 | .sunlight-rawLongString,
113 | .sunlight-binaryLongString,
114 | .sunlight-verbatimString,
115 | .sunlight-diff .sunlight-removed {
116 | color: #990000 !important;
117 | }
118 |
119 | .sunlight-ident,
120 | .sunlight-operator,
121 | .sunlight-punctuation,
122 | .sunlight-delimiter,
123 | .sunlight-diff .sunlight-unchanged {
124 | color: #000000 !important;
125 | }
126 |
127 | .sunlight-comment,
128 | .sunlight-xmlDocCommentContent,
129 | .sunlight-nginx .sunlight-ssiCommand,
130 | .sunlight-sln .sunlight-formatDeclaration,
131 | .sunlight-diff .sunlight-added {
132 | color: #009900 !important;
133 | }
134 | .sunlight-number,
135 | .sunlight-guid,
136 | .sunlight-cdata {
137 | color: #CC6600 !important;
138 | }
139 |
140 | .sunlight-named-ident,
141 | .sunlight-constant,
142 | .sunlight-javascript .sunlight-globalVariable,
143 | .sunlight-globalObject,
144 | .sunlight-python .sunlight-attribute,
145 | .sunlight-nginx .sunlight-context,
146 | .sunlight-httpd .sunlight-context,
147 | .sunlight-haskell .sunlight-class,
148 | .sunlight-haskell .sunlight-type,
149 | .sunlight-lisp .sunlight-declarationSpecifier,
150 | .sunlight-erlang .sunlight-userDefinedFunction,
151 | .sunlight-diff .sunlight-header {
152 | color: #2B91AF !important;
153 | }
154 | .sunlight-keyword,
155 | .sunlight-languageConstruct,
156 | .sunlight-css
157 | .sunlight-element,
158 | .sunlight-bash .sunlight-command,
159 | .sunlight-specialOperator,
160 | .sunlight-erlang .sunlight-moduleAttribute,
161 | .sunlight-xml .sunlight-tagName,
162 | .sunlight-xml .sunlight-operator,
163 | .sunlight-diff .sunlight-modified {
164 | color: #0000FF !important;
165 | }
166 | .sunlight-shortOpenTag,
167 | .sunlight-openTag,
168 | .sunlight-closeTag,
169 | .sunlight-xmlOpenTag,
170 | .sunlight-xmlCloseTag,
171 | .sunlight-aspOpenTag,
172 | .sunlight-aspCloseTag,
173 | .sunlight-label,
174 | .sunlight-css .sunlight-importantFlag {
175 | background-color: #FFFF99 !important;
176 | color: #000000 !important;
177 | }
178 | .sunlight-function,
179 | .sunlight-globalFunction,
180 | .sunlight-ruby .sunlight-specialFunction,
181 | .sunlight-objective-c .sunlight-messageDestination,
182 | .sunlight-6502asm .sunlight-illegalOpcode,
183 | .sunlight-powershell .sunlight-switch,
184 | .sunlight-lisp .sunlight-macro,
185 | .sunlight-lisp .sunlight-specialForm,
186 | .sunlight-lisp .sunlight-type,
187 | .sunlight-sln .sunlight-sectionName,
188 | .sunlight-diff .sunlight-rangeInfo {
189 | color: #B069AF !important;
190 | }
191 |
192 | .sunlight-variable,
193 | .sunlight-specialVariable,
194 | .sunlight-environmentVariable,
195 | .sunlight-objective-c .sunlight-messageArgumentName,
196 | .sunlight-lisp .sunlight-globalVariable,
197 | .sunlight-ruby .sunlight-globalVariable,
198 | .sunlight-ruby .sunlight-instanceVariable,
199 | .sunlight-sln .sunlight-operator {
200 | color: #325484 !important;
201 | }
202 | .sunlight-regexLiteral,
203 | .sunlight-lisp .sunlight-operator,
204 | .sunlight-6502asm .sunlight-pseudoOp,
205 | .sunlight-erlang .sunlight-macro {
206 | color: #FF00B2 !important;
207 | }
208 | .sunlight-specialVariable {
209 | font-style: italic !important;
210 | font-weight: bold !important;
211 | }
212 | .sunlight-csharp .sunlight-pragma,
213 | .sunlight-preprocessorDirective,
214 | .sunlight-vb .sunlight-compilerDirective,
215 | .sunlight-diff .sunlight-mergeHeader,
216 | .sunlight-diff .sunlight-noNewLine {
217 | color: #999999 !important;
218 | font-style: italic !important;
219 | }
220 | .sunlight-xmlDocCommentMeta,
221 | .sunlight-java .sunlight-annotation,
222 | .sunlight-scala .sunlight-annotation,
223 | .sunlight-docComment {
224 | color: #808080 !important;
225 | }
226 | .sunlight-quotedIdent,
227 | .sunlight-ruby .sunlight-subshellCommand,
228 | .sunlight-lisp .sunlight-keywordArgument,
229 | .sunlight-haskell .sunlight-infixOperator,
230 | .sunlight-erlang .sunlight-quotedAtom {
231 | color: #999900 !important;
232 | }
233 |
234 |
235 |
236 | /* xml */
237 | .sunlight-xml .sunlight-string {
238 | color: #990099 !important;
239 | }
240 | .sunlight-xml .sunlight-attribute {
241 | color: #FF0000 !important;
242 | }
243 | .sunlight-xml .sunlight-entity {
244 | background-color: #EEEEEE !important;
245 | color: #000000 !important;
246 | border: 1px solid #000000 !important;
247 | }
248 | .sunlight-xml .sunlight-doctype {
249 | color: #2B91AF !important;
250 | }
251 |
252 | /* javascript */
253 | .sunlight-javascript .sunlight-reservedWord {
254 | font-style: italic !important;
255 | }
256 |
257 | /* css */
258 | .sunlight-css .sunlight-microsoftFilterPrefix {
259 | color: #FF00FF !important;
260 | }
261 | .sunlight-css .sunlight-rule {
262 | color: #0099FF !important;
263 | }
264 | .sunlight-css .sunlight-keyword {
265 | color: #4E65B8 !important;
266 | }
267 | .sunlight-css .sunlight-class {
268 | color: #FF0000 !important;
269 | }
270 | .sunlight-css .sunlight-id {
271 | color: #8A8E13 !important;
272 | }
273 | .sunlight-css .sunlight-pseudoClass,
274 | .sunlight-css .sunlight-pseudoElement {
275 | color: #368B87 !important;
276 | }
277 |
278 | /* bash */
279 | .sunlight-bash .sunlight-hashBang {
280 | color: #3D97F5 !important;
281 | }
282 | .sunlight-bash .sunlight-verbatimCommand {
283 | color: #999900 !important;
284 | }
285 | .sunlight-bash .sunlight-variable,
286 | .sunlight-bash .sunlight-specialVariable {
287 | color: #FF0000 !important;
288 | }
289 |
290 | /* python */
291 | .sunlight-python .sunlight-specialMethod {
292 | font-weight: bold !important;
293 | color: #A07DD3;
294 | }
295 |
296 | /* ruby */
297 | .sunlight-ruby .sunlight-symbol {
298 | font-weight: bold !important;
299 | color: #ED7272 !important;
300 | }
301 |
302 | /* brainfuck */
303 | .sunlight-brainfuck {
304 | font-weight: bold !important;
305 | color: #000000 !important;
306 | }
307 | .sunlight-brainfuck .sunlight-increment {
308 | background-color: #FF9900 !important;
309 | }
310 | .sunlight-brainfuck .sunlight-decrement {
311 | background-color: #FF99FF !important;
312 | }
313 | .sunlight-brainfuck .sunlight-incrementPointer {
314 | background-color: #FFFF99 !important;
315 | }
316 | .sunlight-brainfuck .sunlight-decrementPointer {
317 | background-color: #66CCFF !important;
318 | }
319 | .sunlight-brainfuck .sunlight-read {
320 | background-color: #FFFFFF !important;
321 | }
322 | .sunlight-brainfuck .sunlight-write {
323 | background-color: #99FF99 !important;
324 | }
325 | .sunlight-brainfuck .sunlight-openLoop, .sunlight-brainfuck .sunlight-closeLoop {
326 | background-color: #FFFFFF !important;
327 | }
328 |
329 | /* 6502 asm */
330 | .sunlight-6502asm .sunlight-label {
331 | font-weight: bold !important;
332 | color: #000000 !important;
333 | background: none !important;
334 | }
335 |
336 | /* lisp */
337 | .sunlight-lisp .sunlight-macro {
338 | font-style: italic !important;
339 | }
340 |
341 | /* erlang */
342 | .sunlight-erlang .sunlight-atom {
343 | font-weight: bold !important;
344 | }
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.0/styles/sunlight.dark.css:
--------------------------------------------------------------------------------
1 | /* global styles */
2 | .sunlight-container {
3 | clear: both !important;
4 | position: relative !important;
5 | margin: 10px 0 !important;
6 | }
7 | .sunlight-code-container {
8 | clear: both !important;
9 | position: relative !important;
10 | border: none;
11 | border-color: #626262 !important;
12 | background-color: #262626 !important;
13 | }
14 | .sunlight-highlighted, .sunlight-container, .sunlight-container textarea {
15 | font-family: Consolas, Inconsolata, Monaco, "Courier New" !important;
16 | font-size: 12px !important;
17 | line-height: 15px !important;
18 | }
19 | .sunlight-highlighted, .sunlight-container textarea {
20 | color: #FFFFFF !important;
21 | margin: 0 !important;
22 | }
23 | .sunlight-container textarea {
24 | padding-left: 0 !important;
25 | margin-left: 0 !important;
26 | margin-right: 0 !important;
27 | padding-right: 0 !important;
28 | }
29 | .sunlight-code-container > .sunlight-highlighted {
30 | white-space: pre;
31 | overflow-x: auto;
32 | overflow-y: hidden; /* ie requires this wtf? */
33 | }
34 | .sunlight-highlighted {
35 | z-index: 1;
36 | position: relative;
37 | }
38 | .sunlight-highlighted * {
39 | background: transparent;
40 | }
41 | .sunlight-line-number-margin {
42 | float: left !important;
43 | margin-right: 5px !important;
44 | margin-top: 0 !important;
45 | margin-bottom: 0 !important;
46 | padding: 0 !important;
47 | padding-right: 4px !important;
48 | padding-left: 4px !important;
49 | border-right: 1px solid #9A9A9A !important;
50 | background-color: #3E3E3E !important;
51 | color: #9A9A9A !important;
52 | text-align: right !important;
53 | position: relative;
54 | z-index: 3;
55 | }
56 | .sunlight-highlighted a, .sunlight-line-number-margin a {
57 | border: none !important;
58 | text-decoration: none !important;
59 | font-style: normal !important;
60 | padding: 0 !important;
61 | }
62 | .sunlight-line-number-margin a {
63 | color: inherit !important;
64 | }
65 | .sunlight-line-highlight-overlay {
66 | position: absolute;
67 | top: 0;
68 | left: 0;
69 | width: 100%;
70 | z-index: 0;
71 | }
72 | .sunlight-line-highlight-overlay div {
73 | height: 15px;
74 | width: 100%;
75 | }
76 | .sunlight-line-highlight-overlay .sunlight-line-highlight-active {
77 | background-color: #4B4B4B;
78 | }
79 |
80 | /* menu */
81 | .sunlight-menu {
82 | background-color: #FFFFCC;
83 | color: #000000;
84 | }
85 | .sunlight-menu ul {
86 | margin: 0 !important;
87 | padding: 0 !important;
88 | list-style-type: none !important;
89 | }
90 | .sunlight-menu li {
91 | float: right !important;
92 | margin-left: 5px !important;
93 | }
94 | .sunlight-menu a, .sunlight-menu img {
95 | color: #000099 !important;
96 | text-decoration: none !important;
97 | border: none !important;
98 | }
99 |
100 |
101 |
102 |
103 | .sunlight-string,
104 | .sunlight-char,
105 | .sunlight-heredoc,
106 | .sunlight-heredocDeclaration,
107 | .sunlight-nowdoc,
108 | .sunlight-longString,
109 | .sunlight-rawString,
110 | .sunlight-binaryString,
111 | .sunlight-verbatimString,
112 | .sunlight-rawLongString,
113 | .sunlight-binaryLongString,
114 | .sunlight-diff .sunlight-added {
115 | color: #55EB54 !important;
116 | }
117 | .sunlight-operator,
118 | .sunlight-punctuation,
119 | .sunlight-delimiter {
120 | color: #B1EDEC !important;
121 | }
122 | .sunlight-ident,
123 | .sunlight-diff .sunlight-unchanged {
124 | color: #E0E0E0 !important;
125 | font-weight: bold !important;
126 | }
127 | .sunlight-comment,
128 | .sunlight-xmlDocCommentContent,
129 | .sunlight-nginx .sunlight-ssiCommand,
130 | .sunlight-sln .sunlight-formatDeclaration,
131 | .sunlight-diff .sunlight-mergeHeader,
132 | .sunlight-diff .sunlight-noNewLine {
133 | color: #787D31 !important;
134 | }
135 | .sunlight-number,
136 | .sunlight-cdata,
137 | .sunlight-guid,
138 | .sunlight-diff .sunlight-modified {
139 | color: #F7BA7E !important;
140 | font-weight: bold !important;
141 | }
142 | .sunlight-named-ident,
143 | .sunlight-xml .sunlight-attribute,
144 | .sunlight-constant,
145 | .sunlight-javascript .sunlight-globalVariable,
146 | .sunlight-globalObject,
147 | .sunlight-css .sunlight-id,
148 | .sunlight-python .sunlight-attribute,
149 | .sunlight-nginx .sunlight-context,
150 | .sunlight-httpd .sunlight-context,
151 | .sunlight-lisp .sunlight-declarationSpecifier,
152 | .sunlight-erlang .sunlight-userDefinedFunction,
153 | .sunlight-diff .sunlight-removed {
154 | color: #FBBDEE !important;
155 | font-weight: bold !important;
156 | }
157 | .sunlight-keyword,
158 | .sunlight-languageConstruct,
159 | .sunlight-specialOperator,
160 | .sunlight-xml .sunlight-tagName,
161 | .sunlight-xml .sunlight-operator,
162 | .sunlight-bash .sunlight-command,
163 | .sunlight-erlang .sunlight-moduleAttribute {
164 | color: #A3CCF7 !important;
165 | font-weight: bold !important;
166 | }
167 | .sunlight-shortOpenTag,
168 | .sunlight-openTag,
169 | .sunlight-closeTag,
170 | .sunlight-xmlOpenTag,
171 | .sunlight-xmlCloseTag,
172 | .sunlight-aspOpenTag,
173 | .sunlight-aspCloseTag,
174 | .sunlight-label,
175 | .sunlight-css .sunlight-importantFlag {
176 | background-color: #7373C1 !important;
177 | }
178 | .sunlight-content {
179 | color: #FFFFFF !important;
180 | font-weight: bold !important;
181 | }
182 | .sunlight-function,
183 | .sunlight-globalFunction,
184 | .sunlight-objective-c .sunlight-messageDestination,
185 | .sunlight-ruby .sunlight-specialFunction,
186 | .sunlight-6502asm .sunlight-illegalOpcode,
187 | .sunlight-powershell .sunlight-switch,
188 | .sunlight-lisp .sunlight-macro,
189 | .sunlight-lisp .sunlight-specialForm,
190 | .sunlight-lisp .sunlight-type,
191 | .sunlight-sln .sunlight-sectionName,
192 | .sunlight-diff .sunlight-header {
193 | color: #C8BBF1 !important;
194 | font-weight: bold !important;
195 | }
196 | .sunlight-variable,
197 | .sunlight-environmentVariable,
198 | .sunlight-specialVariable,
199 | .sunlight-objective-c .sunlight-messageArgumentName,
200 | .sunlight-lisp .sunlight-globalVariable,
201 | .sunlight-ruby .sunlight-globalVariable,
202 | .sunlight-ruby .sunlight-instanceVariable {
203 | color: #F5E5B0 !important;
204 | font-weight: bold !important;
205 | }
206 | .sunlight-regexLiteral,
207 | .sunlight-lisp .sunlight-operator,
208 | .sunlight-6502asm .sunlight-pseudoOp,
209 | .sunlight-erlang .sunlight-macro,
210 | .sunlight-diff .sunlight-rangeInfo {
211 | color: #E0F16A !important;
212 | }
213 | .sunlight-specialVariable {
214 | font-style: italic !important;
215 | font-weight: bold !important;
216 | }
217 | .sunlight-csharp .sunlight-pragma,
218 | .sunlight-preprocessorDirective,
219 | .sunlight-vb .sunlight-compilerDirective {
220 | color: #666363 !important;
221 | font-style: italic !important;
222 | }
223 | .sunlight-xmlDocCommentMeta,
224 | .sunlight-java .sunlight-annotation,
225 | .sunlight-scala .sunlight-annotation,
226 | .sunlight-docComment {
227 | color: #666363 !important;
228 | }
229 | .sunlight-quotedIdent,
230 | .sunlight-ruby .sunlight-subshellCommand,
231 | .sunlight-lisp .sunlight-keywordArgument,
232 | .sunlight-haskell .sunlight-infixOperator,
233 | .sunlight-erlang .sunlight-quotedAtom {
234 | color: #F8CA16 !important;
235 | }
236 |
237 |
238 |
239 |
240 | /* html/xml */
241 | .sunlight-xml .sunlight-tagName,
242 | .sunlight-xml .sunlight-operator,
243 | .sunlight-xml .sunlight-attribute {
244 | font-weight: normal !important;
245 | }
246 | .sunlight-doctype {
247 | color: #DEB9B2 !important;
248 | font-style: italic !important;
249 | }
250 | .sunlight-xml .sunlight-entity {
251 | background-color: #E6E585 !important;
252 | color: #000000 !important;
253 | }
254 |
255 | /* javascript */
256 | .sunlight-javascript .sunlight-reservedWord {
257 | font-style: italic !important;
258 | }
259 |
260 | /* css */
261 | .sunlight-css .sunlight-element {
262 | color: #E9EE97 !important;
263 | }
264 | .sunlight-css .sunlight-microsoftFilterPrefix {
265 | color: #C9FF9F !important;
266 | }
267 | .sunlight-css .sunlight-rule {
268 | color: #0099FF !important;
269 | }
270 | .sunlight-css .sunlight-class {
271 | color: #E78282 !important;
272 | }
273 | .sunlight-css .sunlight-pseudoClass, .sunlight-css .sunlight-pseudoElement {
274 | color: #73D693 !important;
275 | }
276 |
277 | /* bash */
278 | .sunlight-bash .sunlight-hashBang {
279 | color: #FFFF00 !important;
280 | }
281 |
282 | .sunlight-bash .sunlight-verbatimCommand {
283 | color: #BBA4EE !important;
284 | }
285 | .sunlight-bash .sunlight-variable,
286 | .sunlight-bash .sunlight-specialVariable {
287 | color: #ED8585 !important;
288 | }
289 |
290 | /* python */
291 | .sunlight-python .sunlight-specialMethod {
292 | font-weight: bold !important;
293 | color: #B0A3C2;
294 | }
295 |
296 | /* ruby */
297 | .sunlight-ruby .sunlight-symbol {
298 | font-weight: bold !important;
299 | color: #90EEA2 !important;
300 | }
301 |
302 | /* brainfuck */
303 | .sunlight-brainfuck {
304 | font-weight: bold !important;
305 | color: #000000 !important;
306 | }
307 | .sunlight-brainfuck .sunlight-increment {
308 | background-color: #FF9900 !important;
309 | }
310 | .sunlight-brainfuck .sunlight-decrement {
311 | background-color: #FF99FF !important;
312 | }
313 | .sunlight-brainfuck .sunlight-incrementPointer {
314 | background-color: #FFFF99 !important;
315 | }
316 | .sunlight-brainfuck .sunlight-decrementPointer {
317 | background-color: #66CCFF !important;
318 | }
319 | .sunlight-brainfuck .sunlight-read {
320 | background-color: #FFFFFF !important;
321 | }
322 | .sunlight-brainfuck .sunlight-write {
323 | background-color: #99FF99 !important;
324 | }
325 | .sunlight-brainfuck .sunlight-openLoop, .sunlight-brainfuck .sunlight-closeLoop {
326 | background-color: #FFFFFF !important;
327 | }
328 |
329 | /* 6502 asm */
330 | .sunlight-6502asm .sunlight-label {
331 | background: none !important;
332 | color: #FFFFFF !important;
333 | text-decoration: underline !important;
334 | }
335 |
336 | /* lisp */
337 | .sunlight-lisp .sunlight-macro {
338 | font-style: italic !important;
339 | }
340 |
341 | /* erlang */
342 | .sunlight-erlang .sunlight-atom {
343 | color: #FFFFFF !important;
344 | font-weight: bold !important;
345 | }
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.1/styles/sunlight.dark.css:
--------------------------------------------------------------------------------
1 | /* global styles */
2 | .sunlight-container {
3 | clear: both !important;
4 | position: relative !important;
5 | margin: 10px 0 !important;
6 | }
7 | .sunlight-code-container {
8 | clear: both !important;
9 | position: relative !important;
10 | border: none;
11 | border-color: #626262 !important;
12 | background-color: #262626 !important;
13 | }
14 | .sunlight-highlighted, .sunlight-container, .sunlight-container textarea {
15 | font-family: Consolas, Inconsolata, Monaco, "Courier New" !important;
16 | font-size: 12px !important;
17 | line-height: 15px !important;
18 | }
19 | .sunlight-highlighted, .sunlight-container textarea {
20 | color: #FFFFFF !important;
21 | margin: 0 !important;
22 | }
23 | .sunlight-container textarea {
24 | padding-left: 0 !important;
25 | margin-left: 0 !important;
26 | margin-right: 0 !important;
27 | padding-right: 0 !important;
28 | }
29 | .sunlight-code-container > .sunlight-highlighted {
30 | white-space: pre;
31 | overflow-x: auto;
32 | overflow-y: hidden; /* ie requires this wtf? */
33 | }
34 | .sunlight-highlighted {
35 | z-index: 1;
36 | position: relative;
37 | }
38 | .sunlight-highlighted * {
39 | background: transparent;
40 | }
41 | .sunlight-line-number-margin {
42 | float: left !important;
43 | margin-right: 5px !important;
44 | margin-top: 0 !important;
45 | margin-bottom: 0 !important;
46 | padding: 0 !important;
47 | padding-right: 4px !important;
48 | padding-left: 4px !important;
49 | border-right: 1px solid #9A9A9A !important;
50 | background-color: #3E3E3E !important;
51 | color: #9A9A9A !important;
52 | text-align: right !important;
53 | position: relative;
54 | z-index: 3;
55 | }
56 | .sunlight-highlighted a, .sunlight-line-number-margin a {
57 | border: none !important;
58 | text-decoration: none !important;
59 | font-style: normal !important;
60 | padding: 0 !important;
61 | }
62 | .sunlight-line-number-margin a {
63 | color: inherit !important;
64 | }
65 | .sunlight-line-highlight-overlay {
66 | position: absolute;
67 | top: 0;
68 | left: 0;
69 | width: 100%;
70 | z-index: 0;
71 | }
72 | .sunlight-line-highlight-overlay div {
73 | height: 15px;
74 | width: 100%;
75 | }
76 | .sunlight-line-highlight-overlay .sunlight-line-highlight-active {
77 | background-color: #4B4B4B;
78 | }
79 |
80 | /* menu */
81 | .sunlight-menu {
82 | background-color: #FFFFCC;
83 | color: #000000;
84 | }
85 | .sunlight-menu ul {
86 | margin: 0 !important;
87 | padding: 0 !important;
88 | list-style-type: none !important;
89 | }
90 | .sunlight-menu li {
91 | float: right !important;
92 | margin-left: 5px !important;
93 | }
94 | .sunlight-menu a, .sunlight-menu img {
95 | color: #000099 !important;
96 | text-decoration: none !important;
97 | border: none !important;
98 | }
99 |
100 |
101 |
102 |
103 | .sunlight-string,
104 | .sunlight-char,
105 | .sunlight-heredoc,
106 | .sunlight-heredocDeclaration,
107 | .sunlight-nowdoc,
108 | .sunlight-longString,
109 | .sunlight-rawString,
110 | .sunlight-binaryString,
111 | .sunlight-verbatimString,
112 | .sunlight-rawLongString,
113 | .sunlight-binaryLongString,
114 | .sunlight-diff .sunlight-added {
115 | color: #55EB54 !important;
116 | }
117 | .sunlight-operator,
118 | .sunlight-punctuation,
119 | .sunlight-delimiter {
120 | color: #B1EDEC !important;
121 | }
122 | .sunlight-ident,
123 | .sunlight-diff .sunlight-unchanged {
124 | color: #E0E0E0 !important;
125 | font-weight: bold !important;
126 | }
127 | .sunlight-comment,
128 | .sunlight-xmlDocCommentContent,
129 | .sunlight-nginx .sunlight-ssiCommand,
130 | .sunlight-sln .sunlight-formatDeclaration,
131 | .sunlight-diff .sunlight-mergeHeader,
132 | .sunlight-diff .sunlight-noNewLine {
133 | color: #787D31 !important;
134 | }
135 | .sunlight-number,
136 | .sunlight-cdata,
137 | .sunlight-guid,
138 | .sunlight-diff .sunlight-modified {
139 | color: #F7BA7E !important;
140 | font-weight: bold !important;
141 | }
142 | .sunlight-named-ident,
143 | .sunlight-xml .sunlight-attribute,
144 | .sunlight-constant,
145 | .sunlight-javascript .sunlight-globalVariable,
146 | .sunlight-globalObject,
147 | .sunlight-css .sunlight-id,
148 | .sunlight-python .sunlight-attribute,
149 | .sunlight-nginx .sunlight-context,
150 | .sunlight-httpd .sunlight-context,
151 | .sunlight-lisp .sunlight-declarationSpecifier,
152 | .sunlight-erlang .sunlight-userDefinedFunction,
153 | .sunlight-diff .sunlight-removed {
154 | color: #FBBDEE !important;
155 | font-weight: bold !important;
156 | }
157 | .sunlight-keyword,
158 | .sunlight-languageConstruct,
159 | .sunlight-specialOperator,
160 | .sunlight-xml .sunlight-tagName,
161 | .sunlight-xml .sunlight-operator,
162 | .sunlight-bash .sunlight-command,
163 | .sunlight-erlang .sunlight-moduleAttribute {
164 | color: #A3CCF7 !important;
165 | font-weight: bold !important;
166 | }
167 | .sunlight-shortOpenTag,
168 | .sunlight-openTag,
169 | .sunlight-closeTag,
170 | .sunlight-xmlOpenTag,
171 | .sunlight-xmlCloseTag,
172 | .sunlight-aspOpenTag,
173 | .sunlight-aspCloseTag,
174 | .sunlight-label,
175 | .sunlight-css .sunlight-importantFlag {
176 | background-color: #7373C1 !important;
177 | }
178 | .sunlight-content {
179 | color: #FFFFFF !important;
180 | font-weight: bold !important;
181 | }
182 | .sunlight-function,
183 | .sunlight-globalFunction,
184 | .sunlight-objective-c .sunlight-messageDestination,
185 | .sunlight-ruby .sunlight-specialFunction,
186 | .sunlight-6502asm .sunlight-illegalOpcode,
187 | .sunlight-powershell .sunlight-switch,
188 | .sunlight-lisp .sunlight-macro,
189 | .sunlight-lisp .sunlight-specialForm,
190 | .sunlight-lisp .sunlight-type,
191 | .sunlight-sln .sunlight-sectionName,
192 | .sunlight-diff .sunlight-header {
193 | color: #C8BBF1 !important;
194 | font-weight: bold !important;
195 | }
196 | .sunlight-variable,
197 | .sunlight-environmentVariable,
198 | .sunlight-specialVariable,
199 | .sunlight-objective-c .sunlight-messageArgumentName,
200 | .sunlight-lisp .sunlight-globalVariable,
201 | .sunlight-ruby .sunlight-globalVariable,
202 | .sunlight-ruby .sunlight-instanceVariable {
203 | color: #F5E5B0 !important;
204 | font-weight: bold !important;
205 | }
206 | .sunlight-regexLiteral,
207 | .sunlight-lisp .sunlight-operator,
208 | .sunlight-6502asm .sunlight-pseudoOp,
209 | .sunlight-erlang .sunlight-macro,
210 | .sunlight-diff .sunlight-rangeInfo {
211 | color: #E0F16A !important;
212 | }
213 | .sunlight-specialVariable {
214 | font-style: italic !important;
215 | font-weight: bold !important;
216 | }
217 | .sunlight-csharp .sunlight-pragma,
218 | .sunlight-preprocessorDirective,
219 | .sunlight-vb .sunlight-compilerDirective {
220 | color: #666363 !important;
221 | font-style: italic !important;
222 | }
223 | .sunlight-xmlDocCommentMeta,
224 | .sunlight-java .sunlight-annotation,
225 | .sunlight-scala .sunlight-annotation,
226 | .sunlight-docComment {
227 | color: #666363 !important;
228 | }
229 | .sunlight-quotedIdent,
230 | .sunlight-ruby .sunlight-subshellCommand,
231 | .sunlight-lisp .sunlight-keywordArgument,
232 | .sunlight-haskell .sunlight-infixOperator,
233 | .sunlight-erlang .sunlight-quotedAtom {
234 | color: #F8CA16 !important;
235 | }
236 |
237 |
238 |
239 |
240 | /* html/xml */
241 | .sunlight-xml .sunlight-tagName,
242 | .sunlight-xml .sunlight-operator,
243 | .sunlight-xml .sunlight-attribute {
244 | font-weight: normal !important;
245 | }
246 | .sunlight-doctype {
247 | color: #DEB9B2 !important;
248 | font-style: italic !important;
249 | }
250 | .sunlight-xml .sunlight-entity {
251 | background-color: #E6E585 !important;
252 | color: #000000 !important;
253 | }
254 |
255 | /* javascript */
256 | .sunlight-javascript .sunlight-reservedWord {
257 | font-style: italic !important;
258 | }
259 |
260 | /* css */
261 | .sunlight-css .sunlight-element {
262 | color: #E9EE97 !important;
263 | }
264 | .sunlight-css .sunlight-microsoftFilterPrefix {
265 | color: #C9FF9F !important;
266 | }
267 | .sunlight-css .sunlight-rule {
268 | color: #0099FF !important;
269 | }
270 | .sunlight-css .sunlight-class {
271 | color: #E78282 !important;
272 | }
273 | .sunlight-css .sunlight-pseudoClass, .sunlight-css .sunlight-pseudoElement {
274 | color: #73D693 !important;
275 | }
276 |
277 | /* bash */
278 | .sunlight-bash .sunlight-hashBang {
279 | color: #FFFF00 !important;
280 | }
281 |
282 | .sunlight-bash .sunlight-verbatimCommand {
283 | color: #BBA4EE !important;
284 | }
285 | .sunlight-bash .sunlight-variable,
286 | .sunlight-bash .sunlight-specialVariable {
287 | color: #ED8585 !important;
288 | }
289 |
290 | /* python */
291 | .sunlight-python .sunlight-specialMethod {
292 | font-weight: bold !important;
293 | color: #B0A3C2;
294 | }
295 |
296 | /* ruby */
297 | .sunlight-ruby .sunlight-symbol {
298 | font-weight: bold !important;
299 | color: #90EEA2 !important;
300 | }
301 |
302 | /* brainfuck */
303 | .sunlight-brainfuck {
304 | font-weight: bold !important;
305 | color: #000000 !important;
306 | }
307 | .sunlight-brainfuck .sunlight-increment {
308 | background-color: #FF9900 !important;
309 | }
310 | .sunlight-brainfuck .sunlight-decrement {
311 | background-color: #FF99FF !important;
312 | }
313 | .sunlight-brainfuck .sunlight-incrementPointer {
314 | background-color: #FFFF99 !important;
315 | }
316 | .sunlight-brainfuck .sunlight-decrementPointer {
317 | background-color: #66CCFF !important;
318 | }
319 | .sunlight-brainfuck .sunlight-read {
320 | background-color: #FFFFFF !important;
321 | }
322 | .sunlight-brainfuck .sunlight-write {
323 | background-color: #99FF99 !important;
324 | }
325 | .sunlight-brainfuck .sunlight-openLoop, .sunlight-brainfuck .sunlight-closeLoop {
326 | background-color: #FFFFFF !important;
327 | }
328 |
329 | /* 6502 asm */
330 | .sunlight-6502asm .sunlight-label {
331 | background: none !important;
332 | color: #FFFFFF !important;
333 | text-decoration: underline !important;
334 | }
335 |
336 | /* lisp */
337 | .sunlight-lisp .sunlight-macro {
338 | font-style: italic !important;
339 | }
340 |
341 | /* erlang */
342 | .sunlight-erlang .sunlight-atom {
343 | color: #FFFFFF !important;
344 | font-weight: bold !important;
345 | }
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.2.0/styles/sunlight.dark.css:
--------------------------------------------------------------------------------
1 | /* global styles */
2 | .sunlight-container {
3 | clear: both !important;
4 | position: relative !important;
5 | margin: 10px 0 !important;
6 | }
7 | .sunlight-code-container {
8 | clear: both !important;
9 | position: relative !important;
10 | border: none;
11 | border-color: #626262 !important;
12 | background-color: #262626 !important;
13 | }
14 | .sunlight-highlighted, .sunlight-container, .sunlight-container textarea {
15 | font-family: Consolas, Inconsolata, Monaco, "Courier New" !important;
16 | font-size: 12px !important;
17 | line-height: 15px !important;
18 | }
19 | .sunlight-highlighted, .sunlight-container textarea {
20 | color: #FFFFFF !important;
21 | margin: 0 !important;
22 | }
23 | .sunlight-container textarea {
24 | padding-left: 0 !important;
25 | margin-left: 0 !important;
26 | margin-right: 0 !important;
27 | padding-right: 0 !important;
28 | }
29 | .sunlight-code-container > .sunlight-highlighted {
30 | white-space: pre;
31 | overflow-x: auto;
32 | overflow-y: hidden; /* ie requires this wtf? */
33 | }
34 | .sunlight-highlighted {
35 | z-index: 1;
36 | position: relative;
37 | }
38 | .sunlight-highlighted * {
39 | background: transparent;
40 | }
41 | .sunlight-line-number-margin {
42 | float: left !important;
43 | margin-right: 5px !important;
44 | margin-top: 0 !important;
45 | margin-bottom: 0 !important;
46 | padding: 0 !important;
47 | padding-right: 4px !important;
48 | padding-left: 4px !important;
49 | border-right: 1px solid #9A9A9A !important;
50 | background-color: #3E3E3E !important;
51 | color: #9A9A9A !important;
52 | text-align: right !important;
53 | position: relative;
54 | z-index: 3;
55 | }
56 | .sunlight-highlighted a, .sunlight-line-number-margin a {
57 | border: none !important;
58 | text-decoration: none !important;
59 | font-style: normal !important;
60 | padding: 0 !important;
61 | }
62 | .sunlight-line-number-margin a {
63 | color: inherit !important;
64 | }
65 | .sunlight-line-highlight-overlay {
66 | position: absolute;
67 | top: 0;
68 | left: 0;
69 | width: 100%;
70 | z-index: 0;
71 | }
72 | .sunlight-line-highlight-overlay div {
73 | height: 15px;
74 | width: 100%;
75 | }
76 | .sunlight-line-highlight-overlay .sunlight-line-highlight-active {
77 | background-color: #4B4B4B;
78 | }
79 |
80 | /* menu */
81 | .sunlight-menu {
82 | background-color: #FFFFCC;
83 | color: #000000;
84 | }
85 | .sunlight-menu ul {
86 | margin: 0 !important;
87 | padding: 0 !important;
88 | list-style-type: none !important;
89 | }
90 | .sunlight-menu li {
91 | float: right !important;
92 | margin-left: 5px !important;
93 | }
94 | .sunlight-menu a, .sunlight-menu img {
95 | color: #000099 !important;
96 | text-decoration: none !important;
97 | border: none !important;
98 | }
99 |
100 |
101 |
102 |
103 | .sunlight-string,
104 | .sunlight-char,
105 | .sunlight-heredoc,
106 | .sunlight-heredocDeclaration,
107 | .sunlight-nowdoc,
108 | .sunlight-longString,
109 | .sunlight-rawString,
110 | .sunlight-binaryString,
111 | .sunlight-verbatimString,
112 | .sunlight-rawLongString,
113 | .sunlight-binaryLongString,
114 | .sunlight-diff .sunlight-added {
115 | color: #55EB54 !important;
116 | }
117 | .sunlight-operator,
118 | .sunlight-punctuation,
119 | .sunlight-delimiter {
120 | color: #B1EDEC !important;
121 | }
122 | .sunlight-ident,
123 | .sunlight-diff .sunlight-unchanged {
124 | color: #E0E0E0 !important;
125 | font-weight: bold !important;
126 | }
127 | .sunlight-comment,
128 | .sunlight-xmlDocCommentContent,
129 | .sunlight-nginx .sunlight-ssiCommand,
130 | .sunlight-sln .sunlight-formatDeclaration,
131 | .sunlight-diff .sunlight-mergeHeader,
132 | .sunlight-diff .sunlight-noNewLine {
133 | color: #787D31 !important;
134 | }
135 | .sunlight-number,
136 | .sunlight-cdata,
137 | .sunlight-guid,
138 | .sunlight-diff .sunlight-modified {
139 | color: #F7BA7E !important;
140 | font-weight: bold !important;
141 | }
142 | .sunlight-named-ident,
143 | .sunlight-xml .sunlight-attribute,
144 | .sunlight-constant,
145 | .sunlight-javascript .sunlight-globalVariable,
146 | .sunlight-globalObject,
147 | .sunlight-css .sunlight-id,
148 | .sunlight-python .sunlight-attribute,
149 | .sunlight-nginx .sunlight-context,
150 | .sunlight-httpd .sunlight-context,
151 | .sunlight-lisp .sunlight-declarationSpecifier,
152 | .sunlight-erlang .sunlight-userDefinedFunction,
153 | .sunlight-diff .sunlight-removed {
154 | color: #FBBDEE !important;
155 | font-weight: bold !important;
156 | }
157 | .sunlight-keyword,
158 | .sunlight-languageConstruct,
159 | .sunlight-specialOperator,
160 | .sunlight-xml .sunlight-tagName,
161 | .sunlight-xml .sunlight-operator,
162 | .sunlight-bash .sunlight-command,
163 | .sunlight-erlang .sunlight-moduleAttribute {
164 | color: #A3CCF7 !important;
165 | font-weight: bold !important;
166 | }
167 | .sunlight-shortOpenTag,
168 | .sunlight-openTag,
169 | .sunlight-closeTag,
170 | .sunlight-xmlOpenTag,
171 | .sunlight-xmlCloseTag,
172 | .sunlight-aspOpenTag,
173 | .sunlight-aspCloseTag,
174 | .sunlight-label,
175 | .sunlight-css .sunlight-importantFlag {
176 | background-color: #7373C1 !important;
177 | }
178 | .sunlight-content {
179 | color: #FFFFFF !important;
180 | font-weight: bold !important;
181 | }
182 | .sunlight-function,
183 | .sunlight-globalFunction,
184 | .sunlight-objective-c .sunlight-messageDestination,
185 | .sunlight-ruby .sunlight-specialFunction,
186 | .sunlight-6502asm .sunlight-illegalOpcode,
187 | .sunlight-powershell .sunlight-switch,
188 | .sunlight-lisp .sunlight-macro,
189 | .sunlight-lisp .sunlight-specialForm,
190 | .sunlight-lisp .sunlight-type,
191 | .sunlight-sln .sunlight-sectionName,
192 | .sunlight-diff .sunlight-header {
193 | color: #C8BBF1 !important;
194 | font-weight: bold !important;
195 | }
196 | .sunlight-variable,
197 | .sunlight-environmentVariable,
198 | .sunlight-specialVariable,
199 | .sunlight-objective-c .sunlight-messageArgumentName,
200 | .sunlight-lisp .sunlight-globalVariable,
201 | .sunlight-ruby .sunlight-globalVariable,
202 | .sunlight-ruby .sunlight-instanceVariable {
203 | color: #F5E5B0 !important;
204 | font-weight: bold !important;
205 | }
206 | .sunlight-regexLiteral,
207 | .sunlight-lisp .sunlight-operator,
208 | .sunlight-6502asm .sunlight-pseudoOp,
209 | .sunlight-erlang .sunlight-macro,
210 | .sunlight-diff .sunlight-rangeInfo {
211 | color: #E0F16A !important;
212 | }
213 | .sunlight-specialVariable {
214 | font-style: italic !important;
215 | font-weight: bold !important;
216 | }
217 | .sunlight-csharp .sunlight-pragma,
218 | .sunlight-preprocessorDirective,
219 | .sunlight-vb .sunlight-compilerDirective {
220 | color: #666363 !important;
221 | font-style: italic !important;
222 | }
223 | .sunlight-xmlDocCommentMeta,
224 | .sunlight-java .sunlight-annotation,
225 | .sunlight-scala .sunlight-annotation,
226 | .sunlight-docComment {
227 | color: #666363 !important;
228 | }
229 | .sunlight-quotedIdent,
230 | .sunlight-ruby .sunlight-subshellCommand,
231 | .sunlight-lisp .sunlight-keywordArgument,
232 | .sunlight-haskell .sunlight-infixOperator,
233 | .sunlight-erlang .sunlight-quotedAtom {
234 | color: #F8CA16 !important;
235 | }
236 |
237 |
238 |
239 |
240 | /* html/xml */
241 | .sunlight-xml .sunlight-tagName,
242 | .sunlight-xml .sunlight-operator,
243 | .sunlight-xml .sunlight-attribute {
244 | font-weight: normal !important;
245 | }
246 | .sunlight-doctype {
247 | color: #DEB9B2 !important;
248 | font-style: italic !important;
249 | }
250 | .sunlight-xml .sunlight-entity {
251 | background-color: #E6E585 !important;
252 | color: #000000 !important;
253 | }
254 |
255 | /* javascript */
256 | .sunlight-javascript .sunlight-reservedWord {
257 | font-style: italic !important;
258 | }
259 |
260 | /* css */
261 | .sunlight-css .sunlight-element {
262 | color: #E9EE97 !important;
263 | }
264 | .sunlight-css .sunlight-microsoftFilterPrefix {
265 | color: #C9FF9F !important;
266 | }
267 | .sunlight-css .sunlight-rule {
268 | color: #0099FF !important;
269 | }
270 | .sunlight-css .sunlight-class {
271 | color: #E78282 !important;
272 | }
273 | .sunlight-css .sunlight-pseudoClass, .sunlight-css .sunlight-pseudoElement {
274 | color: #73D693 !important;
275 | }
276 |
277 | /* bash */
278 | .sunlight-bash .sunlight-hashBang {
279 | color: #FFFF00 !important;
280 | }
281 |
282 | .sunlight-bash .sunlight-verbatimCommand {
283 | color: #BBA4EE !important;
284 | }
285 | .sunlight-bash .sunlight-variable,
286 | .sunlight-bash .sunlight-specialVariable {
287 | color: #ED8585 !important;
288 | }
289 |
290 | /* python */
291 | .sunlight-python .sunlight-specialMethod {
292 | font-weight: bold !important;
293 | color: #B0A3C2;
294 | }
295 |
296 | /* ruby */
297 | .sunlight-ruby .sunlight-symbol {
298 | font-weight: bold !important;
299 | color: #90EEA2 !important;
300 | }
301 |
302 | /* brainfuck */
303 | .sunlight-brainfuck {
304 | font-weight: bold !important;
305 | color: #000000 !important;
306 | }
307 | .sunlight-brainfuck .sunlight-increment {
308 | background-color: #FF9900 !important;
309 | }
310 | .sunlight-brainfuck .sunlight-decrement {
311 | background-color: #FF99FF !important;
312 | }
313 | .sunlight-brainfuck .sunlight-incrementPointer {
314 | background-color: #FFFF99 !important;
315 | }
316 | .sunlight-brainfuck .sunlight-decrementPointer {
317 | background-color: #66CCFF !important;
318 | }
319 | .sunlight-brainfuck .sunlight-read {
320 | background-color: #FFFFFF !important;
321 | }
322 | .sunlight-brainfuck .sunlight-write {
323 | background-color: #99FF99 !important;
324 | }
325 | .sunlight-brainfuck .sunlight-openLoop, .sunlight-brainfuck .sunlight-closeLoop {
326 | background-color: #FFFFFF !important;
327 | }
328 |
329 | /* 6502 asm */
330 | .sunlight-6502asm .sunlight-label {
331 | background: none !important;
332 | color: #FFFFFF !important;
333 | text-decoration: underline !important;
334 | }
335 |
336 | /* lisp */
337 | .sunlight-lisp .sunlight-macro {
338 | font-style: italic !important;
339 | }
340 |
341 | /* erlang */
342 | .sunlight-erlang .sunlight-atom {
343 | color: #FFFFFF !important;
344 | font-weight: bold !important;
345 | }
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.2.0/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | NaiveBayesClassifier Index
7 |
8 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
Index
53 |
54 |
55 |
56 |
57 |
58 |
naivebayesclassifier 0.2.0
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | NaiveBayesClassifier is an implementation of a Multinomial Naive-Bayes Classifier that uses Laplace Smoothing . It takes in a piece of text and tells you which category it most likely belongs to.
79 | What is this good for?
80 | "In machine learning, naive Bayes classifiers are a family of simple probabilistic classifiers based on applying Bayes' theorem with strong (naive) independence assumptions between the features." - Wikipedia: Naive Bayes classifier .
81 | You can use this implementation for categorizing any text content into any arbitrary set of categories. For example:
82 |
83 | is an email spam , or not spam ?
84 | is a news article about technology , politics , or sports ?
85 | is the author of some piece of text male , or female ?
86 | is a tweet expressing positive sentiment or negative sentiment?
87 |
88 | Depending on your specific attributes and sample size, there may be other algorithms that are better suited: Comparison of Classification Methods Based on the Type of Attributes and Sample Size .
89 | Try it now
90 | You can experiment, test and play with NaiveBayesClassifier in your browser at http://jsbin.com/xixuga/1/edit?html,js,console
91 | If you would like to try NaiveBayesClassifier as a web-service, you can use: http://nbcaas.herokuapp.com/
92 | Installing NaiveBayesClassifier
93 | NaiveBayesClassifier is shipped in UMD format, meaning that it is available as a CommonJS/AMD module or browser global. You can install it using npm :
94 | $ npm install naivebayesclassifier
95 | OR using bower :
96 | $ bower install naivebayesclassifier
97 | Basic Usage
98 | new NaiveBayesClassifier([options])
99 | Using the default tokenization function, which splits on spaces:
100 | var NaiveBayesClassifier = require('NaiveBayesClassifier'),
101 | classifier = new NaiveBayesClassifier();
102 | Or with an optional custom tokenization function that you specify:
103 | var NaiveBayesClassifier = require('NaiveBayesClassifier');
104 | var splitOnChar = function(text) {
105 | return text.split('');
106 | };
107 | var classifier = new NaiveBayesClassifier({ tokenizer: splitOnChar });
108 | .withClassifier(classifier)
109 | Recover an existing classifier, which you may have retrieved from a database or localstorage:
110 | var NaiveBayesClassifier = require('NaiveBayesClassifier'),
111 | classifier = NaiveBayesClassifier.withClassifier(existingClassifier);
112 | .learn(text, category)
113 | Teach your classifier what category the text belongs to. The more you teach your classifier, the more reliable it becomes. It will use what it has learned to identify new documents that it hasn't seen before.
114 | classifier.learn('amazing, awesome movie!! Yeah!!', 'positive');
115 | classifier.learn('terrible, shitty thing. Damn. Sucks!!', 'negative');
116 | classifier.learn('I dont really know what to make of this.', 'neutral');
117 | .categorize(text)
118 | classifier.categorize('awesome, cool, amazing!! Yay.');
119 | This will return the most likely category it thinks text belongs to and its probability. Its judgement is based on what you have taught it with .learn(text, category).
120 | {
121 | "category": "positive",
122 | "probability": 0.7687012152002337,
123 | "categories":
124 | {
125 | "positive": 0.7687012152002337,
126 | "negative": 0.15669449587155299,
127 | "neutral": 0.07460428892821332
128 | }
129 | }
130 | Complete API Documentation
131 | If you would like to explore the full API, you can find auto-generated documentation at: https://hadi.io/NaiveBayesClassifier .
132 | Acknowledgements
133 | This implementation is based on the Stanford NLP video series by Professor Dan Jurafsky & Chris Manning. This library modifies and extends work first investigated by Tolga Tezel .
134 | License
135 | Copyright (C) 2015, Hadi Michael. All rights reserved.
136 | Licensed under BSD-3-Clause
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 | Copyright (C) 2015, Hadi Michael. All rights reserved.
153 |
154 |
155 |
156 |
157 | Documentation generated by JSDoc 3.2.2
158 | on Fri, May 29th, 2015 using the DocStrap template .
160 |
161 |
162 |
163 |
164 |
165 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.0/scripts/prettify/Apache-License-2.0.txt:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [yyyy] [name of copyright owner]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
203 |
--------------------------------------------------------------------------------
/docs/NaiveBayesClassifier/0.1.1/scripts/prettify/Apache-License-2.0.txt:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [yyyy] [name of copyright owner]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
203 |
--------------------------------------------------------------------------------