module Solerian::Validation

Overview

Some validation happens here, since it requires complex PCRE regexes that the javascript frontend can't handle

Defined in:

solerian/validate.cr

Constant Summary

CODA = "(?<coda>(?=\\g<onset>\\g<nucleus>|$)|(?:st|[mftdnrslɲjkgx])(?=\\g<onset>\\g<nucleus>|$)|#{CODA_BODY})"
CODA_BODY = /(?:(?:x[lrs])|s[tdkg]|[lr](?:s|[tdkg]|[nm])|[tdkg]s|[nm](?:s|[tdkg])|(?:st|[mftdnrslɲjkgx]))?/
NUCLEUS = /(?<nucleus>[aeiouəɨ])/
ONSET = /(?<onset>sk|(?:[tdkg](?:[lr]|s)|(?:st|[mftdnrslɲjkgx]))?)/
SYLLABLES = /^(#{ONSET}#{NUCLEUS}#{CODA}(?=\g<onset>|$))+/

Class Method Summary

Class Method Detail

def self.is_valid?(word : String, ipa : String) #

[View source]