Commit 9c0a67a0 authored by alexlag's avatar alexlag
Browse files

constructors with key only

parent c7dbf614
......@@ -10,7 +10,7 @@ class TexterraAPI < IsprasAPI
nori = Nori.new(parser: :rexml, convert_tags_to: lambda { |tag| tag.snakecase.to_sym })
parser Proc.new { |data| nori.parse data }
def initialize(key, name, ver)
def initialize(key, name=nil, ver=nil)
name='texterra' if name.nil? || name.empty?
ver='v3.1' if ver.nil? || ver.empty?
super(key, name, ver)
......
......@@ -6,7 +6,7 @@ class TwitterAPI < IsprasAPI
nori = Nori.new(parser: :rexml, convert_tags_to: lambda { |tag| tag.snakecase.to_sym })
parser Proc.new { |data| nori.parse data }
def initialize(key, name, ver)
def initialize(key, name=nil, ver=nil)
name='twitter-nlp' if name.nil? || name.empty?
ver='1.0' if ver.nil? || ver.empty?
super(key, name, ver)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment