devicemap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Devicemap Wiki] Update of "DataSpec2" by rezan
Date Fri, 19 Jun 2015 20:36:24 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Devicemap Wiki" for change notification.

The "DataSpec2" page has been changed by rezan:
https://wiki.apache.org/devicemap/DataSpec2?action=diff&rev1=48&rev2=49

Comment:
JSON

   * Description
   * Publish date
  
- TODO: define the JSON and example 
+ === Pattern File ===
  
+ {{{
+ {
+   "SpecVersion": 2.0,
+   "Type": "pattern|attribute",
+   "Domain": "example",
+   "DomainVersion": "1.0",
+   "Description": "this is an example",
+   "PublishDate": "2015-06-19T09:17:37Z",
+   "InputParser": { InputParser },
+   "PatternSet": { PatternSet },
+   "Attributes": [ { Attribute } ]
+ }
+ }}}
+ 
+ Note that defining attributes in a pattern file is optional. Attributes defined in the actual
attribute file will override
+ attributes defined in the pattern file.
+ 
+ 
+ === InputParser ===
+ 
+ {{{
+ {
+   "Transformers": [ { Transformer } ],
+   "TokenSeperators": [ "1", "two", "3" ],
+   "NgramConcatSize": 2
+ }
+ }}}
+ 
+ 
+ === PatternSet ===
+ 
+ {{{
+ {
+   "DefaultId": "someid",
+   "SimpleHashCount": 1400,
+   "Patterns" [ { Pattern } ]
+ }
+ }}}
+ 
+ Note that SimpleHashCount must be defined before Patterns to facilitate efficient JSON stream
parsing.
+ 
+ 
+ === Pattern ===
+ 
+ {{{
+ {
+   "PatternId": "someid",
+   "RankType": "Strong|Weak|None",
+   "RankValue": 150,
+   "PatternType": "SimpleOrderedAnd|SimpleAnd|Simple",
+   "PatternTokens" [ "token1", "token2", "token3" ]
+ }
+ }}}
+ 
+ 
+ ...
+ 

Mime
View raw message