lib/zenlish/lex/lexical_entry.rb in zenlish-0.2.01 vs lib/zenlish/lex/lexical_entry.rb in zenlish-0.2.02

- old
+ new

@@ -1,19 +1,26 @@ module Zenlish module Lex # TODO: document class LexicalEntry + #@return [String] the lemma (dictionary) form of a word. attr_reader :lemma + + # @return [Array<Lexeme, Rley::Syntax::Terminal>] attr_reader :lexemes - + + # @param theLemma [String] lemma (= citation form), a word form used + # conventionnaly to represent a lexeme. + # @param aLexeme [Lexeme, NilClass] the lexeme to link with lexical entry. def initialize(theLemma, aLexeme = nil) @lemma = theLemma.dup @lexemes = [] add_lexeme(aLexeme) end - + + # @param aLexeme [Lexeme, NilClass] the lexeme to link with lexical entry. def add_lexeme(aLexeme) lexemes << aLexeme if aLexeme end end # class - end # module + end # module end # module \ No newline at end of file