{% load staticfiles %} {% load i18n %} Error API Test Page {% load errorapi_tags %} {% header_js_includes %}

Error lookup service

This page is intended to be a bare demo and documentation of the essentials to implement the Error service on a page. For documentation on the API endpoint, see the auto-generated docuemntation at /davvi/errorapi/lookup/

Demo

Test words

Try some test words

  • Basic lookup either specified in content of link, or with data-input-form attribute: viessui
  • Constrain to lemma with data-lemma attr: viessui
  • Constrain to task with data-task attr: viessuide
  • Constrain to task and lemma: viessuide
  • tag2 test: girji

... or enter one


API output

No errors :)

<% analyzer[0] %>
<% analysis[0] %> <% analysis[1].join('+') %>

Click-to-lookup service installation

Accessing the service requires ng-app="ErrorAPI", ng-controller="ErrorRequester" on the container that will be watched for links, as well as some attribute, or class to define the kinds of links that will be clickable. Whatever unique attribute it is needs to be marked on the ng-controller="ErrorRequester" element with the attribute data-error-watch and a CSS selector to target those elements.

{% filter force_escape %}
  • Basic lookup: viessui
  • Constrain to lemma with data-lemma attr: viessui
{% endfilter %}

Rendering output

Output uses Angular.js snippets. The template used below, for example is:

{% filter force_escape %}
  • (<% m.tags.join(', ') %>), <% m.task %>: <% m.string %>
{% endfilter %}

Individual links that are intended to trigger the lookup can optionally be marked with data-lemma or data-task attributes to constrain morphological feedback messages. This is intended to make it easier to integrate with existing, complex systems within Oahpa with least disturbance.

{# vim: set ts=4 sw=4 tw=0 syntax=htmldjango : #}