-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
10 changed files
with
124 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Prism.languages.arff = { | ||
'comment': /%.*/, | ||
'string': { | ||
pattern: /(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/, | ||
greedy: true | ||
}, | ||
'keyword': /@(?:attribute|data|end|relation)\b/i, | ||
'number': /\b\d+(?:\.\d+)?\b/, | ||
'punctuation': /[{},]/ | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<h1>ARFF</h1> | ||
<p>To use this language, use the class "language-arff".</p> | ||
|
||
<h2>Comments</h2> | ||
<pre><code>% | ||
% Some comments | ||
% | ||
%</code></pre> | ||
|
||
<h2>Keywords</h2> | ||
<pre><code>@attribute | ||
@data | ||
@relation</code></pre> | ||
|
||
<h2>Numbers</h2> | ||
<pre><code>42 | ||
0.14</code></pre> | ||
|
||
<h2>Strings</h2> | ||
<pre><code>'Single \'quoted\' string' | ||
"Double \"quoted\" string"</code></pre> | ||
|
||
<h2>Full example</h2> | ||
<pre><code>% 1. Title: Iris Plants Database | ||
% | ||
% 2. Sources: | ||
% (a) Creator: R.A. Fisher | ||
% (b) Donor: Michael Marshall (MARSHALL%PLU@io.arc.nasa.gov) | ||
% (c) Date: July, 1988 | ||
% | ||
@RELATION iris | ||
|
||
@ATTRIBUTE sepallength NUMERIC | ||
@ATTRIBUTE sepalwidth NUMERIC | ||
@ATTRIBUTE petallength NUMERIC | ||
@ATTRIBUTE petalwidth NUMERIC | ||
@ATTRIBUTE class {Iris-setosa,Iris-versicolor,Iris-virginica} | ||
|
||
@DATA | ||
5.1,3.5,1.4,0.2,Iris-setosa | ||
4.9,3.0,1.4,0.2,Iris-setosa | ||
4.7,3.2,1.3,0.2,Iris-setosa | ||
4.6,3.1,1.5,0.2,Iris-setosa | ||
5.0,3.6,1.4,0.2,Iris-setosa | ||
5.4,3.9,1.7,0.4,Iris-setosa | ||
4.6,3.4,1.4,0.3,Iris-setosa | ||
5.0,3.4,1.5,0.2,Iris-setosa | ||
4.4,2.9,1.4,0.2,Iris-setosa | ||
4.9,3.1,1.5,0.1,Iris-setosa</code></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
% | ||
% Some comment | ||
% Comment " with ' quotes | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["comment", "%"], | ||
["comment", "% Some comment"], | ||
["comment", "% Comment \" with ' quotes"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for comments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@attribute | ||
@data | ||
@end | ||
@relation | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["keyword", "@attribute"], | ||
["keyword", "@data"], | ||
["keyword", "@end"], | ||
["keyword", "@relation"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for all keywords. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
42 | ||
0.14 | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["number", "42"], | ||
["number", "0.14"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for numbers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"double quoted\"' % string" | ||
'single quoted"\' % string' | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["string", "\"double quoted\\\"' % string\""], | ||
["string", "'single quoted\"\\' % string'"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for strings. |