Commit a8abd160dcbb0de106f8a09be2e428e509218a78

Authored by Michał Lenart
1 parent 4a94bb68

dodanie pliku separatorChars.py

git-svn-id: svn://svn.nlp.ipipan.waw.pl/morfeusz/morfeusz@148 ff4e3ee1-f430-4e82-ade0-24591c43f1fd
fsabuilder/morfeuszbuilder/segrules/separatorChars.py 0 → 100644
  1 +'''
  2 +Created on 3 kwi 2014
  3 +
  4 +@author: mlenart
  5 +'''
  6 +
  7 +from morfeuszbuilder.utils import exceptions
  8 +
  9 +def parseSeparatorChars(segtypesConfigFile):
  10 + res = []
  11 + for lineNum, line in segtypesConfigFile.enumerateLinesInSection('separator chars', ignoreComments=True):
  12 + try:
  13 + cp = int(line)
  14 + res.append(cp)
  15 + except ValueError as ex:
  16 + raise exceptions.ConfigFileException(
  17 + segtypesConfigFile.filename,
  18 + lineNum,
  19 + str(ex))
  20 + return res
  21 +
0 22 \ No newline at end of file
... ...