lib/rseg.rb in rseg-0.1.4 vs lib/rseg.rb in rseg-0.1.5
- old
+ new
@@ -19,10 +19,15 @@
class << self
def segment(input)
Rseg.instance.input = input
Rseg.instance.segment
end
-
+
+ def load
+ Rseg.instance
+ nil
+ end
+
def remote_segment(input)
begin
response = Net::HTTP.post_form(URI.parse('http://127.0.0.1:4100/seg'), :input => input)
response.code == '200' ? response.body.split(' ') :
["Can't connect to http://localhost:4100\nUse rseg_server to start it"]
\ No newline at end of file