Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Study.Courses.English.Grammar.Introduction.Strategies
Description
This module establishes algorithmic strategies to be used throughout the course.
Currently, the only use for these strategies consists in evaluating student solutions to translation exercises. The process is as follows:
- First, both the student's response and the model response are normalized using a configurable sentence canonicalizer.
- Then, the normalized responses are compared using a configurable sentence comparer.
- If they match, the student's solution is considered correct.
Documentation
sentenceComparer :: SentenceComparer Source #
Default sentence comparer throughout the course.
Decides whether two sentences are equivalent taking into account the following allowances:
- The descriptors "lo" and "le" are interchangeable.
- The generic abstractor "su'u" is exchangeable with the more specific abstractors "nu", "du'u" and "ka".
Tenses are optional, and may be missing from one or both of the sentences (however, if tenses are specified in both sentences, they must match).
- TODO: this still needs to be implemented
- Association words ("pe", "ne", "po" and "po'e") are interchangeable.
The quote delimiters "lu/li'u" and "lo'u/le'u" are interchangeable.
- Conveniently, it is nonetheless enforced that "lu/li'u" must only be used around grammatical text, as otherwise the canonicalization fails (due to a parsing failure), and this yields a "mismatch" verdict.
sentenceCanonicalizer :: SentenceCanonicalizer Source #
Default sentence canonicalizer throughout the course.