Advertisement
neo01124

hyph

Oct 14th, 2012
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. # ------------------------------------------------------------------------------
  4.  
  5. import sys
  6. sys.dont_write_bytecode = True;
  7.  
  8. import subprocess
  9. import re
  10.  
  11. # ------------------------------------------------------------------------------
  12.  
  13. from hyphen import Hyphenator, dict_info
  14. from hyphen.dictools import *
  15.  
  16. hyph = Hyphenator ('hi_IN', directory='/home/neo')
  17.  
  18. inp = u'हिन्दी '
  19. out = hyph.pairs(inp)
  20. #.decode('utf-8'))
  21. print (out)
  22. out1 = hyph.syllables(inp)
  23. print (out1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement