Class: FrameNet::SemanticType
- Inherits:
-
Object
- Object
- FrameNet::SemanticType
- Defined in:
- lib/frame_net/semantic_type.rb
Overview
A semantic fact about an element in FrameNet.
References:
Instance Attribute Summary collapse
-
#id ⇒ Object
The SmeanticType’s ID in FrameNet.
-
#name ⇒ Object
The SemanticType’s name in FrameNet.
Class Method Summary collapse
-
.from_node(node) ⇒ Object
Construct a SemanticType from the given
node(a LibXML::XML::Node for a semType element).
Instance Method Summary collapse
-
#initialize(id, name) ⇒ SemanticType
constructor
Create a new SemanticType for the specified
idandname.
Constructor Details
#initialize(id, name) ⇒ SemanticType
Create a new SemanticType for the specified id and name.
24 25 26 27 |
# File 'lib/frame_net/semantic_type.rb', line 24 def initialize( id, name ) @id = Integer( id ) @name = name.to_sym end |
Instance Attribute Details
#id ⇒ Object
The SmeanticType’s ID in FrameNet
36 37 38 |
# File 'lib/frame_net/semantic_type.rb', line 36 def id @id end |
#name ⇒ Object
The SemanticType’s name in FrameNet
40 41 42 |
# File 'lib/frame_net/semantic_type.rb', line 40 def name @name end |
Class Method Details
.from_node(node) ⇒ Object
Construct a SemanticType from the given node (a LibXML::XML::Node for a semType element)
18 19 20 |
# File 'lib/frame_net/semantic_type.rb', line 18 def self::from_node( node ) return new( node['ID'], node['name'] ) end |