Closed ShirleyHan6 closed 5 years ago
yes. The link to wiki-727 includes also CPU and GPU trained models
Thanks!
@ShirleyHan6 Did it work for you? Using python run_web_server.py --model model_cpu.t7
, The cutoffs is always all 0's for me, and the segmentation is blank. I've used both torch v0.31 and 1.2 in linux. I even tried using model_gpu.t7 by using torch.load with param map_location=torch.device('cpu')
but the result was the same. I also tried both python2.7 and python3.6.
def treat_text(raw_text):
sentences = split_sentences(raw_text, 0)
print(sentences)
cutoffs = evaluate.predict_cutoffs(sentences, model, word2vec)
total = []
segment = []
for i, (sentence, cutoff) in enumerate(zip(sentences, cutoffs)):
segment.append(sentence)
if cutoff:
total.append(segment)
segment = []
return total
@johnyoonh The webapp is deprecated.
@koomri My concern is predict_cutoffs always returning 0 rather than the webapp itself. Any idea why that might be happening?
Is there a pretrained model we could use directly?