Return-Path: X-Original-To: apmail-devicemap-commits-archive@www.apache.org Delivered-To: apmail-devicemap-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0DD4B184D4 for ; Fri, 19 Jun 2015 20:36:48 +0000 (UTC) Received: (qmail 10397 invoked by uid 500); 19 Jun 2015 20:36:47 -0000 Delivered-To: apmail-devicemap-commits-archive@devicemap.apache.org Received: (qmail 10372 invoked by uid 500); 19 Jun 2015 20:36:47 -0000 Mailing-List: contact commits-help@devicemap.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@devicemap.apache.org Delivered-To: mailing list commits@devicemap.apache.org Received: (qmail 10363 invoked by uid 500); 19 Jun 2015 20:36:47 -0000 Delivered-To: apmail-incubator-devicemap-commits@incubator.apache.org Received: (qmail 10360 invoked by uid 99); 19 Jun 2015 20:36:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jun 2015 20:36:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.131] (HELO eos.apache.org) (140.211.11.131) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jun 2015 20:34:37 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 8FC0A3AD for ; Fri, 19 Jun 2015 20:36:24 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Fri, 19 Jun 2015 20:36:24 -0000 Message-ID: <20150619203624.31116.45911@eos.apache.org> Subject: =?utf-8?q?=5BDevicemap_Wiki=5D_Update_of_=22DataSpec2=22_by_rezan?= Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org 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=3Ddiff&rev1=3D48&rev2=3D= 49 Comment: JSON * Description * Publish date = - TODO: define the JSON and example = + =3D=3D=3D Pattern File =3D=3D=3D = + {{{ + { + "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 d= efined in the actual attribute file will override + attributes defined in the pattern file. + = + = + =3D=3D=3D InputParser =3D=3D=3D + = + {{{ + { + "Transformers": [ { Transformer } ], + "TokenSeperators": [ "1", "two", "3" ], + "NgramConcatSize": 2 + } + }}} + = + = + =3D=3D=3D PatternSet =3D=3D=3D + = + {{{ + { + "DefaultId": "someid", + "SimpleHashCount": 1400, + "Patterns" [ { Pattern } ] + } + }}} + = + Note that SimpleHashCount must be defined before Patterns to facilitate e= fficient JSON stream parsing. + = + = + =3D=3D=3D Pattern =3D=3D=3D + = + {{{ + { + "PatternId": "someid", + "RankType": "Strong|Weak|None", + "RankValue": 150, + "PatternType": "SimpleOrderedAnd|SimpleAnd|Simple", + "PatternTokens" [ "token1", "token2", "token3" ] + } + }}} + = + = + ... +=20