Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
luoruixuan committed Jan 11, 2019
1 parent 58c295e commit 21c1634
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 45 deletions.
4 changes: 1 addition & 3 deletions pkuseg/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ def __init__(self):
self.readFile = "data/small_test.utf8"
self.outputFile = "data/small_test_output.utf8"

self.runMode = (
"test"
) # train (normal training), train.rich (training with rich edge features), test, tune£¬ tune.rich, cv (cross validation), cv.rich
self.runMode = "train"
self.modelOptimizer = "crf.adf"
self.rate0 = 0.05 # init value of decay rate in SGD and ADF training
self.regs = [1]
Expand Down
18 changes: 0 additions & 18 deletions pkuseg/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
from .inference import *
from .config import Config
import time
from .process_data import tocrfoutput


def run(config=None):
if config is None:
Expand Down Expand Up @@ -41,22 +39,6 @@ def run(config=None):
richEdge.train()
else:
train(config)
elif config.runMode.find("test") >= 0:
config.swLog.write("\nstart testing...\n")
if config.runMode.find("rich") >= 0:
richEdge.test()
else:
test(config)
tocrfoutput(
config,
os.path.join(config.outFolder, "outputTag.txt"),
config.outputFile,
os.path.join(config.tempFile, "test.raw.txt"),
)
elif config.rumMode.find("cv") >= 0:
print("\nstart cross validation")
config.swLog.write("\nstart cross validation\n")
crossValidation(config)
else:
raise Exception("unknown mode")

Expand Down
24 changes: 0 additions & 24 deletions pkuseg/process_data.py

This file was deleted.

0 comments on commit 21c1634

Please sign in to comment.