module PROIEL::PROIELXML::Reader

@api private

Public Class Methods

parse_io(io) click to toggle source

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.

@see parse_xml

@param io [IO] stream representing the PROIEL XML file

@return [TreebankFile]

# File lib/proiel/proiel_xml/reader.rb, line 376
def self.parse_io(io)
  parse_xml(io.read)
end
parse_xml(xml) click to toggle source

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.

@see parse_io

@param xml [String] PROIEL XML to parse

@return [TreebankFile]

# File lib/proiel/proiel_xml/reader.rb, line 360
def self.parse_xml(xml)
  TreebankFile.parse(xml)
end