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.
23 24 25 26 |
# File 'lib/frame_net/semantic_type.rb', line 23 def initialize( id, name ) @id = Integer( id ) @name = name.to_sym end |
Instance Attribute Details
#id ⇒ Object
The SmeanticType’s ID in FrameNet
35 36 37 |
# File 'lib/frame_net/semantic_type.rb', line 35 def id @id end |
#name ⇒ Object
The SemanticType’s name in FrameNet
39 40 41 |
# File 'lib/frame_net/semantic_type.rb', line 39 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)
17 18 19 |
# File 'lib/frame_net/semantic_type.rb', line 17 def self::from_node( node ) return new( node['ID'], node['name'] ) end |