-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
31 lines (29 loc) · 1.17 KB
/
Copy pathmain.py
File metadata and controls
31 lines (29 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import getopt
import sys
from colorama import Fore
from models.persongan import Persongan
from Preparation import SimilarityNER
from Preparation import FuncWordProb
from Preparation import LikeWord
from Preparation import GenerateTagVec
from Preparation import GenerateWordVec
from Preparation import WordTagProb
from Preparation import bigram
def set_training(gan):
gan_func = gan.train_real
return gan_func
if __name__ == '__main__':
print("enter NER information:(make sure there is space between each NER)")
key_info_list = str(input()).split()
print("enter reporter's name")
AuthorName = str(input())
SimilarityNER.MergeQualFile(key_info_list,AuthorName, 1, 500)
GenerateTagVec.GetTagVec(AuthorName,32)
LikeWord.GenerateVocab()
GenerateWordVec.GetWordVec(AuthorName)
WordTag = WordTagProb.GetTagVec(AuthorName)
tag_bi,FuncWordList = bigram.Get2gram(AuthorName)
print("preparation process finished")
gan = Persongan.Persongan()
gan_func = set_training(gan)
gan_func(sys.path[0]+'/Preparation/save/data/'+AuthorName,author_name=AuthorName,StrucWord=FuncWordList,WordTagPro=WordTag, TagBi=tag_bi)