Created
          June 26, 2019 12:06 
        
      - 
      
 - 
        
Save Dmitra/57f3c8136925e2002624e41414a9c3da to your computer and use it in GitHub Desktop.  
Revisions
- 
        
Dmitra created this gist
Jun 26, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ class DataController def normalize @result = "" file = File.open("params", "w") file << params[:data] file.close `iconv -c -f UTF-8 -t WINDOWS-1251 params > in` `./mystem -l in out` `iconv -c -f WINDOWS-1251 -t UTF-8 out > result` file = File.open("result", "r") file.each {|line| @result << line } file.close @result.gsub!(/\{|\}/, ' ') end end