Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'tactful_tokenizer'
- require 'treat'
- require 'pry'
- require_relative 'lib/extensions/String'
- include Treat::Core::DSL # Gives quick access to named entity
- tt = TactfulTokenizer::Model.new # Creates an instance of the tokenizer
- keywordRegexes = [/death/,
- /died/,
- /passed s+ away/xm,]
- #Open example documents
- Dir.glob('examples/*.txt'). each do |filename|
- testdocument = File.open(filename).read
- testdocument.gsub!(/[nr]/," ")
- testdocument.squeeze!(" ")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement