Beispiel #1
0
def Test31():
    TgtDict = DL.LoadVocabulary("Model/tgt.vocab")
    Out = TT.TranslateOutput(TgtDict, 5).Init(4)
    print(Out.IndexSent)
    Out.Add([1, 2, 3, 4])
    print(Out.IndexSent)
    Out.Add([2, 3, 4, 5])
    print(Out.IndexSent)
    Out.Add([2, 3, 4, 5])
    print(Out.AllFinish())
    print(Out.IndexSent)
    Out.Add([2, 3, 4, 5])
    print(Out.AllFinish())
    Out.Add([2, 3, 4, 5])
    Out.Add([2, 3, 4, 5])
    print(Out.AllFinish())
    print(Out.GetCurrentIndexTensor())
    print(Out.IndexSent)
    print(Out.GetWordSent())
    print(Out.ToFile("Output/predict"))