class SimpleBioC::Sentence

Attributes

annotations[RW]
infons[RW]
offset[RW]
passage[R]
relations[RW]
text[RW]

Public Class Methods

new(parent) click to toggle source
# File lib/simple_bioc/sentence.rb, line 6
def initialize(parent)
  @infons = {}
  @annotations = []
  @relations = []
  @passage = parent
end

Public Instance Methods

each_relation() { |r| ... } click to toggle source
# File lib/simple_bioc/sentence.rb, line 18
def each_relation
  relations.each{|r| yield r}
end
find_node(id) click to toggle source
# File lib/simple_bioc/sentence.rb, line 13
def find_node(id)
  (relations+annotations).each{|n| return n if n.id == id}
  nil
end
to_c() click to toggle source
# File lib/simple_bioc/sentence.rb, line 22
def to_c
  "Sentence @#{offset}: #{text}"
end