Module: PROIEL::Valency::Arguments

Defined in:
lib/proiel/valency/arguments.rb

Class Method Summary collapse

Class Method Details

.get_argument_frame(token) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/proiel/valency/arguments.rb', line 2

def self.get_argument_frame(token)
  arguments = collect_arguments(token)
  hoisted_arguments = arguments.map { |a| hoist_dependents(a) }

  a =
    hoisted_arguments.map do |argument|
      { relation: argument.relation }.merge(extract_features(argument))
    end

  PROIEL::Valency::Obliqueness.sort_arguments(a)
end