lib/opener/opinion_detector_basic/kaf/document.rb
##
# Add linguistic processor layer with basic information
# (version, timestamp, description etc) in the KAF file.
#
Add linguistic processor layer with basic information
(version, timestamp, description etc) in the KAF file.
Add linguistic processor layer with basic information ( version timestamp description etc ) in the KAF file .
def add_linguistic_processor
          description = 'Basic opinion detector with Pos'
          last_edited = '13may2015'
          version     = '2.0'
          node = new_node('linguisticProcessors', 'KAF/kafHeader')
          node['layer'] = 'opinions'
          lp_node = new_node('lp', node)
          lp_node['version'] = "#{last_edited}-#{version}"
          lp_node['name'] = description
          if timestamp
            format = '%Y-%m-%dT%H:%M:%S%Z'
            lp_node['timestamp'] = Time.now.strftime(format)
          else
            lp_node['timestamp'] = '*'
          end
        end
def add_linguistic_processor description = 'Basic opinion detector with Pos' last_edited = '13may2015' version = '2.0' node = new_node ( 'linguisticProcessors' , 'KAF/kafHeader' ) node [ 'layer' ] = 'opinions' lp_node = new_node ( 'lp' , node ) lp_node [ 'version' ] = "#{last_edited}-#{version}" lp_node [ 'name' ] = description if timestamp format = '%Y-%m-%dT%H:%M:%S%Z' lp_node [ 'timestamp' ] = Time . now . strftime ( format ) else lp_node [ 'timestamp' ] = '*' end end
Add linguistic processor layer with basic information
(version, timestamp, description etc) in the KAF file.
Add linguistic processor layer with basic information ( version timestamp description etc ) in the KAF file .