Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.59 KB

dataviews.adoc

File metadata and controls

40 lines (28 loc) · 1.59 KB

LexFCS Data Views

Data formats for result representation.

Extension of the Hits Data View for LexFCS

Based on:

  • FCS Core 2.0 specification (section "Basic Search", §2.2.3.2)

  • Hits XML schema "DataView-Hits.xsd"

Example of basic Hits Data View
<!-- potential @pid and @ref attributes omitted -->
<fcs:DataView type="application/x-clarin-fcs-hits+xml">
  <hits:Result xmlns:hits="http://clarin.eu/fcs/dataview/hits">The quick brown <hits:Hit>fox</hits:Hit> jumps over the lazy<hits:Hit>dog</hits:Hit>.</hits:Result>
</fcs:DataView>

Reuse of the <hits:Hit> element, with the extension of content hinting by using an optional attribute @kind with the following allowed values:

  • lex-lemma: Lemma,

  • lex-pos: Part of speech,

  • lex-def: Definition.

Textual content outside of <hits:Hit> are displayed unchanged.

Example of extended Hits Data View with additional @kind attributes
<fcs:DataView type="application/x-textplus-fcs-hits+xml">
  <hits:Result xmlns:hits="http://textplus.org/fcs/dataview/hits"><hits:Hit kind="lex-lemma">Apple</hits:Hit>: <hits:Hit kind="lex-pos">NOUN</hits:Hit>. <hits:Hit kind="lex-def">An apple is an edible fruit produced by an apple tree.</hits:Hit></hits:Result>
</fcs:DataView>

Endpoints MUST generate responses that are valid according to the XML schema "DataView-LexHits.xsd".