You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is kind of what I'd like, but probably someone who actually knows Ruby can make a better/more robust version. :)
$ cat segment.rb
require 'pragmatic_segmenter'
lang = "en"
if ARGV[0]
lang=ARGV[0]
end
STDIN.each_with_index do |line, idx|
ps = PragmaticSegmenter::Segmenter.new(text: line, language: lang)
ps.segment
for i in ps.segment
print(i,"\n")
end
end
Would it be possible to get instructions for how to use this on the command line in a pipe? e.g.
This gives no output...
The text was updated successfully, but these errors were encountered: