├── .deepsource.toml
├── .github
└── config.yml
├── .gitignore
├── LICENSE
├── README.md
├── docs
├── .gitattributes
├── css
│ ├── animate.css
│ ├── bootstrap-theme.css
│ ├── bootstrap-theme.css.map
│ ├── bootstrap-theme.min.css
│ ├── bootstrap.css
│ ├── bootstrap.css.map
│ ├── bootstrap.min.css
│ ├── custom.css
│ ├── prettyPhoto.css
│ ├── stroke.css
│ └── style.css
├── fonts
│ ├── Stroke-Gap-Icons.eot
│ ├── Stroke-Gap-Icons.svg
│ ├── Stroke-Gap-Icons.ttf
│ ├── Stroke-Gap-Icons.woff
│ ├── font-awesome-4.3.0
│ │ ├── css
│ │ │ ├── font-awesome.css
│ │ │ └── font-awesome.min.css
│ │ └── fonts
│ │ │ ├── FontAwesome.otf
│ │ │ ├── fontawesome-webfont.eot
│ │ │ ├── fontawesome-webfont.svg
│ │ │ ├── fontawesome-webfont.ttf
│ │ │ ├── fontawesome-webfont.woff
│ │ │ └── fontawesome-webfont.woff2
│ ├── glyphicons-halflings-regular.eot
│ ├── glyphicons-halflings-regular.svg
│ ├── glyphicons-halflings-regular.ttf
│ ├── glyphicons-halflings-regular.woff
│ ├── lanenar_Lane.eot
│ ├── lanenar_Lane.svg
│ ├── lanenar_Lane.ttf
│ └── lanenar_Lane.woff
├── images
│ ├── dummy.png
│ ├── favicon.ico
│ ├── nlp.jpg
│ ├── prettyPhoto
│ │ ├── dark_rounded
│ │ │ ├── btnNext.png
│ │ │ ├── btnPrevious.png
│ │ │ ├── contentPattern.png
│ │ │ ├── default_thumbnail.gif
│ │ │ ├── loader.gif
│ │ │ └── sprite.png
│ │ ├── dark_square
│ │ │ ├── btnNext.png
│ │ │ ├── btnPrevious.png
│ │ │ ├── contentPattern.png
│ │ │ ├── default_thumbnail.gif
│ │ │ ├── loader.gif
│ │ │ └── sprite.png
│ │ ├── default
│ │ │ ├── default_thumb.png
│ │ │ ├── loader.gif
│ │ │ ├── sprite.png
│ │ │ ├── sprite_next.png
│ │ │ ├── sprite_prev.png
│ │ │ ├── sprite_x.png
│ │ │ └── sprite_y.png
│ │ ├── facebook
│ │ │ ├── btnNext.png
│ │ │ ├── btnPrevious.png
│ │ │ ├── contentPatternBottom.png
│ │ │ ├── contentPatternLeft.png
│ │ │ ├── contentPatternRight.png
│ │ │ ├── contentPatternTop.png
│ │ │ ├── default_thumbnail.gif
│ │ │ ├── loader.gif
│ │ │ └── sprite.png
│ │ ├── light_rounded
│ │ │ ├── btnNext.png
│ │ │ ├── btnPrevious.png
│ │ │ ├── default_thumbnail.gif
│ │ │ ├── loader.gif
│ │ │ └── sprite.png
│ │ └── light_square
│ │ │ ├── btnNext.png
│ │ │ ├── btnPrevious.png
│ │ │ ├── default_thumbnail.gif
│ │ │ ├── loader.gif
│ │ │ └── sprite.png
│ └── upload
│ │ ├── bg.png
│ │ ├── plugin1.png
│ │ ├── plugin2.png
│ │ ├── plugin3.png
│ │ └── thumbnail.png
├── index.html
└── js
│ ├── bootstrap.js
│ ├── bootstrap.min.js
│ ├── custom.js
│ ├── jquery.fitvids.js
│ ├── jquery.min.js
│ ├── jquery.min.map
│ ├── jquery.prettyPhoto.js
│ ├── main.js
│ ├── retina.js
│ ├── syntax-highlighter
│ ├── scripts
│ │ ├── shAutoloader.js
│ │ ├── shBrushAS3.js
│ │ ├── shBrushAppleScript.js
│ │ ├── shBrushBash.js
│ │ ├── shBrushCSharp.js
│ │ ├── shBrushColdFusion.js
│ │ ├── shBrushCpp.js
│ │ ├── shBrushCss.js
│ │ ├── shBrushDelphi.js
│ │ ├── shBrushDiff.js
│ │ ├── shBrushErlang.js
│ │ ├── shBrushGroovy.js
│ │ ├── shBrushJScript.js
│ │ ├── shBrushJava.js
│ │ ├── shBrushJavaFX.js
│ │ ├── shBrushPerl.js
│ │ ├── shBrushPhp.js
│ │ ├── shBrushPlain.js
│ │ ├── shBrushPowerShell.js
│ │ ├── shBrushPython.js
│ │ ├── shBrushRuby.js
│ │ ├── shBrushSass.js
│ │ ├── shBrushScala.js
│ │ ├── shBrushSql.js
│ │ ├── shBrushVb.js
│ │ ├── shBrushXml.js
│ │ ├── shCore.js
│ │ └── shLegacy.js
│ └── styles
│ │ ├── shCore.css
│ │ ├── shCoreDefault.css
│ │ ├── shCoreDjango.css
│ │ ├── shCoreEclipse.css
│ │ ├── shCoreEmacs.css
│ │ ├── shCoreFadeToGrey.css
│ │ ├── shCoreMDUltra.css
│ │ ├── shCoreMidnight.css
│ │ ├── shCoreRDark.css
│ │ ├── shThemeDefault.css
│ │ ├── shThemeDjango.css
│ │ ├── shThemeEclipse.css
│ │ ├── shThemeEmacs.css
│ │ ├── shThemeFadeToGrey.css
│ │ ├── shThemeMDUltra.css
│ │ ├── shThemeMidnight.css
│ │ └── shThemeRDark.css
│ └── wow.js
├── nlp-learning.md
├── nlp
└── inverted_index.py
└── text-summarization
├── TF_IDF_Summarization.py
├── Word_Frequency_Summarization.py
└── text_rank_sentences.py
/.deepsource.toml:
--------------------------------------------------------------------------------
1 | version = 1
2 |
3 | [[analyzers]]
4 | name = "python"
5 | enabled = true
6 |
7 | [analyzers.meta]
8 | runtime_version = "3.x.x"
9 |
--------------------------------------------------------------------------------
/.github/config.yml:
--------------------------------------------------------------------------------
1 | # These are the available config settings.
2 | keyword: ["@todo", "TODO"] # string|string[]
3 | bodyKeyword: ["@body", "BODY"] # string|string[]
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | build/
12 | develop-eggs/
13 | dist/
14 | downloads/
15 | eggs/
16 | .eggs/
17 | lib/
18 | lib64/
19 | parts/
20 | sdist/
21 | var/
22 | wheels/
23 | *.egg-info/
24 | .installed.cfg
25 | *.egg
26 | MANIFEST
27 |
28 | # PyInstaller
29 | # Usually these files are written by a python script from a template
30 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
31 | *.manifest
32 | *.spec
33 |
34 | # Installer logs
35 | pip-log.txt
36 | pip-delete-this-directory.txt
37 |
38 | # Unit test / coverage reports
39 | htmlcov/
40 | .tox/
41 | .coverage
42 | .coverage.*
43 | .cache
44 | nosetests.xml
45 | coverage.xml
46 | *.cover
47 | .hypothesis/
48 | .pytest_cache/
49 |
50 | # Translations
51 | *.mo
52 | *.pot
53 |
54 | # Django stuff:
55 | *.log
56 | local_settings.py
57 | db.sqlite3
58 |
59 | # Flask stuff:
60 | instance/
61 | .webassets-cache
62 |
63 | # Scrapy stuff:
64 | .scrapy
65 |
66 | # Sphinx documentation
67 | docs/_build/
68 |
69 | # PyBuilder
70 | target/
71 |
72 | # Jupyter Notebook
73 | .ipynb_checkpoints
74 |
75 | # pyenv
76 | .python-version
77 |
78 | # celery beat schedule file
79 | celerybeat-schedule
80 |
81 | # SageMath parsed files
82 | *.sage.py
83 |
84 | # Environments
85 | .env
86 | .venv
87 | env/
88 | venv/
89 | ENV/
90 | env.bak/
91 | venv.bak/
92 |
93 | # Spyder project settings
94 | .spyderproject
95 | .spyproject
96 |
97 | # Rope project settings
98 | .ropeproject
99 |
100 | # mkdocs documentation
101 | /site
102 |
103 | # mypy
104 | .mypy_cache/
105 |
106 | # IDE
107 | .idea/
108 |
109 | # ZIP
110 | *.zip
111 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Akash Panchal
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # nlp-akash
2 | ## Natural Language Processing notes and implementations
3 | Learning Notes: [nlp-learning](https://github.com/akashp1712/nlp-akash/blob/master/nlp-learning.md)
4 |
5 | #### Note: if you like my work, please support by adding yourself for [LessenText](https://yep.so/p/lessentextai?ref=github) Beta program.
6 |
7 |
8 |
9 |
10 |
11 | ## Text Summarization
12 | --------------------
13 | ### Algorithms
14 | --------------------
15 | #### 1. Summarization implementation using word frequency.
16 | [](https://share.streamlit.io/akashp1712/streamlit-text-summarization/main/app.py)
17 | Code: [**Word_Frequency_Summarization:**](https://github.com/akashp1712/nlp-akash/blob/master/text-summarization/Word_Frequency_Summarization.py)
18 | Article: [**Text summarization in 5 steps using NLTK**](https://becominghuman.ai/text-summarization-in-5-steps-using-nltk-65b21e352b65)
19 |
20 | #### 2. Summarization implementation using TF-IDF algorithm
21 | [](https://share.streamlit.io/akashp1712/streamlit-text-summarization/main/app.py)
22 | Code: [**TF_IDf_Summarization:**](https://github.com/akashp1712/nlp-akash/blob/master/text-summarization/TF_IDF_Summarization.py)
23 | Article: [**Text Summarization using TF-IDF**](https://towardsdatascience.com/text-summarization-using-tf-idf-e64a0644ace3)
24 |
25 | #### 3. Fetch top sentences using TextRank Algorithm
26 | Code: [**TextRank for Sentences:**](https://github.com/akashp1712/nlp-akash/blob/master/text-summarization/text_rank_sentences.py)
27 | Article: [**Sentence Extraction in Python using TextRank Algorithm**](https://medium.com/analytics-vidhya/sentence-extraction-using-textrank-algorithm-7f5c8fd568cd)
28 |
29 |
30 | --------------------
31 | ### Projects
32 | --------------------
33 | #### 1. Summarize webapge from the given URL.
34 | Code: [**https://github.com/akashp1712/summarize_webpage**](https://github.com/akashp1712/summarize_webpage)
35 |
--------------------------------------------------------------------------------
/docs/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/docs/css/custom.css:
--------------------------------------------------------------------------------
1 | /*Docs*/
2 |
3 | .body {
4 | position: relative;
5 | }
6 |
7 | .sub-title {
8 | font-size: 30px;
9 | margin-top: 50px;
10 | margin-bottom: 10px;
11 | padding-bottom: 0;
12 | }
13 |
14 | .sub-title a {
15 | font-size: 16px;
16 | }
17 |
18 | .section.docs-heading {
19 | padding: 60px 0;
20 | }
21 |
22 | .affix {
23 | position: static;
24 | }
25 |
26 | @media (min-width: 992px) {
27 | .affix,
28 | .affix-bottom {
29 | width: 213px
30 | }
31 | .affix {
32 | position: fixed;
33 | top: 20px
34 | }
35 | .affix-bottom {
36 | position: absolute
37 | }
38 | .affix .bs-docs-sidenav,
39 | .affix-bottom .bs-docs-sidenav {
40 | margin-top: 0;
41 | margin-bottom: 0
42 | }
43 | }
44 |
45 | @media (min-width: 1200px) {
46 | .affix,
47 | .affix-bottom {
48 | width: 263px
49 | }
50 | }
51 |
52 | /* SIDEBAR */
53 |
54 | @media (min-width: 768px) {
55 | .docs-sidebar {
56 | padding-top: 20px;
57 | padding-left: 20px
58 | }
59 | }
60 |
61 | /* all links */
62 | .docs-sidebar .nav>li>a {
63 | color: #111;
64 | border-left: 2px solid transparent;
65 | padding: 0 20px;
66 | font-size: 15px;
67 | font-weight: 400;
68 | }
69 |
70 | /* nested links */
71 | .docs-sidebar .nav .nav>li>a {
72 | padding-left: 40px;
73 | font-size: 14px;
74 | }
75 |
76 | /* hover links */
77 | .docs-sidebar .nav>li:not(.active)>a:hover {
78 | color: #0E97EE;
79 | text-decoration: none;
80 | background-color: transparent;
81 | border-left-width: 1px;
82 | border-left-color: #0E97EE;
83 | }
84 | /* focus links */
85 | .docs-sidebar .nav>li>a:focus {
86 | text-decoration: none;
87 | background-color: transparent;
88 | }
89 | /* active links */
90 | .docs-sidebar .nav>.active>a {
91 | color: #0E97EE;
92 | text-decoration: none;
93 | background-color: transparent;
94 | border-left-color: #0E97EE;
95 | }
96 | /* all active links */
97 | .docs-sidebar .nav>.active>a,
98 | .docs-sidebar .nav>.active:hover>a,
99 | .docs-sidebar .nav>.active:focus>a {
100 | font-weight: 700;
101 | }
102 | /* nested active links */
103 | .docs-sidebar .nav .nav>.active>a,
104 | .docs-sidebar .nav .nav>.active:hover>a,
105 | .docs-sidebar .nav .nav>.active:focus>a {
106 | font-weight: 500;
107 | }
108 |
109 | @media (min-width: 992px) {
110 | .docs-sidebar .nav ul {
111 | display: none;
112 | padding-bottom: 10px;
113 | }
114 | .docs-sidebar .nav>.active>ul {
115 | display: block
116 | }
117 | }
118 | /*Syntax Highlighter : Sublime Theme */
119 |
120 | .syntaxhighlighter {
121 | background-color: #2b303b !important;
122 | padding: 15px 0;
123 | margin: 2em 0 1em 0 !important;
124 | }
125 |
126 | .syntaxhighlighter a,
127 | .syntaxhighlighter div,
128 | .syntaxhighlighter code,
129 | .syntaxhighlighter table,
130 | .syntaxhighlighter table td,
131 | .syntaxhighlighter table tr,
132 | .syntaxhighlighter table tbody,
133 | .syntaxhighlighter table thead,
134 | .syntaxhighlighter table caption,
135 | .syntaxhighlighter textarea {
136 | line-height: 1.3em !important;
137 | }
138 |
139 | .syntaxhighlighter .line.alt1 {
140 | background-color: #2b303b !important;
141 | }
142 |
143 | .syntaxhighlighter .line.alt2 {
144 | background-color: #2b303b !important;
145 | }
146 |
147 | .syntaxhighlighter .string,
148 | .syntaxhighlighter .string a {
149 | color: #90be8c !important;
150 | }
151 |
152 | .syntaxhighlighter .color1,
153 | .syntaxhighlighter .color1 a {
154 | color: #d08770 !important;
155 | }
156 |
157 | .syntaxhighlighter .plain,
158 | .syntaxhighlighter .plain a {
159 | color: #c0c5ce !important;
160 | }
161 |
162 | .syntaxhighlighter .keyword {
163 | color: #bf616a !important;
164 | }
165 |
166 | .syntaxhighlighter .gutter {
167 | color: #757a84 !important;
168 | }
169 |
170 | .syntaxhighlighter .line.highlighted.alt1,
171 | .syntaxhighlighter .line.highlighted.alt2 {
172 | background-color: #333E49 !important;
173 | }
174 |
175 | .syntaxhighlighter .gutter .line.highlighted {
176 | background-color: #343d46 !important;
177 | color: #757a84 !important;
178 | }
179 |
180 | .syntaxhighlighter .value {
181 | color: #96b5b4 !important;
182 | }
183 | /*css*/
184 | /* .syntaxhighlighter .css.plain,
185 | .syntaxhighlighter .css.plain a {
186 | color: #d08770 !important;
187 | }
188 |
189 | .syntaxhighlighter .css.keyword {
190 | color: #c0c5ce !important;
191 | }*/
192 |
193 | .syntaxhighlighter .color3,
194 | .syntaxhighlighter .color3 a {
195 | color: #b48ead !important;
196 | }
197 | /*js*/
198 |
199 | .syntaxhighlighter .js.keyword {
200 | color: #b48ead !important;
201 | }
202 |
--------------------------------------------------------------------------------
/docs/css/style.css:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------
2 |
3 | File Name: style.css
4 | Template Name: Documentation
5 | Created By: Surjith S M
6 | http://themeforest.net/user/surjithctly
7 |
8 | 1. IMPORT
9 | 2. SKELETON
10 |
11 | ------------------------------------------------------- */
12 | /* ----------------------------------------------------
13 | IMPORT
14 | ------------------------------------------------------- */
15 |
16 | @import url(http://fonts.googleapis.com/css?family=Lato:400,100,100italic,300,300italic,400italic,700,700italic,900,900italic);
17 | /* ----------------------------------------------------
18 | SKELETON
19 | ------------------------------------------------------- */
20 |
21 | body {
22 | background: #fff;
23 | color: #777777;
24 | font-size: 14px;
25 | line-height: 31px;
26 | letter-spacing: 0;
27 | font-weight: 400;
28 | padding: 0;
29 | }
30 |
31 | h1,
32 | h2,
33 | h3,
34 | h4,
35 | h5,
36 | h6 {
37 | letter-spacing: 0px;
38 | font-weight: normal;
39 | position: relative;
40 | padding: 0 0 10px 0;
41 | font-weight: normal;
42 | line-height: 1.8;
43 | color: #242424;
44 | }
45 |
46 | h1 {
47 | font-size: 22px;
48 | }
49 |
50 | h2 {
51 | font-size: 20px;
52 | }
53 |
54 | h3 {
55 | font-size: 18px;
56 | }
57 |
58 | h4 {
59 | font-size: 21px;
60 | }
61 |
62 | h5 {
63 | font-size: 14px;
64 | }
65 |
66 | h6 {
67 | font-size: 14px;
68 | }
69 |
70 | h1 a,
71 | h2 a,
72 | h3 a,
73 | h4 a,
74 | h5 a,
75 | h6 a {
76 | text-decoration: none !important;
77 | }
78 |
79 | p {
80 | font-size: 16px;
81 | font-weight: 400;
82 | line-height: 26px;
83 | letter-spacing: 0;
84 | margin-top: 15px;
85 | }
86 |
87 | img.aligncenter {
88 | display: block;
89 | text-align: center;
90 | display: block;
91 | margin: 0 auto 20px auto;
92 | padding: 0px;
93 | border: 0px;
94 | background: none;
95 | }
96 |
97 | ol li ul li {
98 | padding-left: 20px;
99 | }
100 |
101 | img.alignleft {
102 | float: left;
103 | margin: 6px 20px 6px 0;
104 | display: inline;
105 | border: 0px;
106 | background: none;
107 | padding: 0;
108 | display: block;
109 | }
110 |
111 | img.alignright {
112 | padding: 0;
113 | float: right;
114 | margin: 6px 0 6px 20px;
115 | border: 0px;
116 | display: block;
117 | background: none;
118 | }
119 |
120 | blockquote {
121 | font-size: 16px;
122 | line-height: 32px;
123 | font-family: 'Droid Serif', Georgia, "Times New Roman", serif;
124 | font-weight: normal;
125 | font-style: italic;
126 | position: relative;
127 | width: auto;
128 | }
129 |
130 | blockquote small {
131 | display: block;
132 | margin-top: 20px;
133 | }
134 |
135 | pre {
136 | line-height: 18px;
137 | margin-bottom: 18px;
138 | }
139 |
140 | .btn,
141 | a {
142 | outline: 0 !important;
143 | text-decoration: none !important;
144 | }
145 |
146 | ins {
147 | text-decoration: none;
148 | }
149 |
150 | sup {
151 | bottom: 1ex;
152 | }
153 |
154 | sub {
155 | top: .5ex;
156 | }
157 |
158 | p {
159 | padding: 0 0 20px 0;
160 | }
161 |
162 | .check li:before {
163 | content: "\f00c";
164 | font-family: "FontAwesome";
165 | font-size: 16px;
166 | left: 0;
167 | color: #242424;
168 | padding-right: 5px;
169 | position: relative;
170 | top: 2px;
171 | }
172 |
173 | .check li {
174 | font-size: 14px;
175 | list-style: none;
176 | margin-bottom: 4px;
177 | }
178 |
179 | .check {
180 | margin-left: 0;
181 | padding-left: 0
182 | }
183 |
184 | .section {
185 | padding: 45px 0;
186 | position: relative;
187 | display: block;
188 | }
189 |
190 | .white {
191 | background-color: #ffffff;
192 | }
193 |
194 | strong {
195 | color: #030303;
196 | }
197 |
198 | .grey {
199 | background-color: #f3f3f3;
200 | }
201 |
202 | .big-title h1 {
203 | font-size: 48px;
204 | font-weight: 300;
205 | margin-bottom: 0;
206 | text-transform: capitalize;
207 | padding-bottom: 0;
208 | }
209 |
210 | .dark-text {
211 | font-size: 4.125rem;
212 | line-height: 4.063rem;
213 | font-weight: 300;
214 | }
215 |
216 | h4 a {
217 | font-size: 14px;
218 | font-weight: bold;
219 | }
220 |
221 | .dark-text a {
222 | font-size: 14px;
223 | font-weight: bold;
224 | padding-left: 20px;
225 | }
226 |
227 | .dark-text hr {
228 | width: 130px;
229 | margin-left: 0;
230 | margin-top: 40px;
231 | border-width: 1px;
232 | border-color: #030303;
233 | }
234 |
235 | .intro {
236 | padding: 20px;
237 | }
238 |
239 | .intro1 {
240 | margin-top: 22px;
241 | padding: 30px 0px;
242 | background-color: #f3f3f3;
243 | }
244 |
245 | .intro1 li {
246 | list-style: none;
247 | }
248 |
249 | .intro1 a {
250 | color: #0E97EE !important;
251 | }
252 |
253 | .intro a {
254 | color: #030303;
255 | font-weight: 400;
256 | font-size: 16px;
257 | }
258 |
259 | .lead {
260 | text-transform: capitalize;
261 | }
262 |
263 | .left-align img {
264 | margin-top: 20px;
265 | }
266 |
267 | .drop-caps p:first-child::first-letter {
268 | color: #030303;
269 | display: block;
270 | float: left;
271 | font-size: 75px;
272 | line-height: 60px;
273 | text-transform: uppercase;
274 | margin-right: 10px;
275 | margin-top: 5px;
276 | padding: 4px;
277 | }
278 |
279 | .drop-caps.full p:first-child::first-letter {
280 | background: #030303 none repeat scroll 0 0 !important;
281 | color: #ffffff;
282 | margin-right: 15px;
283 | padding: 20px;
284 | font-size: 36px;
285 | font-family: Georgia;
286 | border-radius: 5px;
287 | }
288 |
289 | mark {
290 | background-color: #0E97EE;
291 | color: #ffffff;
292 | padding: 0 10px;
293 | }
294 |
295 | a:focus,
296 | a:hover {
297 | color: #0E97EE;
298 | }
299 |
300 | .intro2 i {
301 | padding-right: 10px;
302 | font-size: 21px;
303 | }
304 |
305 | .intro2 {
306 | background-color: #0E97EE;
307 | border: 2px solid #2187BB;
308 | border-radius: 5px;
309 | color: #ffffff;
310 | font-style: italic;
311 | padding: 10px 20px;
312 | }
313 |
314 | .intro2 p {
315 | padding: 0;
316 | }
317 |
318 | .intro2 a {
319 | color: #ffffff;
320 | font-weight: bold;
321 | }
322 |
323 | .intro1 ul {
324 | padding: 0 30px;
325 | }
326 |
327 | .btn-primary {
328 | background-color: #0E97EE;
329 | border: 1px solid #2187BB;
330 | }
331 |
332 | .btn-primary:hover {
333 | background-color: #2187BB;
334 | border: 1px solid #0E97EE;
335 | }
336 |
337 | .btn-info {
338 | background-color: #545454;
339 | border: 1px solid #656565;
340 | }
341 |
342 | .btn-info:hover {
343 | background-color: #656565;
344 | border: 1px solid #545454;
345 | }
346 |
347 | .navbar-inverse .navbar-nav > .active > a,
348 | .navbar-inverse .navbar-nav > .active > a:hover,
349 | .navbar-inverse .navbar-nav > .active > a:focus {
350 | background-color: #0E97EE;
351 | color: #fff;
352 | }
353 |
354 | .navbar-inverse {
355 | background-color: #030303;
356 | border: 0;
357 | }
358 |
359 | .navbar-inverse li.btn {
360 | border-radius: 0 !important;
361 | padding: 0;
362 | }
363 |
364 | .navbar-inverse li.btn a {
365 | color: #ffffff !important;
366 | }
367 |
--------------------------------------------------------------------------------
/docs/fonts/Stroke-Gap-Icons.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/fonts/Stroke-Gap-Icons.eot
--------------------------------------------------------------------------------
/docs/fonts/Stroke-Gap-Icons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/fonts/Stroke-Gap-Icons.ttf
--------------------------------------------------------------------------------
/docs/fonts/Stroke-Gap-Icons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/fonts/Stroke-Gap-Icons.woff
--------------------------------------------------------------------------------
/docs/fonts/font-awesome-4.3.0/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/fonts/font-awesome-4.3.0/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/docs/fonts/font-awesome-4.3.0/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/fonts/font-awesome-4.3.0/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/docs/fonts/font-awesome-4.3.0/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/fonts/font-awesome-4.3.0/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/docs/fonts/font-awesome-4.3.0/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/fonts/font-awesome-4.3.0/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/docs/fonts/font-awesome-4.3.0/fonts/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/fonts/font-awesome-4.3.0/fonts/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/docs/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/docs/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/docs/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/docs/fonts/lanenar_Lane.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/fonts/lanenar_Lane.eot
--------------------------------------------------------------------------------
/docs/fonts/lanenar_Lane.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/fonts/lanenar_Lane.ttf
--------------------------------------------------------------------------------
/docs/fonts/lanenar_Lane.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/fonts/lanenar_Lane.woff
--------------------------------------------------------------------------------
/docs/images/dummy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/dummy.png
--------------------------------------------------------------------------------
/docs/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/favicon.ico
--------------------------------------------------------------------------------
/docs/images/nlp.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/nlp.jpg
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/dark_rounded/btnNext.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/dark_rounded/btnNext.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/dark_rounded/btnPrevious.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/dark_rounded/btnPrevious.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/dark_rounded/contentPattern.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/dark_rounded/contentPattern.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/dark_rounded/default_thumbnail.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/dark_rounded/default_thumbnail.gif
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/dark_rounded/loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/dark_rounded/loader.gif
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/dark_rounded/sprite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/dark_rounded/sprite.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/dark_square/btnNext.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/dark_square/btnNext.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/dark_square/btnPrevious.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/dark_square/btnPrevious.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/dark_square/contentPattern.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/dark_square/contentPattern.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/dark_square/default_thumbnail.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/dark_square/default_thumbnail.gif
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/dark_square/loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/dark_square/loader.gif
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/dark_square/sprite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/dark_square/sprite.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/default/default_thumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/default/default_thumb.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/default/loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/default/loader.gif
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/default/sprite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/default/sprite.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/default/sprite_next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/default/sprite_next.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/default/sprite_prev.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/default/sprite_prev.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/default/sprite_x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/default/sprite_x.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/default/sprite_y.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/default/sprite_y.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/facebook/btnNext.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/facebook/btnNext.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/facebook/btnPrevious.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/facebook/btnPrevious.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/facebook/contentPatternBottom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/facebook/contentPatternBottom.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/facebook/contentPatternLeft.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/facebook/contentPatternLeft.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/facebook/contentPatternRight.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/facebook/contentPatternRight.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/facebook/contentPatternTop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/facebook/contentPatternTop.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/facebook/default_thumbnail.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/facebook/default_thumbnail.gif
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/facebook/loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/facebook/loader.gif
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/facebook/sprite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/facebook/sprite.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/light_rounded/btnNext.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/light_rounded/btnNext.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/light_rounded/btnPrevious.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/light_rounded/btnPrevious.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/light_rounded/default_thumbnail.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/light_rounded/default_thumbnail.gif
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/light_rounded/loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/light_rounded/loader.gif
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/light_rounded/sprite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/light_rounded/sprite.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/light_square/btnNext.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/light_square/btnNext.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/light_square/btnPrevious.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/light_square/btnPrevious.png
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/light_square/default_thumbnail.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/light_square/default_thumbnail.gif
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/light_square/loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/light_square/loader.gif
--------------------------------------------------------------------------------
/docs/images/prettyPhoto/light_square/sprite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/prettyPhoto/light_square/sprite.png
--------------------------------------------------------------------------------
/docs/images/upload/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/upload/bg.png
--------------------------------------------------------------------------------
/docs/images/upload/plugin1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/upload/plugin1.png
--------------------------------------------------------------------------------
/docs/images/upload/plugin2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/upload/plugin2.png
--------------------------------------------------------------------------------
/docs/images/upload/plugin3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/upload/plugin3.png
--------------------------------------------------------------------------------
/docs/images/upload/thumbnail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashp1712/nlp-akash/9f1a041727f476f7348bd5de990e512ca765aefb/docs/images/upload/thumbnail.png
--------------------------------------------------------------------------------
/docs/js/custom.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | "use strict";
3 |
4 | /* ==============================================
5 | ANIMATION -->
6 | =============================================== */
7 |
8 | new WOW({
9 | boxClass: 'wow', // default
10 | animateClass: 'animated', // default
11 | offset: 0, // default
12 | mobile: true, // default
13 | live: true // default
14 | }).init();
15 |
16 | /* ==============================================
17 | LIGHTBOX -->
18 | =============================================== */
19 |
20 | jQuery('a[data-gal]').each(function() {
21 | jQuery(this).attr('rel', jQuery(this).data('gal'));
22 | });
23 | jQuery("a[data-rel^='prettyPhoto']").prettyPhoto({
24 | animationSpeed: 'slow',
25 | theme: 'light_square',
26 | slideshow: true,
27 | overlay_gallery: true,
28 | social_tools: false,
29 | deeplinking: false
30 | });
31 |
32 | /* ==============================================
33 | SCROLL -->
34 | =============================================== */
35 |
36 | $(function() {
37 | $('a[href*=#]:not([href=#])').click(function() {
38 | if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
39 | var target = $(this.hash);
40 | target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
41 | if (target.length) {
42 | $('html,body').animate({
43 | scrollTop: target.offset().top
44 | }, 1000);
45 | return false;
46 | }
47 | }
48 | });
49 | });
50 |
51 | /* ==============================================
52 | SCROLLSPY -->
53 | =============================================== */
54 |
55 | $('body').scrollspy({
56 | target: '.docs-sidebar'
57 | });
58 |
59 | $('[data-spy="scroll"]').each(function () {
60 | var $spy = $(this).scrollspy('refresh')
61 | })
62 |
63 | /* ==============================================
64 | VIDEO FIX -->
65 | =============================================== */
66 |
67 | $(document).ready(function() {
68 | // Target your .container, .wrapper, .post, etc.
69 | $(".media").fitVids();
70 | });
71 |
72 | /* ==============================================
73 | VIDEO FIX -->
74 | =============================================== */
75 |
76 | $('.docs-sidebar>nav>li>a').click(function() {
77 | $('.docs-sidebar>nav>li').removeClass('active');
78 | $(this).parent().addClass('active');
79 | });
80 |
81 | })(jQuery);
82 |
--------------------------------------------------------------------------------
/docs/js/jquery.fitvids.js:
--------------------------------------------------------------------------------
1 | /*jshint browser:true */
2 | /*!
3 | * FitVids 1.1
4 | *
5 | * Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
6 | * Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
7 | * Released under the WTFPL license - http://sam.zoy.org/wtfpl/
8 | *
9 | */
10 |
11 | ;(function( $ ){
12 |
13 | 'use strict';
14 |
15 | $.fn.fitVids = function( options ) {
16 | var settings = {
17 | customSelector: null,
18 | ignore: null
19 | };
20 |
21 | if(!document.getElementById('fit-vids-style')) {
22 | // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
23 | var head = document.head || document.getElementsByTagName('head')[0];
24 | var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';
25 | var div = document.createElement("div");
26 | div.innerHTML = '
x
';
27 | head.appendChild(div.childNodes[1]);
28 | }
29 |
30 | if ( options ) {
31 | $.extend( settings, options );
32 | }
33 |
34 | return this.each(function(){
35 | var selectors = [
36 | 'iframe[src*="player.vimeo.com"]',
37 | 'iframe[src*="youtube.com"]',
38 | 'iframe[src*="youtube-nocookie.com"]',
39 | 'iframe[src*="kickstarter.com"][src*="video.html"]',
40 | 'object',
41 | 'embed'
42 | ];
43 |
44 | if (settings.customSelector) {
45 | selectors.push(settings.customSelector);
46 | }
47 |
48 | var ignoreList = '.fitvidsignore';
49 |
50 | if(settings.ignore) {
51 | ignoreList = ignoreList + ', ' + settings.ignore;
52 | }
53 |
54 | var $allVideos = $(this).find(selectors.join(','));
55 | $allVideos = $allVideos.not('object object'); // SwfObj conflict patch
56 | $allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video.
57 |
58 | $allVideos.each(function(count){
59 | var $this = $(this);
60 | if($this.parents(ignoreList).length > 0) {
61 | return; // Disable FitVids on this video.
62 | }
63 | if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
64 | if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width'))))
65 | {
66 | $this.attr('height', 9);
67 | $this.attr('width', 16);
68 | }
69 | var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(),
70 | width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
71 | aspectRatio = height / width;
72 | if(!$this.attr('id')){
73 | var videoID = 'fitvid' + count;
74 | $this.attr('id', videoID);
75 | }
76 | $this.wrap('').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%');
77 | $this.removeAttr('height').removeAttr('width');
78 | });
79 | });
80 | };
81 | // Works with either jQuery or Zepto
82 | })( window.jQuery || window.Zepto );
83 |
--------------------------------------------------------------------------------
/docs/js/main.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function() {
2 |
3 | SyntaxHighlighter.defaults['toolbar'] = false;
4 | SyntaxHighlighter.all();
5 |
6 | });
7 |
--------------------------------------------------------------------------------
/docs/js/retina.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Retina.js v1.3.0
3 | *
4 | * Copyright 2014 Imulus, LLC
5 | * Released under the MIT license
6 | *
7 | * Retina.js is an open source script that makes it easy to serve
8 | * high-resolution images to devices with retina displays.
9 | */
10 |
11 | (function() {
12 | var root = (typeof exports === 'undefined' ? window : exports);
13 | var config = {
14 | // An option to choose a suffix for 2x images
15 | retinaImageSuffix : '@2x',
16 |
17 | // Ensure Content-Type is an image before trying to load @2x image
18 | // https://github.com/imulus/retinajs/pull/45)
19 | check_mime_type: true,
20 |
21 | // Resize high-resolution images to original image's pixel dimensions
22 | // https://github.com/imulus/retinajs/issues/8
23 | force_original_dimensions: true
24 | };
25 |
26 | function Retina() {}
27 |
28 | root.Retina = Retina;
29 |
30 | Retina.configure = function(options) {
31 | if (options === null) {
32 | options = {};
33 | }
34 |
35 | for (var prop in options) {
36 | if (options.hasOwnProperty(prop)) {
37 | config[prop] = options[prop];
38 | }
39 | }
40 | };
41 |
42 | Retina.init = function(context) {
43 | if (context === null) {
44 | context = root;
45 | }
46 |
47 | var existing_onload = context.onload || function(){};
48 |
49 | context.onload = function() {
50 | var images = document.getElementsByTagName('img'), retinaImages = [], i, image;
51 | for (i = 0; i < images.length; i += 1) {
52 | image = images[i];
53 | if (!!!image.getAttributeNode('data-no-retina')) {
54 | retinaImages.push(new RetinaImage(image));
55 | }
56 | }
57 | existing_onload();
58 | };
59 | };
60 |
61 | Retina.isRetina = function(){
62 | var mediaQuery = '(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)';
63 |
64 | if (root.devicePixelRatio > 1) {
65 | return true;
66 | }
67 |
68 | if (root.matchMedia && root.matchMedia(mediaQuery).matches) {
69 | return true;
70 | }
71 |
72 | return false;
73 | };
74 |
75 |
76 | var regexMatch = /\.\w+$/;
77 | function suffixReplace (match) {
78 | return config.retinaImageSuffix + match;
79 | }
80 |
81 | function RetinaImagePath(path, at_2x_path) {
82 | this.path = path || '';
83 | if (typeof at_2x_path !== 'undefined' && at_2x_path !== null) {
84 | this.at_2x_path = at_2x_path;
85 | this.perform_check = false;
86 | } else {
87 | if (undefined !== document.createElement) {
88 | var locationObject = document.createElement('a');
89 | locationObject.href = this.path;
90 | locationObject.pathname = locationObject.pathname.replace(regexMatch, suffixReplace);
91 | this.at_2x_path = locationObject.href;
92 | } else {
93 | var parts = this.path.split('?');
94 | parts[0] = parts[0].replace(regexMatch, suffixReplace);
95 | this.at_2x_path = parts.join('?');
96 | }
97 | this.perform_check = true;
98 | }
99 | }
100 |
101 | root.RetinaImagePath = RetinaImagePath;
102 |
103 | RetinaImagePath.confirmed_paths = [];
104 |
105 | RetinaImagePath.prototype.is_external = function() {
106 | return !!(this.path.match(/^https?\:/i) && !this.path.match('//' + document.domain) );
107 | };
108 |
109 | RetinaImagePath.prototype.check_2x_variant = function(callback) {
110 | var http, that = this;
111 | if (this.is_external()) {
112 | return callback(false);
113 | } else if (!this.perform_check && typeof this.at_2x_path !== 'undefined' && this.at_2x_path !== null) {
114 | return callback(true);
115 | } else if (this.at_2x_path in RetinaImagePath.confirmed_paths) {
116 | return callback(true);
117 | } else {
118 | http = new XMLHttpRequest();
119 | http.open('HEAD', this.at_2x_path);
120 | http.onreadystatechange = function() {
121 | if (http.readyState !== 4) {
122 | return callback(false);
123 | }
124 |
125 | if (http.status >= 200 && http.status <= 399) {
126 | if (config.check_mime_type) {
127 | var type = http.getResponseHeader('Content-Type');
128 | if (type === null || !type.match(/^image/i)) {
129 | return callback(false);
130 | }
131 | }
132 |
133 | RetinaImagePath.confirmed_paths.push(that.at_2x_path);
134 | return callback(true);
135 | } else {
136 | return callback(false);
137 | }
138 | };
139 | http.send();
140 | }
141 | };
142 |
143 |
144 | function RetinaImage(el) {
145 | this.el = el;
146 | this.path = new RetinaImagePath(this.el.getAttribute('src'), this.el.getAttribute('data-at2x'));
147 | var that = this;
148 | this.path.check_2x_variant(function(hasVariant) {
149 | if (hasVariant) {
150 | that.swap();
151 | }
152 | });
153 | }
154 |
155 | root.RetinaImage = RetinaImage;
156 |
157 | RetinaImage.prototype.swap = function(path) {
158 | if (typeof path === 'undefined') {
159 | path = this.path.at_2x_path;
160 | }
161 |
162 | var that = this;
163 | function load() {
164 | if (! that.el.complete) {
165 | setTimeout(load, 5);
166 | } else {
167 | if (config.force_original_dimensions) {
168 | that.el.setAttribute('width', that.el.offsetWidth);
169 | that.el.setAttribute('height', that.el.offsetHeight);
170 | }
171 |
172 | that.el.setAttribute('src', path);
173 | }
174 | }
175 | load();
176 | };
177 |
178 |
179 | if (Retina.isRetina()) {
180 | Retina.init(root);
181 | }
182 | })();
183 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shAutoloader.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(2(){1 h=5;h.I=2(){2 n(c,a){4(1 d=0;d|<|≥|>=|≤|<=|\*|\+|-|\/|÷|\^)/g,
48 | css: 'color2' },
49 |
50 | { regex: /\b(?:and|as|div|mod|not|or|return(?!\s&)(ing)?|equals|(is(n't| not)? )?equal( to)?|does(n't| not) equal|(is(n't| not)? )?(greater|less) than( or equal( to)?)?|(comes|does(n't| not) come) (after|before)|is(n't| not)?( in)? (back|front) of|is(n't| not)? behind|is(n't| not)?( (in|contained by))?|does(n't| not) contain|contain(s)?|(start|begin|end)(s)? with|((but|end) )?(consider|ignor)ing|prop(erty)?|(a )?ref(erence)?( to)?|repeat (until|while|with)|((end|exit) )?repeat|((else|end) )?if|else|(end )?(script|tell|try)|(on )?error|(put )?into|(of )?(it|me)|its|my|with (timeout( of)?|transaction)|end (timeout|transaction))\b/g,
51 | css: 'keyword' },
52 |
53 | { regex: /\b\d+(st|nd|rd|th)\b/g, // ordinals
54 | css: 'keyword' },
55 |
56 | { regex: /\b(?:about|above|against|around|at|below|beneath|beside|between|by|(apart|aside) from|(instead|out) of|into|on(to)?|over|since|thr(ough|u)|under)\b/g,
57 | css: 'color3' },
58 |
59 | { regex: /\b(?:adding folder items to|after receiving|choose( ((remote )?application|color|folder|from list|URL))?|clipboard info|set the clipboard to|(the )?clipboard|entire contents|display(ing| (alert|dialog|mode))?|document( (edited|file|nib name))?|file( (name|type))?|(info )?for|giving up after|(name )?extension|quoted form|return(ed)?|second(?! item)(s)?|list (disks|folder)|text item(s| delimiters)?|(Unicode )?text|(disk )?item(s)?|((current|list) )?view|((container|key) )?window|with (data|icon( (caution|note|stop))?|parameter(s)?|prompt|properties|seed|title)|case|diacriticals|hyphens|numeric strings|punctuation|white space|folder creation|application(s( folder)?| (processes|scripts position|support))?|((desktop )?(pictures )?|(documents|downloads|favorites|home|keychain|library|movies|music|public|scripts|sites|system|users|utilities|workflows) )folder|desktop|Folder Action scripts|font(s| panel)?|help|internet plugins|modem scripts|(system )?preferences|printer descriptions|scripting (additions|components)|shared (documents|libraries)|startup (disk|items)|temporary items|trash|on server|in AppleTalk zone|((as|long|short) )?user name|user (ID|locale)|(with )?password|in (bundle( with identifier)?|directory)|(close|open for) access|read|write( permission)?|(g|s)et eof|using( delimiters)?|starting at|default (answer|button|color|country code|entr(y|ies)|identifiers|items|name|location|script editor)|hidden( answer)?|open(ed| (location|untitled))?|error (handling|reporting)|(do( shell)?|load|run|store) script|administrator privileges|altering line endings|get volume settings|(alert|boot|input|mount|output|set) volume|output muted|(fax|random )?number|round(ing)?|up|down|toward zero|to nearest|as taught in school|system (attribute|info)|((AppleScript( Studio)?|system) )?version|(home )?directory|(IPv4|primary Ethernet) address|CPU (type|speed)|physical memory|time (stamp|to GMT)|replacing|ASCII (character|number)|localized string|from table|offset|summarize|beep|delay|say|(empty|multiple) selections allowed|(of|preferred) type|invisibles|showing( package contents)?|editable URL|(File|FTP|News|Media|Web) [Ss]ervers|Telnet hosts|Directory services|Remote applications|waiting until completion|saving( (in|to))?|path (for|to( (((current|frontmost) )?application|resource))?)|POSIX (file|path)|(background|RGB) color|(OK|cancel) button name|cancel button|button(s)?|cubic ((centi)?met(re|er)s|yards|feet|inches)|square ((kilo)?met(re|er)s|miles|yards|feet)|(centi|kilo)?met(re|er)s|miles|yards|feet|inches|lit(re|er)s|gallons|quarts|(kilo)?grams|ounces|pounds|degrees (Celsius|Fahrenheit|Kelvin)|print( (dialog|settings))?|clos(e(able)?|ing)|(de)?miniaturized|miniaturizable|zoom(ed|able)|attribute run|action (method|property|title)|phone|email|((start|end)ing|home) page|((birth|creation|current|custom|modification) )?date|((((phonetic )?(first|last|middle))|computer|host|maiden|related) |nick)?name|aim|icq|jabber|msn|yahoo|address(es)?|save addressbook|should enable action|city|country( code)?|formatte(r|d address)|(palette )?label|state|street|zip|AIM [Hh]andle(s)?|my card|select(ion| all)?|unsaved|(alpha )?value|entr(y|ies)|group|(ICQ|Jabber|MSN) handle|person|people|company|department|icon image|job title|note|organization|suffix|vcard|url|copies|collating|pages (across|down)|request print time|target( printer)?|((GUI Scripting|Script menu) )?enabled|show Computer scripts|(de)?activated|awake from nib|became (key|main)|call method|of (class|object)|center|clicked toolbar item|closed|for document|exposed|(can )?hide|idle|keyboard (down|up)|event( (number|type))?|launch(ed)?|load (image|movie|nib|sound)|owner|log|mouse (down|dragged|entered|exited|moved|up)|move|column|localization|resource|script|register|drag (info|types)|resigned (active|key|main)|resiz(e(d)?|able)|right mouse (down|dragged|up)|scroll wheel|(at )?index|should (close|open( untitled)?|quit( after last window closed)?|zoom)|((proposed|screen) )?bounds|show(n)?|behind|in front of|size (mode|to fit)|update(d| toolbar item)?|was (hidden|miniaturized)|will (become active|close|finish launching|hide|miniaturize|move|open|quit|(resign )?active|((maximum|minimum|proposed) )?size|show|zoom)|bundle|data source|movie|pasteboard|sound|tool(bar| tip)|(color|open|save) panel|coordinate system|frontmost|main( (bundle|menu|window))?|((services|(excluded from )?windows) )?menu|((executable|frameworks|resource|scripts|shared (frameworks|support)) )?path|(selected item )?identifier|data|content(s| view)?|character(s)?|click count|(command|control|option|shift) key down|context|delta (x|y|z)|key( code)?|location|pressure|unmodified characters|types|(first )?responder|playing|(allowed|selectable) identifiers|allows customization|(auto saves )?configuration|visible|image( name)?|menu form representation|tag|user(-| )defaults|associated file name|(auto|needs) display|current field editor|floating|has (resize indicator|shadow)|hides when deactivated|level|minimized (image|title)|opaque|position|release when closed|sheet|title(d)?)\b/g,
60 | css: 'color3' },
61 |
62 | { regex: new RegExp(this.getKeywords(specials), 'gm'), css: 'color3' },
63 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' },
64 | { regex: new RegExp(this.getKeywords(ordinals), 'gm'), css: 'keyword' }
65 | ];
66 | };
67 |
68 | Brush.prototype = new SyntaxHighlighter.Highlighter();
69 | Brush.aliases = ['applescript'];
70 |
71 | SyntaxHighlighter.brushes.AppleScript = Brush;
72 |
73 | // CommonJS
74 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
75 | })();
76 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushBash.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | var keywords = 'if fi then elif else for do done until while break continue case function return in eq ne ge le';
25 | var commands = 'alias apropos awk basename bash bc bg builtin bzip2 cal cat cd cfdisk chgrp chmod chown chroot' +
26 | 'cksum clear cmp comm command cp cron crontab csplit cut date dc dd ddrescue declare df ' +
27 | 'diff diff3 dig dir dircolors dirname dirs du echo egrep eject enable env ethtool eval ' +
28 | 'exec exit expand export expr false fdformat fdisk fg fgrep file find fmt fold format ' +
29 | 'free fsck ftp gawk getopts grep groups gzip hash head history hostname id ifconfig ' +
30 | 'import install join kill less let ln local locate logname logout look lpc lpr lprint ' +
31 | 'lprintd lprintq lprm ls lsof make man mkdir mkfifo mkisofs mknod more mount mtools ' +
32 | 'mv netstat nice nl nohup nslookup open op passwd paste pathchk ping popd pr printcap ' +
33 | 'printenv printf ps pushd pwd quota quotacheck quotactl ram rcp read readonly renice ' +
34 | 'remsync rm rmdir rsync screen scp sdiff sed select seq set sftp shift shopt shutdown ' +
35 | 'sleep sort source split ssh strace su sudo sum symlink sync tail tar tee test time ' +
36 | 'times touch top traceroute trap tr true tsort tty type ulimit umask umount unalias ' +
37 | 'uname unexpand uniq units unset unshar useradd usermod users uuencode uudecode v vdir ' +
38 | 'vi watch wc whereis which who whoami Wget xargs yes'
39 | ;
40 |
41 | this.regexList = [
42 | { regex: /^#!.*$/gm, css: 'preprocessor bold' },
43 | { regex: /\/[\w-\/]+/gm, css: 'plain' },
44 | { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments
45 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
46 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
47 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
48 | { regex: new RegExp(this.getKeywords(commands), 'gm'), css: 'functions' } // commands
49 | ];
50 | }
51 |
52 | Brush.prototype = new SyntaxHighlighter.Highlighter();
53 | Brush.aliases = ['bash', 'shell'];
54 |
55 | SyntaxHighlighter.brushes.Bash = Brush;
56 |
57 | // CommonJS
58 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
59 | })();
60 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushCSharp.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | var keywords = 'abstract as base bool break byte case catch char checked class const ' +
25 | 'continue decimal default delegate do double else enum event explicit ' +
26 | 'extern false finally fixed float for foreach get goto if implicit in int ' +
27 | 'interface internal is lock long namespace new null object operator out ' +
28 | 'override params private protected public readonly ref return sbyte sealed set ' +
29 | 'short sizeof stackalloc static string struct switch this throw true try ' +
30 | 'typeof uint ulong unchecked unsafe ushort using virtual void while';
31 |
32 | function fixComments(match, regexInfo)
33 | {
34 | var css = (match[0].indexOf("///") == 0)
35 | ? 'color1'
36 | : 'comments'
37 | ;
38 |
39 | return [new SyntaxHighlighter.Match(match[0], match.index, css)];
40 | }
41 |
42 | this.regexList = [
43 | { regex: SyntaxHighlighter.regexLib.singleLineCComments, func : fixComments }, // one line comments
44 | { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
45 | { regex: /@"(?:[^"]|"")*"/g, css: 'string' }, // @-quoted strings
46 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
47 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
48 | { regex: /^\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
49 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // c# keyword
50 | { regex: /\bpartial(?=\s+(?:class|interface|struct)\b)/g, css: 'keyword' }, // contextual keyword: 'partial'
51 | { regex: /\byield(?=\s+(?:return|break)\b)/g, css: 'keyword' } // contextual keyword: 'yield'
52 | ];
53 |
54 | this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
55 | };
56 |
57 | Brush.prototype = new SyntaxHighlighter.Highlighter();
58 | Brush.aliases = ['c#', 'c-sharp', 'csharp'];
59 |
60 | SyntaxHighlighter.brushes.CSharp = Brush;
61 |
62 | // CommonJS
63 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
64 | })();
65 |
66 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushColdFusion.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | // Contributed by Jen
25 | // http://www.jensbits.com/2009/05/14/coldfusion-brush-for-syntaxhighlighter-plus
26 |
27 | var funcs = 'Abs ACos AddSOAPRequestHeader AddSOAPResponseHeader AjaxLink AjaxOnLoad ArrayAppend ArrayAvg ArrayClear ArrayDeleteAt ' +
28 | 'ArrayInsertAt ArrayIsDefined ArrayIsEmpty ArrayLen ArrayMax ArrayMin ArraySet ArraySort ArraySum ArraySwap ArrayToList ' +
29 | 'Asc ASin Atn BinaryDecode BinaryEncode BitAnd BitMaskClear BitMaskRead BitMaskSet BitNot BitOr BitSHLN BitSHRN BitXor ' +
30 | 'Ceiling CharsetDecode CharsetEncode Chr CJustify Compare CompareNoCase Cos CreateDate CreateDateTime CreateObject ' +
31 | 'CreateODBCDate CreateODBCDateTime CreateODBCTime CreateTime CreateTimeSpan CreateUUID DateAdd DateCompare DateConvert ' +
32 | 'DateDiff DateFormat DatePart Day DayOfWeek DayOfWeekAsString DayOfYear DaysInMonth DaysInYear DE DecimalFormat DecrementValue ' +
33 | 'Decrypt DecryptBinary DeleteClientVariable DeserializeJSON DirectoryExists DollarFormat DotNetToCFType Duplicate Encrypt ' +
34 | 'EncryptBinary Evaluate Exp ExpandPath FileClose FileCopy FileDelete FileExists FileIsEOF FileMove FileOpen FileRead ' +
35 | 'FileReadBinary FileReadLine FileSetAccessMode FileSetAttribute FileSetLastModified FileWrite Find FindNoCase FindOneOf ' +
36 | 'FirstDayOfMonth Fix FormatBaseN GenerateSecretKey GetAuthUser GetBaseTagData GetBaseTagList GetBaseTemplatePath ' +
37 | 'GetClientVariablesList GetComponentMetaData GetContextRoot GetCurrentTemplatePath GetDirectoryFromPath GetEncoding ' +
38 | 'GetException GetFileFromPath GetFileInfo GetFunctionList GetGatewayHelper GetHttpRequestData GetHttpTimeString ' +
39 | 'GetK2ServerDocCount GetK2ServerDocCountLimit GetLocale GetLocaleDisplayName GetLocalHostIP GetMetaData GetMetricData ' +
40 | 'GetPageContext GetPrinterInfo GetProfileSections GetProfileString GetReadableImageFormats GetSOAPRequest GetSOAPRequestHeader ' +
41 | 'GetSOAPResponse GetSOAPResponseHeader GetTempDirectory GetTempFile GetTemplatePath GetTickCount GetTimeZoneInfo GetToken ' +
42 | 'GetUserRoles GetWriteableImageFormats Hash Hour HTMLCodeFormat HTMLEditFormat IIf ImageAddBorder ImageBlur ImageClearRect ' +
43 | 'ImageCopy ImageCrop ImageDrawArc ImageDrawBeveledRect ImageDrawCubicCurve ImageDrawLine ImageDrawLines ImageDrawOval ' +
44 | 'ImageDrawPoint ImageDrawQuadraticCurve ImageDrawRect ImageDrawRoundRect ImageDrawText ImageFlip ImageGetBlob ImageGetBufferedImage ' +
45 | 'ImageGetEXIFTag ImageGetHeight ImageGetIPTCTag ImageGetWidth ImageGrayscale ImageInfo ImageNegative ImageNew ImageOverlay ImagePaste ' +
46 | 'ImageRead ImageReadBase64 ImageResize ImageRotate ImageRotateDrawingAxis ImageScaleToFit ImageSetAntialiasing ImageSetBackgroundColor ' +
47 | 'ImageSetDrawingColor ImageSetDrawingStroke ImageSetDrawingTransparency ImageSharpen ImageShear ImageShearDrawingAxis ImageTranslate ' +
48 | 'ImageTranslateDrawingAxis ImageWrite ImageWriteBase64 ImageXORDrawingMode IncrementValue InputBaseN Insert Int IsArray IsBinary ' +
49 | 'IsBoolean IsCustomFunction IsDate IsDDX IsDebugMode IsDefined IsImage IsImageFile IsInstanceOf IsJSON IsLeapYear IsLocalHost ' +
50 | 'IsNumeric IsNumericDate IsObject IsPDFFile IsPDFObject IsQuery IsSimpleValue IsSOAPRequest IsStruct IsUserInAnyRole IsUserInRole ' +
51 | 'IsUserLoggedIn IsValid IsWDDX IsXML IsXmlAttribute IsXmlDoc IsXmlElem IsXmlNode IsXmlRoot JavaCast JSStringFormat LCase Left Len ' +
52 | 'ListAppend ListChangeDelims ListContains ListContainsNoCase ListDeleteAt ListFind ListFindNoCase ListFirst ListGetAt ListInsertAt ' +
53 | 'ListLast ListLen ListPrepend ListQualify ListRest ListSetAt ListSort ListToArray ListValueCount ListValueCountNoCase LJustify Log ' +
54 | 'Log10 LSCurrencyFormat LSDateFormat LSEuroCurrencyFormat LSIsCurrency LSIsDate LSIsNumeric LSNumberFormat LSParseCurrency LSParseDateTime ' +
55 | 'LSParseEuroCurrency LSParseNumber LSTimeFormat LTrim Max Mid Min Minute Month MonthAsString Now NumberFormat ParagraphFormat ParseDateTime ' +
56 | 'Pi PrecisionEvaluate PreserveSingleQuotes Quarter QueryAddColumn QueryAddRow QueryConvertForGrid QueryNew QuerySetCell QuotedValueList Rand ' +
57 | 'Randomize RandRange REFind REFindNoCase ReleaseComObject REMatch REMatchNoCase RemoveChars RepeatString Replace ReplaceList ReplaceNoCase ' +
58 | 'REReplace REReplaceNoCase Reverse Right RJustify Round RTrim Second SendGatewayMessage SerializeJSON SetEncoding SetLocale SetProfileString ' +
59 | 'SetVariable Sgn Sin Sleep SpanExcluding SpanIncluding Sqr StripCR StructAppend StructClear StructCopy StructCount StructDelete StructFind ' +
60 | 'StructFindKey StructFindValue StructGet StructInsert StructIsEmpty StructKeyArray StructKeyExists StructKeyList StructKeyList StructNew ' +
61 | 'StructSort StructUpdate Tan TimeFormat ToBase64 ToBinary ToScript ToString Trim UCase URLDecode URLEncodedFormat URLSessionFormat Val ' +
62 | 'ValueList VerifyClient Week Wrap Wrap WriteOutput XmlChildPos XmlElemNew XmlFormat XmlGetNodeType XmlNew XmlParse XmlSearch XmlTransform ' +
63 | 'XmlValidate Year YesNoFormat';
64 |
65 | var keywords = 'cfabort cfajaximport cfajaxproxy cfapplet cfapplication cfargument cfassociate cfbreak cfcache cfcalendar ' +
66 | 'cfcase cfcatch cfchart cfchartdata cfchartseries cfcol cfcollection cfcomponent cfcontent cfcookie cfdbinfo ' +
67 | 'cfdefaultcase cfdirectory cfdiv cfdocument cfdocumentitem cfdocumentsection cfdump cfelse cfelseif cferror ' +
68 | 'cfexchangecalendar cfexchangeconnection cfexchangecontact cfexchangefilter cfexchangemail cfexchangetask ' +
69 | 'cfexecute cfexit cffeed cffile cfflush cfform cfformgroup cfformitem cfftp cffunction cfgrid cfgridcolumn ' +
70 | 'cfgridrow cfgridupdate cfheader cfhtmlhead cfhttp cfhttpparam cfif cfimage cfimport cfinclude cfindex ' +
71 | 'cfinput cfinsert cfinterface cfinvoke cfinvokeargument cflayout cflayoutarea cfldap cflocation cflock cflog ' +
72 | 'cflogin cfloginuser cflogout cfloop cfmail cfmailparam cfmailpart cfmenu cfmenuitem cfmodule cfNTauthenticate ' +
73 | 'cfobject cfobjectcache cfoutput cfparam cfpdf cfpdfform cfpdfformparam cfpdfparam cfpdfsubform cfpod cfpop ' +
74 | 'cfpresentation cfpresentationslide cfpresenter cfprint cfprocessingdirective cfprocparam cfprocresult ' +
75 | 'cfproperty cfquery cfqueryparam cfregistry cfreport cfreportparam cfrethrow cfreturn cfsavecontent cfschedule ' +
76 | 'cfscript cfsearch cfselect cfset cfsetting cfsilent cfslider cfsprydataset cfstoredproc cfswitch cftable ' +
77 | 'cftextarea cfthread cfthrow cftimer cftooltip cftrace cftransaction cftree cftreeitem cftry cfupdate cfwddx ' +
78 | 'cfwindow cfxml cfzip cfzipparam';
79 |
80 | var operators = 'all and any between cross in join like not null or outer some';
81 |
82 | this.regexList = [
83 | { regex: new RegExp('--(.*)$', 'gm'), css: 'comments' }, // one line and multiline comments
84 | { regex: SyntaxHighlighter.regexLib.xmlComments, css: 'comments' }, // single quoted strings
85 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
86 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
87 | { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // functions
88 | { regex: new RegExp(this.getKeywords(operators), 'gmi'), css: 'color1' }, // operators and such
89 | { regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword
90 | ];
91 | }
92 |
93 | Brush.prototype = new SyntaxHighlighter.Highlighter();
94 | Brush.aliases = ['coldfusion','cf'];
95 |
96 | SyntaxHighlighter.brushes.ColdFusion = Brush;
97 |
98 | // CommonJS
99 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
100 | })();
101 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushCpp.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | // Copyright 2006 Shin, YoungJin
25 |
26 | var datatypes = 'ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR ' +
27 | 'DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH ' +
28 | 'HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP ' +
29 | 'HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY ' +
30 | 'HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT ' +
31 | 'HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE ' +
32 | 'LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF ' +
33 | 'LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR ' +
34 | 'LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR ' +
35 | 'PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT ' +
36 | 'PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 ' +
37 | 'POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR ' +
38 | 'PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 ' +
39 | 'PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT ' +
40 | 'SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ' +
41 | 'ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM ' +
42 | 'char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t ' +
43 | 'clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS ' +
44 | 'FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t ' +
45 | '__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t ' +
46 | 'jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler ' +
47 | 'sig_atomic_t size_t _stat __stat64 _stati64 terminate_function ' +
48 | 'time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf ' +
49 | 'va_list wchar_t wctrans_t wctype_t wint_t signed';
50 |
51 | var keywords = 'break case catch class const __finally __exception __try ' +
52 | 'const_cast continue private public protected __declspec ' +
53 | 'default delete deprecated dllexport dllimport do dynamic_cast ' +
54 | 'else enum explicit extern if for friend goto inline ' +
55 | 'mutable naked namespace new noinline noreturn nothrow ' +
56 | 'register reinterpret_cast return selectany ' +
57 | 'sizeof static static_cast struct switch template this ' +
58 | 'thread throw true false try typedef typeid typename union ' +
59 | 'using uuid virtual void volatile whcar_t while';
60 |
61 | var functions = 'assert isalnum isalpha iscntrl isdigit isgraph islower isprint' +
62 | 'ispunct isspace isupper isxdigit tolower toupper errno localeconv ' +
63 | 'setlocale acos asin atan atan2 ceil cos cosh exp fabs floor fmod ' +
64 | 'frexp ldexp log log10 modf pow sin sinh sqrt tan tanh jmp_buf ' +
65 | 'longjmp setjmp raise signal sig_atomic_t va_arg va_end va_start ' +
66 | 'clearerr fclose feof ferror fflush fgetc fgetpos fgets fopen ' +
67 | 'fprintf fputc fputs fread freopen fscanf fseek fsetpos ftell ' +
68 | 'fwrite getc getchar gets perror printf putc putchar puts remove ' +
69 | 'rename rewind scanf setbuf setvbuf sprintf sscanf tmpfile tmpnam ' +
70 | 'ungetc vfprintf vprintf vsprintf abort abs atexit atof atoi atol ' +
71 | 'bsearch calloc div exit free getenv labs ldiv malloc mblen mbstowcs ' +
72 | 'mbtowc qsort rand realloc srand strtod strtol strtoul system ' +
73 | 'wcstombs wctomb memchr memcmp memcpy memmove memset strcat strchr ' +
74 | 'strcmp strcoll strcpy strcspn strerror strlen strncat strncmp ' +
75 | 'strncpy strpbrk strrchr strspn strstr strtok strxfrm asctime ' +
76 | 'clock ctime difftime gmtime localtime mktime strftime time';
77 |
78 | this.regexList = [
79 | { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
80 | { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
81 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
82 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
83 | { regex: /^ *#.*/gm, css: 'preprocessor' },
84 | { regex: new RegExp(this.getKeywords(datatypes), 'gm'), css: 'color1 bold' },
85 | { regex: new RegExp(this.getKeywords(functions), 'gm'), css: 'functions bold' },
86 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword bold' }
87 | ];
88 | };
89 |
90 | Brush.prototype = new SyntaxHighlighter.Highlighter();
91 | Brush.aliases = ['cpp', 'c'];
92 |
93 | SyntaxHighlighter.brushes.Cpp = Brush;
94 |
95 | // CommonJS
96 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
97 | })();
98 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushCss.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | function getKeywordsCSS(str)
25 | {
26 | return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b';
27 | };
28 |
29 | function getValuesCSS(str)
30 | {
31 | return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b';
32 | };
33 |
34 | var keywords = 'ascent azimuth background-attachment background-color background-image background-position ' +
35 | 'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' +
36 | 'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' +
37 | 'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' +
38 | 'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' +
39 | 'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' +
40 | 'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' +
41 | 'height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' +
42 | 'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans ' +
43 | 'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' +
44 | 'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' +
45 | 'quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' +
46 | 'table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' +
47 | 'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index';
48 |
49 | var values = 'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+
50 | 'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+
51 | 'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double '+
52 | 'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+
53 | 'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+
54 | 'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+
55 | 'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+
56 | 'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+
57 | 'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+
58 | 'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+
59 | 'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+
60 | 'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+
61 | 'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+
62 | 'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow';
63 |
64 | var fonts = '[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif';
65 |
66 | this.regexList = [
67 | { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
68 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
69 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
70 | { regex: /\#[a-fA-F0-9]{3,6}/g, css: 'value' }, // html colors
71 | { regex: /(-?\d+)(\.\d+)?(px|em|pt|\:|\%|)/g, css: 'value' }, // sizes
72 | { regex: /!important/g, css: 'color3' }, // !important
73 | { regex: new RegExp(getKeywordsCSS(keywords), 'gm'), css: 'keyword' }, // keywords
74 | { regex: new RegExp(getValuesCSS(values), 'g'), css: 'value' }, // values
75 | { regex: new RegExp(this.getKeywords(fonts), 'g'), css: 'color1' } // fonts
76 | ];
77 |
78 | this.forHtmlScript({
79 | left: /(<|<)\s*style.*?(>|>)/gi,
80 | right: /(<|<)\/\s*style\s*(>|>)/gi
81 | });
82 | };
83 |
84 | Brush.prototype = new SyntaxHighlighter.Highlighter();
85 | Brush.aliases = ['css'];
86 |
87 | SyntaxHighlighter.brushes.CSS = Brush;
88 |
89 | // CommonJS
90 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
91 | })();
92 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushDelphi.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | var keywords = 'abs addr and ansichar ansistring array as asm begin boolean byte cardinal ' +
25 | 'case char class comp const constructor currency destructor div do double ' +
26 | 'downto else end except exports extended false file finalization finally ' +
27 | 'for function goto if implementation in inherited int64 initialization ' +
28 | 'integer interface is label library longint longword mod nil not object ' +
29 | 'of on or packed pansichar pansistring pchar pcurrency pdatetime pextended ' +
30 | 'pint64 pointer private procedure program property pshortstring pstring ' +
31 | 'pvariant pwidechar pwidestring protected public published raise real real48 ' +
32 | 'record repeat set shl shortint shortstring shr single smallint string then ' +
33 | 'threadvar to true try type unit until uses val var varirnt while widechar ' +
34 | 'widestring with word write writeln xor';
35 |
36 | this.regexList = [
37 | { regex: /\(\*[\s\S]*?\*\)/gm, css: 'comments' }, // multiline comments (* *)
38 | { regex: /{(?!\$)[\s\S]*?}/gm, css: 'comments' }, // multiline comments { }
39 | { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line
40 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
41 | { regex: /\{\$[a-zA-Z]+ .+\}/g, css: 'color1' }, // compiler Directives and Region tags
42 | { regex: /\b[\d\.]+\b/g, css: 'value' }, // numbers 12345
43 | { regex: /\$[a-zA-Z0-9]+\b/g, css: 'value' }, // numbers $F5D3
44 | { regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword
45 | ];
46 | };
47 |
48 | Brush.prototype = new SyntaxHighlighter.Highlighter();
49 | Brush.aliases = ['delphi', 'pascal', 'pas'];
50 |
51 | SyntaxHighlighter.brushes.Delphi = Brush;
52 |
53 | // CommonJS
54 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
55 | })();
56 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushDiff.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | this.regexList = [
25 | { regex: /^\+\+\+.*$/gm, css: 'color2' },
26 | { regex: /^\-\-\-.*$/gm, css: 'color2' },
27 | { regex: /^\s.*$/gm, css: 'color1' },
28 | { regex: /^@@.*@@$/gm, css: 'variable' },
29 | { regex: /^\+[^\+]{1}.*$/gm, css: 'string' },
30 | { regex: /^\-[^\-]{1}.*$/gm, css: 'comments' }
31 | ];
32 | };
33 |
34 | Brush.prototype = new SyntaxHighlighter.Highlighter();
35 | Brush.aliases = ['diff', 'patch'];
36 |
37 | SyntaxHighlighter.brushes.Diff = Brush;
38 |
39 | // CommonJS
40 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
41 | })();
42 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushErlang.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | // Contributed by Jean-Lou Dupont
25 | // http://jldupont.blogspot.com/2009/06/erlang-syntax-highlighter.html
26 |
27 | // According to: http://erlang.org/doc/reference_manual/introduction.html#1.5
28 | var keywords = 'after and andalso band begin bnot bor bsl bsr bxor '+
29 | 'case catch cond div end fun if let not of or orelse '+
30 | 'query receive rem try when xor'+
31 | // additional
32 | ' module export import define';
33 |
34 | this.regexList = [
35 | { regex: new RegExp("[A-Z][A-Za-z0-9_]+", 'g'), css: 'constants' },
36 | { regex: new RegExp("\\%.+", 'gm'), css: 'comments' },
37 | { regex: new RegExp("\\?[A-Za-z0-9_]+", 'g'), css: 'preprocessor' },
38 | { regex: new RegExp("[a-z0-9_]+:[a-z0-9_]+", 'g'), css: 'functions' },
39 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
40 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
41 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
42 | ];
43 | };
44 |
45 | Brush.prototype = new SyntaxHighlighter.Highlighter();
46 | Brush.aliases = ['erl', 'erlang'];
47 |
48 | SyntaxHighlighter.brushes.Erland = Brush;
49 |
50 | // CommonJS
51 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
52 | })();
53 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushGroovy.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | // Contributed by Andres Almiray
25 | // http://jroller.com/aalmiray/entry/nice_source_code_syntax_highlighter
26 |
27 | var keywords = 'as assert break case catch class continue def default do else extends finally ' +
28 | 'if in implements import instanceof interface new package property return switch ' +
29 | 'throw throws try while public protected private static';
30 | var types = 'void boolean byte char short int long float double';
31 | var constants = 'null';
32 | var methods = 'allProperties count get size '+
33 | 'collect each eachProperty eachPropertyName eachWithIndex find findAll ' +
34 | 'findIndexOf grep inject max min reverseEach sort ' +
35 | 'asImmutable asSynchronized flatten intersect join pop reverse subMap toList ' +
36 | 'padRight padLeft contains eachMatch toCharacter toLong toUrl tokenize ' +
37 | 'eachFile eachFileRecurse eachB yte eachLine readBytes readLine getText ' +
38 | 'splitEachLine withReader append encodeBase64 decodeBase64 filterLine ' +
39 | 'transformChar transformLine withOutputStream withPrintWriter withStream ' +
40 | 'withStreams withWriter withWriterAppend write writeLine '+
41 | 'dump inspect invokeMethod print println step times upto use waitForOrKill '+
42 | 'getText';
43 |
44 | this.regexList = [
45 | { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
46 | { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
47 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
48 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
49 | { regex: /""".*"""/g, css: 'string' }, // GStrings
50 | { regex: new RegExp('\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b', 'gi'), css: 'value' }, // numbers
51 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // goovy keyword
52 | { regex: new RegExp(this.getKeywords(types), 'gm'), css: 'color1' }, // goovy/java type
53 | { regex: new RegExp(this.getKeywords(constants), 'gm'), css: 'constants' }, // constants
54 | { regex: new RegExp(this.getKeywords(methods), 'gm'), css: 'functions' } // methods
55 | ];
56 |
57 | this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
58 | }
59 |
60 | Brush.prototype = new SyntaxHighlighter.Highlighter();
61 | Brush.aliases = ['groovy'];
62 |
63 | SyntaxHighlighter.brushes.Groovy = Brush;
64 |
65 | // CommonJS
66 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
67 | })();
68 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushJScript.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | var keywords = 'break case catch continue ' +
25 | 'default delete do else false ' +
26 | 'for function if in instanceof ' +
27 | 'new null return super switch ' +
28 | 'this throw true try typeof var while with'
29 | ;
30 |
31 | var r = SyntaxHighlighter.regexLib;
32 |
33 | this.regexList = [
34 | { regex: r.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings
35 | { regex: r.multiLineSingleQuotedString, css: 'string' }, // single quoted strings
36 | { regex: r.singleLineCComments, css: 'comments' }, // one line comments
37 | { regex: r.multiLineCComments, css: 'comments' }, // multiline comments
38 | { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
39 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords
40 | ];
41 |
42 | this.forHtmlScript(r.scriptScriptTags);
43 | };
44 |
45 | Brush.prototype = new SyntaxHighlighter.Highlighter();
46 | Brush.aliases = ['js', 'jscript', 'javascript'];
47 |
48 | SyntaxHighlighter.brushes.JScript = Brush;
49 |
50 | // CommonJS
51 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
52 | })();
53 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushJava.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | var keywords = 'abstract assert boolean break byte case catch char class const ' +
25 | 'continue default do double else enum extends ' +
26 | 'false final finally float for goto if implements import ' +
27 | 'instanceof int interface long native new null ' +
28 | 'package private protected public return ' +
29 | 'short static strictfp super switch synchronized this throw throws true ' +
30 | 'transient try void volatile while';
31 |
32 | this.regexList = [
33 | { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
34 | { regex: /\/\*([^\*][\s\S]*)?\*\//gm, css: 'comments' }, // multiline comments
35 | { regex: /\/\*(?!\*\/)\*[\s\S]*?\*\//gm, css: 'preprocessor' }, // documentation comments
36 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
37 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
38 | { regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers
39 | { regex: /(?!\@interface\b)\@[\$\w]+\b/g, css: 'color1' }, // annotation @anno
40 | { regex: /\@interface\b/g, css: 'color2' }, // @interface keyword
41 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // java keyword
42 | ];
43 |
44 | this.forHtmlScript({
45 | left : /(<|<)%[@!=]?/g,
46 | right : /%(>|>)/g
47 | });
48 | };
49 |
50 | Brush.prototype = new SyntaxHighlighter.Highlighter();
51 | Brush.aliases = ['java'];
52 |
53 | SyntaxHighlighter.brushes.Java = Brush;
54 |
55 | // CommonJS
56 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
57 | })();
58 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushJavaFX.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | // Contributed by Patrick Webster
25 | // http://patrickwebster.blogspot.com/2009/04/javafx-brush-for-syntaxhighlighter.html
26 | var datatypes = 'Boolean Byte Character Double Duration '
27 | + 'Float Integer Long Number Short String Void'
28 | ;
29 |
30 | var keywords = 'abstract after and as assert at before bind bound break catch class '
31 | + 'continue def delete else exclusive extends false finally first for from '
32 | + 'function if import in indexof init insert instanceof into inverse last '
33 | + 'lazy mixin mod nativearray new not null on or override package postinit '
34 | + 'protected public public-init public-read replace return reverse sizeof '
35 | + 'step super then this throw true try tween typeof var where while with '
36 | + 'attribute let private readonly static trigger'
37 | ;
38 |
39 | this.regexList = [
40 | { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' },
41 | { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' },
42 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
43 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
44 | { regex: /(-?\.?)(\b(\d*\.?\d+|\d+\.?\d*)(e[+-]?\d+)?|0x[a-f\d]+)\b\.?/gi, css: 'color2' }, // numbers
45 | { regex: new RegExp(this.getKeywords(datatypes), 'gm'), css: 'variable' }, // datatypes
46 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
47 | ];
48 | this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
49 | };
50 |
51 | Brush.prototype = new SyntaxHighlighter.Highlighter();
52 | Brush.aliases = ['jfx', 'javafx'];
53 |
54 | SyntaxHighlighter.brushes.JavaFX = Brush;
55 |
56 | // CommonJS
57 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
58 | })();
59 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushPerl.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | // Contributed by David Simmons-Duffin and Marty Kube
25 |
26 | var funcs =
27 | 'abs accept alarm atan2 bind binmode chdir chmod chomp chop chown chr ' +
28 | 'chroot close closedir connect cos crypt defined delete each endgrent ' +
29 | 'endhostent endnetent endprotoent endpwent endservent eof exec exists ' +
30 | 'exp fcntl fileno flock fork format formline getc getgrent getgrgid ' +
31 | 'getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr ' +
32 | 'getnetbyname getnetent getpeername getpgrp getppid getpriority ' +
33 | 'getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid ' +
34 | 'getservbyname getservbyport getservent getsockname getsockopt glob ' +
35 | 'gmtime grep hex index int ioctl join keys kill lc lcfirst length link ' +
36 | 'listen localtime lock log lstat map mkdir msgctl msgget msgrcv msgsnd ' +
37 | 'oct open opendir ord pack pipe pop pos print printf prototype push ' +
38 | 'quotemeta rand read readdir readline readlink readpipe recv rename ' +
39 | 'reset reverse rewinddir rindex rmdir scalar seek seekdir select semctl ' +
40 | 'semget semop send setgrent sethostent setnetent setpgrp setpriority ' +
41 | 'setprotoent setpwent setservent setsockopt shift shmctl shmget shmread ' +
42 | 'shmwrite shutdown sin sleep socket socketpair sort splice split sprintf ' +
43 | 'sqrt srand stat study substr symlink syscall sysopen sysread sysseek ' +
44 | 'system syswrite tell telldir time times tr truncate uc ucfirst umask ' +
45 | 'undef unlink unpack unshift utime values vec wait waitpid warn write';
46 |
47 | var keywords =
48 | 'bless caller continue dbmclose dbmopen die do dump else elsif eval exit ' +
49 | 'for foreach goto if import last local my next no our package redo ref ' +
50 | 'require return sub tie tied unless untie until use wantarray while';
51 |
52 | this.regexList = [
53 | { regex: new RegExp('#[^!].*$', 'gm'), css: 'comments' },
54 | { regex: new RegExp('^\\s*#!.*$', 'gm'), css: 'preprocessor' }, // shebang
55 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
56 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
57 | { regex: new RegExp('(\\$|@|%)\\w+', 'g'), css: 'variable' },
58 | { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' },
59 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
60 | ];
61 |
62 | this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
63 | }
64 |
65 | Brush.prototype = new SyntaxHighlighter.Highlighter();
66 | Brush.aliases = ['perl', 'Perl', 'pl'];
67 |
68 | SyntaxHighlighter.brushes.Perl = Brush;
69 |
70 | // CommonJS
71 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
72 | })();
73 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushPhp.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | var funcs = 'abs acos acosh addcslashes addslashes ' +
25 | 'array_change_key_case array_chunk array_combine array_count_values array_diff '+
26 | 'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+
27 | 'array_filter array_flip array_intersect array_intersect_assoc array_intersect_key '+
28 | 'array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map '+
29 | 'array_merge array_merge_recursive array_multisort array_pad array_pop array_product '+
30 | 'array_push array_rand array_reduce array_reverse array_search array_shift '+
31 | 'array_slice array_splice array_sum array_udiff array_udiff_assoc '+
32 | 'array_udiff_uassoc array_uintersect array_uintersect_assoc '+
33 | 'array_uintersect_uassoc array_unique array_unshift array_values array_walk '+
34 | 'array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert '+
35 | 'basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress '+
36 | 'bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir '+
37 | 'checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists '+
38 | 'closedir closelog copy cos cosh count count_chars date decbin dechex decoct '+
39 | 'deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log '+
40 | 'error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded '+
41 | 'feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents '+
42 | 'fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype '+
43 | 'floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf '+
44 | 'fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname '+
45 | 'gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt '+
46 | 'getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext '+
47 | 'gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set '+
48 | 'interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double '+
49 | 'is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long '+
50 | 'is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault '+
51 | 'is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br '+
52 | 'parse_ini_file parse_str parse_url passthru pathinfo print readlink realpath rewind rewinddir rmdir '+
53 | 'round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split '+
54 | 'str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes '+
55 | 'stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk '+
56 | 'strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime '+
57 | 'strtoupper strtr strval substr substr_compare';
58 |
59 | var keywords = 'abstract and array as break case catch cfunction class clone const continue declare default die do ' +
60 | 'else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach ' +
61 | 'function include include_once global goto if implements interface instanceof namespace new ' +
62 | 'old_function or private protected public return require require_once static switch ' +
63 | 'throw try use var while xor ';
64 |
65 | var constants = '__FILE__ __LINE__ __METHOD__ __FUNCTION__ __CLASS__';
66 |
67 | this.regexList = [
68 | { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
69 | { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
70 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
71 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
72 | { regex: /\$\w+/g, css: 'variable' }, // variables
73 | { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // common functions
74 | { regex: new RegExp(this.getKeywords(constants), 'gmi'), css: 'constants' }, // constants
75 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keyword
76 | ];
77 |
78 | this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
79 | };
80 |
81 | Brush.prototype = new SyntaxHighlighter.Highlighter();
82 | Brush.aliases = ['php'];
83 |
84 | SyntaxHighlighter.brushes.Php = Brush;
85 |
86 | // CommonJS
87 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
88 | })();
89 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushPlain.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | };
25 |
26 | Brush.prototype = new SyntaxHighlighter.Highlighter();
27 | Brush.aliases = ['text', 'plain'];
28 |
29 | SyntaxHighlighter.brushes.Plain = Brush;
30 |
31 | // CommonJS
32 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
33 | })();
34 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushPowerShell.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | // Contributes by B.v.Zanten, Getronics
25 | // http://confluence.atlassian.com/display/CONFEXT/New+Code+Macro
26 |
27 | var keywords = 'Add-Content Add-History Add-Member Add-PSSnapin Clear(-Content)? Clear-Item ' +
28 | 'Clear-ItemProperty Clear-Variable Compare-Object ConvertFrom-SecureString Convert-Path ' +
29 | 'ConvertTo-Html ConvertTo-SecureString Copy(-Item)? Copy-ItemProperty Export-Alias ' +
30 | 'Export-Clixml Export-Console Export-Csv ForEach(-Object)? Format-Custom Format-List ' +
31 | 'Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command ' +
32 | 'Get-Content Get-Credential Get-Culture Get-Date Get-EventLog Get-ExecutionPolicy ' +
33 | 'Get-Help Get-History Get-Host Get-Item Get-ItemProperty Get-Location Get-Member ' +
34 | 'Get-PfxCertificate Get-Process Get-PSDrive Get-PSProvider Get-PSSnapin Get-Service ' +
35 | 'Get-TraceSource Get-UICulture Get-Unique Get-Variable Get-WmiObject Group-Object ' +
36 | 'Import-Alias Import-Clixml Import-Csv Invoke-Expression Invoke-History Invoke-Item ' +
37 | 'Join-Path Measure-Command Measure-Object Move(-Item)? Move-ItemProperty New-Alias ' +
38 | 'New-Item New-ItemProperty New-Object New-PSDrive New-Service New-TimeSpan ' +
39 | 'New-Variable Out-Default Out-File Out-Host Out-Null Out-Printer Out-String Pop-Location ' +
40 | 'Push-Location Read-Host Remove-Item Remove-ItemProperty Remove-PSDrive Remove-PSSnapin ' +
41 | 'Remove-Variable Rename-Item Rename-ItemProperty Resolve-Path Restart-Service Resume-Service ' +
42 | 'Select-Object Select-String Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content ' +
43 | 'Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-Location Set-PSDebug ' +
44 | 'Set-Service Set-TraceSource Set(-Variable)? Sort-Object Split-Path Start-Service ' +
45 | 'Start-Sleep Start-Transcript Stop-Process Stop-Service Stop-Transcript Suspend-Service ' +
46 | 'Tee-Object Test-Path Trace-Command Update-FormatData Update-TypeData Where(-Object)? ' +
47 | 'Write-Debug Write-Error Write(-Host)? Write-Output Write-Progress Write-Verbose Write-Warning';
48 | var alias = 'ac asnp clc cli clp clv cpi cpp cvpa diff epal epcsv fc fl ' +
49 | 'ft fw gal gc gci gcm gdr ghy gi gl gm gp gps group gsv ' +
50 | 'gsnp gu gv gwmi iex ihy ii ipal ipcsv mi mp nal ndr ni nv oh rdr ' +
51 | 'ri rni rnp rp rsnp rv rvpa sal sasv sc select si sl sleep sort sp ' +
52 | 'spps spsv sv tee cat cd cp h history kill lp ls ' +
53 | 'mount mv popd ps pushd pwd r rm rmdir echo cls chdir del dir ' +
54 | 'erase rd ren type % \\?';
55 |
56 | this.regexList = [
57 | { regex: /#.*$/gm, css: 'comments' }, // one line comments
58 | { regex: /\$[a-zA-Z0-9]+\b/g, css: 'value' }, // variables $Computer1
59 | { regex: /\-[a-zA-Z]+\b/g, css: 'keyword' }, // Operators -not -and -eq
60 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
61 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
62 | { regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' },
63 | { regex: new RegExp(this.getKeywords(alias), 'gmi'), css: 'keyword' }
64 | ];
65 | };
66 |
67 | Brush.prototype = new SyntaxHighlighter.Highlighter();
68 | Brush.aliases = ['powershell', 'ps'];
69 |
70 | SyntaxHighlighter.brushes.PowerShell = Brush;
71 |
72 | // CommonJS
73 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
74 | })();
75 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushPython.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | // Contributed by Gheorghe Milas and Ahmad Sherif
25 |
26 | var keywords = 'and assert break class continue def del elif else ' +
27 | 'except exec finally for from global if import in is ' +
28 | 'lambda not or pass print raise return try yield while';
29 |
30 | var funcs = '__import__ abs all any apply basestring bin bool buffer callable ' +
31 | 'chr classmethod cmp coerce compile complex delattr dict dir ' +
32 | 'divmod enumerate eval execfile file filter float format frozenset ' +
33 | 'getattr globals hasattr hash help hex id input int intern ' +
34 | 'isinstance issubclass iter len list locals long map max min next ' +
35 | 'object oct open ord pow print property range raw_input reduce ' +
36 | 'reload repr reversed round set setattr slice sorted staticmethod ' +
37 | 'str sum super tuple type type unichr unicode vars xrange zip';
38 |
39 | var special = 'None True False self cls class_';
40 |
41 | this.regexList = [
42 | { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' },
43 | { regex: /^\s*@\w+/gm, css: 'decorator' },
44 | { regex: /(['\"]{3})([^\1])*?\1/gm, css: 'comments' },
45 | { regex: /"(?!")(?:\.|\\\"|[^\""\n])*"/gm, css: 'string' },
46 | { regex: /'(?!')(?:\.|(\\\')|[^\''\n])*'/gm, css: 'string' },
47 | { regex: /\+|\-|\*|\/|\%|=|==/gm, css: 'keyword' },
48 | { regex: /\b\d+\.?\w*/g, css: 'value' },
49 | { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' },
50 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' },
51 | { regex: new RegExp(this.getKeywords(special), 'gm'), css: 'color1' }
52 | ];
53 |
54 | this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
55 | };
56 |
57 | Brush.prototype = new SyntaxHighlighter.Highlighter();
58 | Brush.aliases = ['py', 'python'];
59 |
60 | SyntaxHighlighter.brushes.Python = Brush;
61 |
62 | // CommonJS
63 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
64 | })();
65 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushRuby.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | // Contributed by Erik Peterson.
25 |
26 | var keywords = 'alias and BEGIN begin break case class def define_method defined do each else elsif ' +
27 | 'END end ensure false for if in module new next nil not or raise redo rescue retry return ' +
28 | 'self super then throw true undef unless until when while yield';
29 |
30 | var builtins = 'Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload ' +
31 | 'Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol ' +
32 | 'ThreadGroup Thread Time TrueClass';
33 |
34 | this.regexList = [
35 | { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments
36 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
37 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
38 | { regex: /\b[A-Z0-9_]+\b/g, css: 'constants' }, // constants
39 | { regex: /:[a-z][A-Za-z0-9_]*/g, css: 'color2' }, // symbols
40 | { regex: /(\$|@@|@)\w+/g, css: 'variable bold' }, // $global, @instance, and @@class variables
41 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
42 | { regex: new RegExp(this.getKeywords(builtins), 'gm'), css: 'color1' } // builtins
43 | ];
44 |
45 | this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
46 | };
47 |
48 | Brush.prototype = new SyntaxHighlighter.Highlighter();
49 | Brush.aliases = ['ruby', 'rails', 'ror', 'rb'];
50 |
51 | SyntaxHighlighter.brushes.Ruby = Brush;
52 |
53 | // CommonJS
54 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
55 | })();
56 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushSass.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | function getKeywordsCSS(str)
25 | {
26 | return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b';
27 | };
28 |
29 | function getValuesCSS(str)
30 | {
31 | return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b';
32 | };
33 |
34 | var keywords = 'ascent azimuth background-attachment background-color background-image background-position ' +
35 | 'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' +
36 | 'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' +
37 | 'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' +
38 | 'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' +
39 | 'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' +
40 | 'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' +
41 | 'height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' +
42 | 'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans ' +
43 | 'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' +
44 | 'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' +
45 | 'quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' +
46 | 'table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' +
47 | 'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index';
48 |
49 | var values = 'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+
50 | 'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+
51 | 'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero digits disc dotted double '+
52 | 'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+
53 | 'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+
54 | 'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+
55 | 'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+
56 | 'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+
57 | 'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+
58 | 'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+
59 | 'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+
60 | 'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+
61 | 'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+
62 | 'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow';
63 |
64 | var fonts = '[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif';
65 |
66 | var statements = '!important !default';
67 | var preprocessor = '@import @extend @debug @warn @if @for @while @mixin @include';
68 |
69 | var r = SyntaxHighlighter.regexLib;
70 |
71 | this.regexList = [
72 | { regex: r.multiLineCComments, css: 'comments' }, // multiline comments
73 | { regex: r.singleLineCComments, css: 'comments' }, // singleline comments
74 | { regex: r.doubleQuotedString, css: 'string' }, // double quoted strings
75 | { regex: r.singleQuotedString, css: 'string' }, // single quoted strings
76 | { regex: /\#[a-fA-F0-9]{3,6}/g, css: 'value' }, // html colors
77 | { regex: /\b(-?\d+)(\.\d+)?(px|em|pt|\:|\%|)\b/g, css: 'value' }, // sizes
78 | { regex: /\$\w+/g, css: 'variable' }, // variables
79 | { regex: new RegExp(this.getKeywords(statements), 'g'), css: 'color3' }, // statements
80 | { regex: new RegExp(this.getKeywords(preprocessor), 'g'), css: 'preprocessor' }, // preprocessor
81 | { regex: new RegExp(getKeywordsCSS(keywords), 'gm'), css: 'keyword' }, // keywords
82 | { regex: new RegExp(getValuesCSS(values), 'g'), css: 'value' }, // values
83 | { regex: new RegExp(this.getKeywords(fonts), 'g'), css: 'color1' } // fonts
84 | ];
85 | };
86 |
87 | Brush.prototype = new SyntaxHighlighter.Highlighter();
88 | Brush.aliases = ['sass', 'scss'];
89 |
90 | SyntaxHighlighter.brushes.Sass = Brush;
91 |
92 | // CommonJS
93 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
94 | })();
95 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushScala.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | // Contributed by Yegor Jbanov and David Bernard.
25 |
26 | var keywords = 'val sealed case def true trait implicit forSome import match object null finally super ' +
27 | 'override try lazy for var catch throw type extends class while with new final yield abstract ' +
28 | 'else do if return protected private this package false';
29 |
30 | var keyops = '[_:=><%#@]+';
31 |
32 | this.regexList = [
33 | { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
34 | { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
35 | { regex: SyntaxHighlighter.regexLib.multiLineSingleQuotedString, css: 'string' }, // multi-line strings
36 | { regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString, css: 'string' }, // double-quoted string
37 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
38 | { regex: /0x[a-f0-9]+|\d+(\.\d+)?/gi, css: 'value' }, // numbers
39 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
40 | { regex: new RegExp(keyops, 'gm'), css: 'keyword' } // scala keyword
41 | ];
42 | }
43 |
44 | Brush.prototype = new SyntaxHighlighter.Highlighter();
45 | Brush.aliases = ['scala'];
46 |
47 | SyntaxHighlighter.brushes.Scala = Brush;
48 |
49 | // CommonJS
50 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
51 | })();
52 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushSql.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | var funcs = 'abs avg case cast coalesce convert count current_timestamp ' +
25 | 'current_user day isnull left lower month nullif replace right ' +
26 | 'session_user space substring sum system_user upper user year';
27 |
28 | var keywords = 'absolute action add after alter as asc at authorization begin bigint ' +
29 | 'binary bit by cascade char character check checkpoint close collate ' +
30 | 'column commit committed connect connection constraint contains continue ' +
31 | 'create cube current current_date current_time cursor database date ' +
32 | 'deallocate dec decimal declare default delete desc distinct double drop ' +
33 | 'dynamic else end end-exec escape except exec execute false fetch first ' +
34 | 'float for force foreign forward free from full function global goto grant ' +
35 | 'group grouping having hour ignore index inner insensitive insert instead ' +
36 | 'int integer intersect into is isolation key last level load local max min ' +
37 | 'minute modify move name national nchar next no numeric of off on only ' +
38 | 'open option order out output partial password precision prepare primary ' +
39 | 'prior privileges procedure public read real references relative repeatable ' +
40 | 'restrict return returns revoke rollback rollup rows rule schema scroll ' +
41 | 'second section select sequence serializable set size smallint static ' +
42 | 'statistics table temp temporary then time timestamp to top transaction ' +
43 | 'translation trigger true truncate uncommitted union unique update values ' +
44 | 'varchar varying view when where with work';
45 |
46 | var operators = 'all and any between cross in join like not null or outer some';
47 |
48 | this.regexList = [
49 | { regex: /--(.*)$/gm, css: 'comments' }, // one line and multiline comments
50 | { regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings
51 | { regex: SyntaxHighlighter.regexLib.multiLineSingleQuotedString, css: 'string' }, // single quoted strings
52 | { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'color2' }, // functions
53 | { regex: new RegExp(this.getKeywords(operators), 'gmi'), css: 'color1' }, // operators and such
54 | { regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword
55 | ];
56 | };
57 |
58 | Brush.prototype = new SyntaxHighlighter.Highlighter();
59 | Brush.aliases = ['sql'];
60 |
61 | SyntaxHighlighter.brushes.Sql = Brush;
62 |
63 | // CommonJS
64 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
65 | })();
66 |
67 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushVb.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | var keywords = 'AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto ' +
25 | 'Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate ' +
26 | 'CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType ' +
27 | 'Date Decimal Declare Default Delegate Dim DirectCast Do Double Each ' +
28 | 'Else ElseIf End Enum Erase Error Event Exit False Finally For Friend ' +
29 | 'Function Get GetType GoSub GoTo Handles If Implements Imports In ' +
30 | 'Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module ' +
31 | 'MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing ' +
32 | 'NotInheritable NotOverridable Object On Option Optional Or OrElse ' +
33 | 'Overloads Overridable Overrides ParamArray Preserve Private Property ' +
34 | 'Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume ' +
35 | 'Return Select Set Shadows Shared Short Single Static Step Stop String ' +
36 | 'Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until ' +
37 | 'Variant When While With WithEvents WriteOnly Xor';
38 |
39 | this.regexList = [
40 | { regex: /'.*$/gm, css: 'comments' }, // one line comments
41 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
42 | { regex: /^\s*#.*$/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
43 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // vb keyword
44 | ];
45 |
46 | this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
47 | };
48 |
49 | Brush.prototype = new SyntaxHighlighter.Highlighter();
50 | Brush.aliases = ['vb', 'vbnet'];
51 |
52 | SyntaxHighlighter.brushes.Vb = Brush;
53 |
54 | // CommonJS
55 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
56 | })();
57 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shBrushXml.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | function process(match, regexInfo)
25 | {
26 | var constructor = SyntaxHighlighter.Match,
27 | code = match[0],
28 | tag = new XRegExp('(<|<)[\\s\\/\\?]*(?[:\\w-\\.]+)', 'xg').exec(code),
29 | result = []
30 | ;
31 |
32 | if (match.attributes != null)
33 | {
34 | var attributes,
35 | regex = new XRegExp('(? [\\w:\\-\\.]+)' +
36 | '\\s*=\\s*' +
37 | '(? ".*?"|\'.*?\'|\\w+)',
38 | 'xg');
39 |
40 | while ((attributes = regex.exec(code)) != null)
41 | {
42 | result.push(new constructor(attributes.name, match.index + attributes.index, 'color1'));
43 | result.push(new constructor(attributes.value, match.index + attributes.index + attributes[0].indexOf(attributes.value), 'string'));
44 | }
45 | }
46 |
47 | if (tag != null)
48 | result.push(
49 | new constructor(tag.name, match.index + tag[0].indexOf(tag.name), 'keyword')
50 | );
51 |
52 | return result;
53 | }
54 |
55 | this.regexList = [
56 | { regex: new XRegExp('(\\<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\\>|>)', 'gm'), css: 'color2' }, //
57 | { regex: SyntaxHighlighter.regexLib.xmlComments, css: 'comments' }, //
58 | { regex: new XRegExp('(<|<)[\\s\\/\\?]*(\\w+)(?.*?)[\\s\\/\\?]*(>|>)', 'sg'), func: process }
59 | ];
60 | };
61 |
62 | Brush.prototype = new SyntaxHighlighter.Highlighter();
63 | Brush.aliases = ['xml', 'xhtml', 'xslt', 'html'];
64 |
65 | SyntaxHighlighter.brushes.Xml = Brush;
66 |
67 | // CommonJS
68 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
69 | })();
70 |
--------------------------------------------------------------------------------
/docs/js/syntax-highlighter/scripts/shLegacy.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('3 u={8:{}};u.8={A:4(c,k,l,m,n,o){4 d(a,b){2 a!=1?a:b}4 f(a){2 a!=1?a.E():1}c=c.I(":");3 g=c[0],e={};t={"r":K};M=1;5=8.5;9(3 j R c)e[c[j]]="r";k=f(d(k,5.C));l=f(d(l,5.D));m=f(d(m,5.s));o=f(d(o,5.Q));n=f(d(n,5["x-y"]));2{P:g,C:d(t[e.O],k),D:d(t[e.N],l),s:d({"r":r}[e.s],m),"x-y":d(4(a,b){9(3 h=T S("^"+b+"\\\\[(?\\\\w+)\\\\]$","U"),i=1,p=0;p Create a github .md file or Medium page to list regex like email, hyperlink, etc
35 |
36 |
37 | ## 2.2 Lexicon Normalization
38 |
39 | Another type of textual noise is about the multiple representations exhibited by single word.
40 |
41 | For example – “play”, “player”, “played”, “plays” and “playing” are the different variations of the word – “play”, Though they mean different but contextually all are similar.
42 |
43 | The step converts all the disparities of a word into their normalized form (also known as lemma).
44 |
45 | Normalization is a pivotal step for feature engineering with text as it converts the high dimensional features (N different features) to the low dimensional space (1 feature), which is an ideal ask for any ML model.
46 |
47 | The most common lexicon normalization practices are :
48 |
49 | ### 2.2.1 Stemming
50 | Stemming is a rudimentary rule-based process of stripping the suffixes (“ing”, “ly”, “es”, “s” etc) from a word.
51 |
52 | ### 2.2.2 Lemmatization
53 | Lemmatization, on the other hand, is an organized & step by step procedure of obtaining the root form of the word, it makes use of vocabulary (dictionary importance of words) and morphological analysis (word structure and grammar relations).
54 |
55 |
56 | ## 2.3 Object Standardization
57 | Text data often contains words or phrases which are not present in any standard lexical dictionaries. These pieces are not recognized by search engines and models.
58 |
59 | Some of the examples are – acronyms, hashtags with attached words, and colloquial slangs. With the help of regular expressions and manually prepared data dictionaries, this type of noise can be fixed, the code below uses a dictionary lookup method to replace social media slangs from a text.
60 |
61 | More on the cleaning text: https://www.analyticsvidhya.com/blog/2014/11/text-data-cleaning-steps-python/
62 |
63 |
64 | # 3 Text to Features (Feature Engineering on text data)
65 | To analyse a preprocessed data, it needs to be converted into features. Depending upon the usage, text features can be constructed using assorted techniques – Syntactical Parsing, Entities / N-grams / word-based features, Statistical features, and word embeddings.
66 |
67 | ## 3.1 Syntactic Parsing
68 |
69 | Syntactical parsing involves the analysis of words in the sentence for grammar and their arrangement in a manner that shows the relationships among the words. Dependency Grammar and Part of Speech tags are the important attributes of text syntactics.
70 |
71 |
72 | ### 3.1.1
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/nlp/inverted_index.py:
--------------------------------------------------------------------------------
1 | # Reference: https://nlpforhackers.io/building-a-simple-inverted-index-using-nltk/
2 |
3 | from collections import defaultdict
4 |
5 | import nltk
6 | from nltk.stem.snowball import EnglishStemmer
7 |
8 |
9 | class Index:
10 | """ Inverted index datastructure """
11 |
12 | def __init__(self, tokenizer, stemmer=None, stopwords=None):
13 | """
14 | :param tokenizer: -- NLTK compatible tokenizer function
15 | :param stemmer: -- NLTK compatible stemmer
16 | :param stopwords: -- list of ignore words
17 | """
18 | self.tokenizer = tokenizer
19 | self.stemmer = stemmer
20 | self.index = defaultdict(list)
21 | self.documents = {}
22 | self.__unique_id = 0
23 | if not stopwords:
24 | self.stopwords = set()
25 | else:
26 | self.stopwords = set(stopwords)
27 |
28 |
29 | def lookup(self, word):
30 | """
31 | :param word: lookup a word in the index
32 | :return: list fo relevant result
33 | """
34 | word = word.lower()
35 | if self.stemmer:
36 | word = self.stemmer.stem(word)
37 |
38 | return [self.documents.get(id, None) for id in self.index.get(word)]
39 |
40 |
41 | def add(self, document):
42 | """
43 | Add a document string to the index
44 | """
45 | for token in [t.lower() for t in nltk.word_tokenize(document)]:
46 | if token in self.stopwords:
47 | continue
48 |
49 | if self.stemmer:
50 | token = self.stemmer.stem(token)
51 |
52 | if self.__unique_id not in self.index[token]:
53 | self.index[token].append(self.__unique_id)
54 |
55 | self.documents[self.__unique_id] = document
56 | self.__unique_id += 1
57 |
58 |
59 | if __name__ == '__main__':
60 | index = Index(nltk.word_tokenize,
61 | EnglishStemmer(),
62 | nltk.corpus.stopwords.words('english'))
63 |
64 | # TOP10 Dire straits
65 | index.add('Industrial Disease')
66 | index.add('Private Investigations')
67 | index.add('So Far Away')
68 | index.add('Twisting by the Pool')
69 | index.add('Skateaway')
70 | index.add('Walk of Life')
71 | index.add('Romeo and Juliet')
72 | index.add('Tunnel of Love')
73 | index.add('Money for Nothing')
74 | index.add('Sultans of Swing')
75 |
76 | # TOP10 Led Zeppelin
77 | index.add('Stairway To Heaven')
78 | index.add('Kashmir')
79 | index.add('Achilles Last Stand')
80 | index.add('Whole Lotta Love')
81 | index.add('Immigrant Song')
82 | index.add('Black Dog')
83 | index.add('When The Levee Breaks')
84 | index.add('Since I\'ve Been Lovin\' You')
85 | index.add('Since I\'ve Been Loving You')
86 | index.add('Over the Hills and Far Away')
87 | index.add('Dazed and Confused')
88 |
89 | # Let's make some queries:
90 |
91 | print (index.lookup('loves'))
92 | # ['Tunnel of Love', 'Whole Lotta Love', "Since I've Been Loving You"]
93 |
94 | print (index.lookup('loved'))
95 | # ['Tunnel of Love', 'Whole Lotta Love', "Since I've Been Loving You"]
96 |
97 | print (index.lookup('daze'))
98 | # ['Dazed and Confused']
99 |
100 | print (index.lookup('confusion'))
101 | # ['Dazed and Confused']
102 |
--------------------------------------------------------------------------------
/text-summarization/Word_Frequency_Summarization.py:
--------------------------------------------------------------------------------
1 | # Implementation from https://dev.to/davidisrawi/build-a-quick-summarizer-with-python-and-nltk
2 |
3 | from nltk.corpus import stopwords
4 | from nltk.stem import PorterStemmer
5 | from nltk.tokenize import word_tokenize, sent_tokenize
6 |
7 | text_str = '''
8 | Those Who Are Resilient Stay In The Game Longer
9 | “On the mountains of truth you can never climb in vain: either you will reach a point higher up today, or you will be training your powers so that you will be able to climb higher tomorrow.” — Friedrich Nietzsche
10 | Challenges and setbacks are not meant to defeat you, but promote you. However, I realise after many years of defeats, it can crush your spirit and it is easier to give up than risk further setbacks and disappointments. Have you experienced this before? To be honest, I don’t have the answers. I can’t tell you what the right course of action is; only you will know. However, it’s important not to be discouraged by failure when pursuing a goal or a dream, since failure itself means different things to different people. To a person with a Fixed Mindset failure is a blow to their self-esteem, yet to a person with a Growth Mindset, it’s an opportunity to improve and find new ways to overcome their obstacles. Same failure, yet different responses. Who is right and who is wrong? Neither. Each person has a different mindset that decides their outcome. Those who are resilient stay in the game longer and draw on their inner means to succeed.
11 |
12 | I’ve coached mummy and mom clients who gave up after many years toiling away at their respective goal or dream. It was at that point their biggest breakthrough came. Perhaps all those years of perseverance finally paid off. It was the 19th Century’s minister Henry Ward Beecher who once said: “One’s best success comes after their greatest disappointments.” No one knows what the future holds, so your only guide is whether you can endure repeated defeats and disappointments and still pursue your dream. Consider the advice from the American academic and psychologist Angela Duckworth who writes in Grit: The Power of Passion and Perseverance: “Many of us, it seems, quit what we start far too early and far too often. Even more than the effort a gritty person puts in on a single day, what matters is that they wake up the next day, and the next, ready to get on that treadmill and keep going.”
13 |
14 | I know one thing for certain: don’t settle for less than what you’re capable of, but strive for something bigger. Some of you reading this might identify with this message because it resonates with you on a deeper level. For others, at the end of their tether the message might be nothing more than a trivial pep talk. What I wish to convey irrespective of where you are in your journey is: NEVER settle for less. If you settle for less, you will receive less than you deserve and convince yourself you are justified to receive it.
15 |
16 |
17 | “Two people on a precipice over Yosemite Valley” by Nathan Shipps on Unsplash
18 | Develop A Powerful Vision Of What You Want
19 | “Your problem is to bridge the gap which exists between where you are now and the goal you intend to reach.” — Earl Nightingale
20 | I recall a passage my father often used growing up in 1990s: “Don’t tell me your problems unless you’ve spent weeks trying to solve them yourself.” That advice has echoed in my mind for decades and became my motivator. Don’t leave it to other people or outside circumstances to motivate you because you will be let down every time. It must come from within you. Gnaw away at your problems until you solve them or find a solution. Problems are not stop signs, they are advising you that more work is required to overcome them. Most times, problems help you gain a skill or develop the resources to succeed later. So embrace your challenges and develop the grit to push past them instead of retreat in resignation. Where are you settling in your life right now? Could you be you playing for bigger stakes than you are? Are you willing to play bigger even if it means repeated failures and setbacks? You should ask yourself these questions to decide whether you’re willing to put yourself on the line or settle for less. And that’s fine if you’re content to receive less, as long as you’re not regretful later.
21 |
22 | If you have not achieved the success you deserve and are considering giving up, will you regret it in a few years or decades from now? Only you can answer that, but you should carve out time to discover your motivation for pursuing your goals. It’s a fact, if you don’t know what you want you’ll get what life hands you and it may not be in your best interest, affirms author Larry Weidel: “Winners know that if you don’t figure out what you want, you’ll get whatever life hands you.” The key is to develop a powerful vision of what you want and hold that image in your mind. Nurture it daily and give it life by taking purposeful action towards it.
23 |
24 | Vision + desire + dedication + patience + daily action leads to astonishing success. Are you willing to commit to this way of life or jump ship at the first sign of failure? I’m amused when I read questions written by millennials on Quora who ask how they can become rich and famous or the next Elon Musk. Success is a fickle and long game with highs and lows. Similarly, there are no assurances even if you’re an overnight sensation, to sustain it for long, particularly if you don’t have the mental and emotional means to endure it. This means you must rely on the one true constant in your favour: your personal development. The more you grow, the more you gain in terms of financial resources, status, success — simple. If you leave it to outside conditions to dictate your circumstances, you are rolling the dice on your future.
25 |
26 | So become intentional on what you want out of life. Commit to it. Nurture your dreams. Focus on your development and if you want to give up, know what’s involved before you take the plunge. Because I assure you, someone out there right now is working harder than you, reading more books, sleeping less and sacrificing all they have to realise their dreams and it may contest with yours. Don’t leave your dreams to chance.
27 | '''
28 |
29 |
30 | def _create_frequency_table(text_string) -> dict:
31 | """
32 | we create a dictionary for the word frequency table.
33 | For this, we should only use the words that are not part of the stopWords array.
34 |
35 | Removing stop words and making frequency table
36 | Stemmer - an algorithm to bring words to its root word.
37 | :rtype: dict
38 | """
39 | stopWords = set(stopwords.words("english"))
40 | words = word_tokenize(text_string)
41 | ps = PorterStemmer()
42 |
43 | freqTable = dict()
44 | for word in words:
45 | word = ps.stem(word)
46 | if word in stopWords:
47 | continue
48 | if word in freqTable:
49 | freqTable[word] += 1
50 | else:
51 | freqTable[word] = 1
52 |
53 | return freqTable
54 |
55 |
56 | def _score_sentences(sentences, freqTable) -> dict:
57 | """
58 | score a sentence by its words
59 | Basic algorithm: adding the frequency of every non-stop word in a sentence divided by total no of words in a sentence.
60 | :rtype: dict
61 | """
62 |
63 | sentenceValue = dict()
64 |
65 | for sentence in sentences:
66 | word_count_in_sentence = (len(word_tokenize(sentence)))
67 | word_count_in_sentence_except_stop_words = 0
68 | for wordValue in freqTable:
69 | if wordValue in sentence.lower():
70 | word_count_in_sentence_except_stop_words += 1
71 | if sentence[:10] in sentenceValue:
72 | sentenceValue[sentence[:10]] += freqTable[wordValue]
73 | else:
74 | sentenceValue[sentence[:10]] = freqTable[wordValue]
75 |
76 | if sentence[:10] in sentenceValue:
77 | sentenceValue[sentence[:10]] = sentenceValue[sentence[:10]] / word_count_in_sentence_except_stop_words
78 |
79 | '''
80 | Notice that a potential issue with our score algorithm is that long sentences will have an advantage over short sentences.
81 | To solve this, we're dividing every sentence score by the number of words in the sentence.
82 |
83 | Note that here sentence[:10] is the first 10 character of any sentence, this is to save memory while saving keys of
84 | the dictionary.
85 | '''
86 |
87 | return sentenceValue
88 |
89 |
90 | def _find_average_score(sentenceValue) -> int:
91 | """
92 | Find the average score from the sentence value dictionary
93 | :rtype: int
94 | """
95 | sumValues = 0
96 | for entry in sentenceValue:
97 | sumValues += sentenceValue[entry]
98 |
99 | # Average value of a sentence from original text
100 | average = (sumValues / len(sentenceValue))
101 |
102 | return average
103 |
104 |
105 | def _generate_summary(sentences, sentenceValue, threshold):
106 | sentence_count = 0
107 | summary = ''
108 |
109 | for sentence in sentences:
110 | if sentence[:10] in sentenceValue and sentenceValue[sentence[:10]] >= (threshold):
111 | summary += " " + sentence
112 | sentence_count += 1
113 |
114 | return summary
115 |
116 |
117 | def run_summarization(text):
118 | # 1 Create the word frequency table
119 | freq_table = _create_frequency_table(text)
120 |
121 | '''
122 | We already have a sentence tokenizer, so we just need
123 | to run the sent_tokenize() method to create the array of sentences.
124 | '''
125 |
126 | # 2 Tokenize the sentences
127 | sentences = sent_tokenize(text)
128 |
129 | # 3 Important Algorithm: score the sentences
130 | sentence_scores = _score_sentences(sentences, freq_table)
131 |
132 | # 4 Find the threshold
133 | threshold = _find_average_score(sentence_scores)
134 |
135 | # 5 Important Algorithm: Generate the summary
136 | summary = _generate_summary(sentences, sentence_scores, 1.3 * threshold)
137 |
138 | return summary
139 |
140 |
141 | if __name__ == '__main__':
142 | result = run_summarization(text_str)
143 | print(result)
144 |
--------------------------------------------------------------------------------
/text-summarization/text_rank_sentences.py:
--------------------------------------------------------------------------------
1 | import re
2 | from pprint import pprint
3 |
4 | import numpy as np
5 | from nltk import sent_tokenize, word_tokenize
6 |
7 | from nltk.cluster.util import cosine_distance
8 |
9 | MULTIPLE_WHITESPACE_PATTERN = re.compile(r"\s+", re.UNICODE)
10 |
11 |
12 | def normalize_whitespace(text):
13 | """
14 | Translates multiple whitespace into single space character.
15 | If there is at least one new line character chunk is replaced
16 | by single LF (Unix new line) character.
17 | """
18 | return MULTIPLE_WHITESPACE_PATTERN.sub(_replace_whitespace, text)
19 |
20 |
21 | def _replace_whitespace(match):
22 | text = match.group()
23 |
24 | if "\n" in text or "\r" in text:
25 | return "\n"
26 | else:
27 | return " "
28 |
29 |
30 | def is_blank(string):
31 | """
32 | Returns `True` if string contains only white-space characters
33 | or is empty. Otherwise `False` is returned.
34 | """
35 | return not string or string.isspace()
36 |
37 |
38 | def get_symmetric_matrix(matrix):
39 | """
40 | Get Symmetric matrix
41 | :param matrix:
42 | :return: matrix
43 | """
44 | return matrix + matrix.T - np.diag(matrix.diagonal())
45 |
46 |
47 | def core_cosine_similarity(vector1, vector2):
48 | """
49 | measure cosine similarity between two vectors
50 | :param vector1:
51 | :param vector2:
52 | :return: 0 < cosine similarity value < 1
53 | """
54 | return 1 - cosine_distance(vector1, vector2)
55 |
56 |
57 | '''
58 | Note: This is not a summarization algorithm. This Algorithm pics top sentences irrespective of the order they appeared.
59 | '''
60 |
61 |
62 | class TextRank4Sentences():
63 | def __init__(self):
64 | self.damping = 0.85 # damping coefficient, usually is .85
65 | self.min_diff = 1e-5 # convergence threshold
66 | self.steps = 100 # iteration steps
67 | self.text_str = None
68 | self.sentences = None
69 | self.pr_vector = None
70 |
71 | def _sentence_similarity(self, sent1, sent2, stopwords=None):
72 | if stopwords is None:
73 | stopwords = []
74 |
75 | sent1 = [w.lower() for w in sent1]
76 | sent2 = [w.lower() for w in sent2]
77 |
78 | all_words = list(set(sent1 + sent2))
79 |
80 | vector1 = [0] * len(all_words)
81 | vector2 = [0] * len(all_words)
82 |
83 | # build the vector for the first sentence
84 | for w in sent1:
85 | if w in stopwords:
86 | continue
87 | vector1[all_words.index(w)] += 1
88 |
89 | # build the vector for the second sentence
90 | for w in sent2:
91 | if w in stopwords:
92 | continue
93 | vector2[all_words.index(w)] += 1
94 |
95 | return core_cosine_similarity(vector1, vector2)
96 |
97 | def _build_similarity_matrix(self, sentences, stopwords=None):
98 | # create an empty similarity matrix
99 | sm = np.zeros([len(sentences), len(sentences)])
100 |
101 | for idx1 in range(len(sentences)):
102 | for idx2 in range(len(sentences)):
103 | if idx1 == idx2:
104 | continue
105 |
106 | sm[idx1][idx2] = self._sentence_similarity(sentences[idx1], sentences[idx2], stopwords=stopwords)
107 |
108 | # Get Symmeric matrix
109 | sm = get_symmetric_matrix(sm)
110 |
111 | # Normalize matrix by column
112 | norm = np.sum(sm, axis=0)
113 | sm_norm = np.divide(sm, norm, where=norm != 0) # this is to ignore the 0 element in norm
114 |
115 | return sm_norm
116 |
117 | def _run_page_rank(self, similarity_matrix):
118 |
119 | pr_vector = np.array([1] * len(similarity_matrix))
120 |
121 | # Iteration
122 | previous_pr = 0
123 | for epoch in range(self.steps):
124 | pr_vector = (1 - self.damping) + self.damping * np.matmul(similarity_matrix, pr_vector)
125 | if abs(previous_pr - sum(pr_vector)) < self.min_diff:
126 | break
127 | else:
128 | previous_pr = sum(pr_vector)
129 |
130 | return pr_vector
131 |
132 | def _get_sentence(self, index):
133 |
134 | try:
135 | return self.sentences[index]
136 | except IndexError:
137 | return ""
138 |
139 | def get_top_sentences(self, number=5):
140 |
141 | top_sentences = {}
142 |
143 | if self.pr_vector is not None:
144 |
145 | sorted_pr = np.argsort(self.pr_vector)
146 | sorted_pr = list(sorted_pr)
147 | sorted_pr.reverse()
148 |
149 | index = 0
150 | for epoch in range(number):
151 | print (str(sorted_pr[index]) + " : " + str(self.pr_vector[sorted_pr[index]]))
152 | sent = self.sentences[sorted_pr[index]]
153 | sent = normalize_whitespace(sent)
154 | top_sentences[sent] = self.pr_vector[sorted_pr[index]]
155 | index += 1
156 |
157 | return top_sentences
158 |
159 | def analyze(self, text, stop_words=None):
160 | self.text_str = text
161 | self.sentences = sent_tokenize(self.text_str)
162 |
163 | tokenized_sentences = [word_tokenize(sent) for sent in self.sentences]
164 |
165 | similarity_matrix = self._build_similarity_matrix(tokenized_sentences, stop_words)
166 |
167 | self.pr_vector = self._run_page_rank(similarity_matrix)
168 | print(self.pr_vector)
169 |
170 |
171 | text_str = '''
172 | Those Who Are Resilient Stay In The Game Longer
173 | “On the mountains of truth you can never climb in vain: either you will reach a point higher up today, or you will be training your powers so that you will be able to climb higher tomorrow.” — Friedrich Nietzsche
174 | Challenges and setbacks are not meant to defeat you, but promote you. However, I realise after many years of defeats, it can crush your spirit and it is easier to give up than risk further setbacks and disappointments. Have you experienced this before? To be honest, I don’t have the answers. I can’t tell you what the right course of action is; only you will know. However, it’s important not to be discouraged by failure when pursuing a goal or a dream, since failure itself means different things to different people. To a person with a Fixed Mindset failure is a blow to their self-esteem, yet to a person with a Growth Mindset, it’s an opportunity to improve and find new ways to overcome their obstacles. Same failure, yet different responses. Who is right and who is wrong? Neither. Each person has a different mindset that decides their outcome. Those who are resilient stay in the game longer and draw on their inner means to succeed.
175 | '''
176 |
177 | tr4sh = TextRank4Sentences()
178 | tr4sh.analyze(text_str)
179 | pprint(tr4sh.get_top_sentences(5), width=1, depth=2)
180 |
--------------------------------------------------------------------------------