# -*- encoding = gb18030 -*- # package importing start import os import sys sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/../..')) from classify.run import Corpus # package importing end # run this script articles_path = sys.argv[1] article_market_path = sys.argv[2] corpus = Corpus() corpus.run_convert_article(articles_path, article_market_path)
# -*- encoding = gb18030 -*- # package importing start import os import sys sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/../..')) from classify.run import Corpus # package importing end # run this script train_article_market_path = sys.argv[1] test_article_market_path = sys.argv[2] pos_path = sys.argv[3] punc_path = sys.argv[4] klword_path = sys.argv[5] logger_path = sys.argv[6] corpus = Corpus() corpus.run_optimize_params(train_article_market_path, test_article_market_path, \ pos_path, punc_path, klword_path, logger_path)
# -*- encoding = gb18030 -*- # package importing start import os import sys sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/../..')) from classify.run import Corpus # package importing end # run this script article_market_path = sys.argv[1] feature_path = sys.argv[2] feature_market_path = sys.argv[3] pos_path = sys.argv[4] punc_path = sys.argv[5] klword_path = sys.argv[6] corpus = Corpus() corpus.run_feature_select(article_market_path, pos_path, punc_path, klword_path, \ feature_path, feature_market_path)
# -*- encoding = gb18030 -*- # package importing start import os import sys sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/../..')) from classify.run import Corpus # package importing end # run this script train_path = sys.argv[1] test_path = sys.argv[2] corpus = Corpus() corpus.run_classify(train_path, test_path)
# -*- encoding = gb18030 -*- # package importing start import os import sys sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/../..')) from classify.run import Corpus # package importing end # run this script train_path = sys.argv[1] test_path = sys.argv[2] train_set = sys.argv[3] test_set = sys.argv[4] corpus = Corpus() corpus.run_classify(train_path, test_path, train_set, test_set)