#from textchdalc import AnalyseAlceste
#from textdist import PamTxt
#from textafcuci import AfcUci
-from analysetxt import Alceste, gramact, gramsup
+from analysetxt import Alceste
from corpus import Corpus, copycorpus
from textaslexico import Lexico
from textstat import Stat
UserConfigPath = os.path.abspath(os.path.join(user_home, '.iramuteq'))
class CmdLine :
- def __init__(self, args = None) :
+ def __init__(self, args = None, AppliPath = None) :
+ AppliPath = AppliPath
self.DictPath = ConstructDicoPath(AppliPath)
self.ConfigPath = ConstructConfigPath(UserConfigPath)
self.syscoding = sys.getdefaultencoding()
if options.filename or options.read :
self.corpus_encodage = options.encodage
self.corpus_lang = options.language
-
+ self.keys = DoConf(self.ConfigPath['key']).getoptions()
+
ReadLexique(self, lang = options.language)
self.expressions = ReadDicoAsDico(self.DictPath.get(options.language + '_exp', 'french_exp'))
+ gramact = [k for k in self.keys if self.keys[k] == 1]
+ gramsup = [k for k in self.keys if self.keys[k] == 2]
+
if options.filename :
self.filename = os.path.abspath(options.filename)
if options.corpusconfigfile is not None :
#corpus.conn_all()
corpus.make_lems()
corpus.parse_active(gramact, gramsup)
+ for forme in corpus.formes :
+ if corpus.formes[forme].gram == '' or corpus.formes[forme].gram == ' ' :
+ print forme
+ for val in dir(corpus.formes[forme]) :
+ print getattr(corpus.formes[forme], val)
#print corpus.getlemconcorde('de').fetchall()
# log.warning('ATTENTION gethapaxuces')
# MakeUciStat(corpus)
if __name__ == '__main__':
__name__ = 'Main'
- CmdLine()
+ CmdLine(AppliPath = AppliPath)