Module: PROIEL::PROIELXML::Reader Private

Defined in:
lib/proiel/proiel_xml/reader.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Defined Under Namespace

Classes: Annotation, Dictionary, DictionaryArgument, DictionaryFrame, DictionaryGloss, DictionaryHomograph, DictionaryLemma, DictionarySlot1, DictionarySlot2, DictionarySource, DictionaryToken, Div, InformationStatusValue, InformationStatuses, Lemma, Morphology, MorphologyField, MorphologyValue, Note, PartOfSpeechValue, PartsOfSpeech, Proiel, RelationValue, Relations, SemanticTag, Sentence, Slash, Source, Token, TreebankFile

Class Method Summary collapse

Class Method Details

.parse_io(io) ⇒ TreebankFile

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parses a PROIEL XML file.

This does not automatically validate the PROIEL XML. If given an invalid PROIEL XML file, parsing is likely to succeed but the returned objects will be in an inconsistent state.

Parameters:

  • io (IO)

    stream representing the PROIEL XML file

Returns:

See Also:



376
377
378
# File 'lib/proiel/proiel_xml/reader.rb', line 376

def self.parse_io(io)
  parse_xml(io.read)
end

.parse_xml(xml) ⇒ TreebankFile

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parses PROIEL XML data.

This does not automatically validate the PROIEL XML. If given an invalid PROIEL XML file, parsing is likely to succeed but the returned objects will be in an inconsistent state.

Parameters:

  • xml (String)

    PROIEL XML to parse

Returns:

See Also:



360
361
362
# File 'lib/proiel/proiel_xml/reader.rb', line 360

def self.parse_xml(xml)
  TreebankFile.parse(xml)
end