chris1tava commited on
Commit
a3864e2
·
verified ·
1 Parent(s): 1342024

chg: rebuilt the dataset

Browse files
README.md CHANGED
@@ -1,14 +1,10 @@
1
- ---
2
- license: mit
3
- task_categories:
4
- - token-classification
5
- language:
6
- - en
7
- tags:
8
- - legal
9
- size_categories:
10
- - 1K<n<10K
11
- ---
12
  python -m venv .venv
13
  source .venv/bin/activate
14
- pip install -r requirements.txt
 
 
 
 
 
 
1
+ #Prepare dataset
2
+ ```
 
 
 
 
 
 
 
 
 
3
  python -m venv .venv
4
  source .venv/bin/activate
5
+ pip install -r requirements.txt
6
+ ```
7
+ #Training
8
+ ```
9
+ python hf_model_train.py
10
+ ```
adjectives.csv ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Name
2
+ adaptable
3
+ analytical
4
+ approachable
5
+ articulate
6
+ assertive
7
+ attentive
8
+ collaborative
9
+ communicative
10
+ confident
11
+ conscientious
12
+ creative
13
+ customer-focused
14
+ detail-oriented
15
+ diligent
16
+ dynamic
17
+ efficient
18
+ empathetic
19
+ energetic
20
+ experienced
21
+ flexible
22
+ focused
23
+ goal-oriented
24
+ hardworking
25
+ innovative
26
+ inspiring
27
+ leadership
28
+ motivated
29
+ organized
30
+ passionate
31
+ persistent
32
+ proactive
33
+ professional
34
+ punctual
35
+ reliable
36
+ resourceful
37
+ responsible
38
+ results-driven
39
+ self-motivated
40
+ strategic
41
+ team-oriented
42
+ tech-savvy
43
+ thorough
44
+ trustworthy
45
+ versatile
46
+ visionary
47
+ well-organized
48
+ adroit
49
+ adept
50
+ amiable
51
+ astute
52
+ candid
53
+ capable
54
+ competent
55
+ committed
56
+ conscientious
57
+ considerate
58
+ cordial
59
+ decisive
60
+ dependable
61
+ dynamic
62
+ empathetic
63
+ engaging
64
+ enterprising
65
+ enthusiastic
66
+ forward-thinking
67
+ gracious
68
+ inspirational
69
+ intuitive
70
+ meticulous
71
+ open-minded
72
+ persuasive
73
+ pragmatic
74
+ profound
75
+ reflective
76
+ resourceful
77
+ respectful
78
+ skillful
79
+ steadfast
80
+ stellar
81
+ strategic
82
+ tactful
83
+ thoughtful
84
+ tireless
85
+ unflappable
86
+ visionary
87
+ wise
88
+ zealous
adjectives.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import logging
3
+ import pathlib
4
+ import pandas as pd
5
+
6
+ class Adjectives:
7
+ '''Stores adjectives so you dont have to.'''
8
+ def __init__(self):
9
+ self.name = "adjectives"
10
+ self.logger = logging.getLogger(f"{self.name}")
11
+ self.logger.setLevel(logging.ERROR)
12
+ self.file_path = pathlib.Path(__file__).parent.resolve()
13
+ self.config_file = pathlib.Path(self.file_path) / f"{self.name}.csv"
14
+ #self.config_file = pathlib.Path(self.file_path) / f"{self.name}.json"
15
+
16
+ def get_data(self):
17
+ dtype={'Name': 'string'}
18
+ df = pd.read_csv(self.config_file,dtype=dtype)
19
+ return df['Name']
20
+ #self.data = self.load_json(self.config_file)
21
+ #return self.data['data']
22
+
23
+ def load_json(self,filename):
24
+ with open(filename, "r") as f:
25
+ data = json.load(f)
26
+ return data
adverbs.csv ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Name
2
+ accurately
3
+ actively
4
+ adaptively
5
+ adroitly
6
+ appropriately
7
+ clearly
8
+ collaboratively
9
+ consistently
10
+ courteously
11
+ creatively
12
+ diligently
13
+ efficiently
14
+ effectively
15
+ eloquently
16
+ enthusiastically
17
+ flexibly
18
+ graciously
19
+ honestly
20
+ innovatively
21
+ intelligently
22
+ loyally
23
+ methodically
24
+ openly
25
+ precisely
26
+ proactively
27
+ professionally
28
+ promptly
29
+ resourcefully
30
+ responsively
31
+ strategically
32
+ successfully
33
+ swiftly
34
+ thoughtfully
35
+ tirelessly
36
+ transparently
37
+ urgently
38
+ vigorously
39
+ well
40
+ zealously
41
+ ably
42
+ above
43
+ absolutley
44
+ adequately
45
+ afterward
46
+ almost
47
+ always
48
+ anew
49
+ annually
50
+ anxiously
51
+ approximately
52
+ arguably
53
+ awkwardly
54
+ badly
55
+ before
56
+ briefly
57
+ briskly
58
+ carefully
59
+ cautiously
60
+ certainly
61
+ clearly
62
+ closely
63
+ cleverly
64
+ commonly
65
+ consequently
66
+ consistently
67
+ conversely
68
+ daily
69
+ deeply
70
+ deliberately
71
+ diligently
72
+ doubtfully
73
+ dramatically
74
+ early
75
+ eagerly
76
+ efficiently
77
+ elegantly
78
+ energetically
79
+ eventually
80
+ exactly
81
+ exceedingly
82
+ eventually
83
+ exquisitely
84
+ extremely
85
+ frequently
86
+ generally
87
+ gently
88
+ gradually
89
+ greatly
90
+ happily
91
+ hardly
92
+ honestly
93
+ hopelessly
94
+ hourly
95
+ immediately
96
+ impartially
97
+ incessantly
98
+ indeed
99
+ infrequently
100
+ inquisitively
101
+ instantly
102
+ invariably
103
+ jovially
104
+ judiciously
105
+ justly
106
+ kindly
107
+ lately
108
+ lavishly
109
+ lethargically
110
+ likewise
111
+ loudly
112
+ loyally
113
+ madly
114
+ magnificently
115
+ majestically
116
+ merrily
117
+ meticulously
118
+ monthly
119
+ mostly
120
+ mysteriously
121
+ namely
122
+ naturally
123
+ nervously
124
+ never
125
+ normally
126
+ notably
127
+ obliviously
128
+ obviously
129
+ often
130
+ only
131
+ painstakingly
132
+ particularly
133
+ patiently
134
+ perfectly
135
+ periodically
136
+ persistently
137
+ personally
138
+ playfully
139
+ possibly
140
+ precisely
141
+ promptly
142
+ quickly
143
+ quietly
144
+ rapidly
145
+ rarely
146
+ readily
147
+ really
148
+ recently
149
+ regularly
150
+ reluctantly
151
+ repeatedly
152
+ routinely
153
+ sadly
154
+ safely
155
+ scarcely
156
+ seemingly
157
+ seldom
158
+ seriously
159
+ shamelessly
160
+ significantly
161
+ silently
162
+ simply
163
+ sincerely
164
+ smoothly
165
+ so
166
+ solemnly
167
+ sometimes
168
+ soon
169
+ speedily
170
+ steadily
171
+ suddenly
172
+ surely
173
+ systematically
174
+ temporarily
175
+ tenderly
176
+ tensely
177
+ terribly
178
+ thankfully
179
+ thereafter
180
+ tightly
181
+ tomorrow
182
+ too
183
+ totally
184
+ tragically
185
+ truly
186
+ twice
187
+ ultimately
188
+ understandably
189
+ unexpectedly
190
+ unfortunately
191
+ unquestionably
192
+ usually
193
+ utterly
194
+ vastly
195
+ very
196
+ vigorously
197
+ violently
198
+ vividly
199
+ warmly
200
+ weakly
201
+ wearily
202
+ weekly
203
+ well
204
+ willingly
205
+ wonderfully
206
+ yearly
207
+ yesterday
208
+ zealously
adverbs.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import logging
3
+ import pathlib
4
+ import pandas as pd
5
+
6
+ class Adverbs:
7
+ '''Stores adverbs so you dont have to.'''
8
+ def __init__(self):
9
+ self.name = "adverbs"
10
+ self.logger = logging.getLogger(f"{self.name}")
11
+ self.logger.setLevel(logging.ERROR)
12
+ self.file_path = pathlib.Path(__file__).parent.resolve()
13
+ self.config_file = pathlib.Path(self.file_path) / f"{self.name}.csv"
14
+ #self.config_file = pathlib.Path(self.file_path) / f"{self.name}.json"
15
+
16
+ def get_data(self):
17
+ dtype={'Name': 'string'}
18
+ df = pd.read_csv(self.config_file,dtype=dtype)
19
+ return df['Name']
20
+ #self.data = self.load_json(self.config_file)
21
+ #return self.data['data']
22
+
23
+ def load_json(self,filename):
24
+ with open(filename, "r") as f:
25
+ data = json.load(f)
26
+ return data
alphabetize_dataset.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ import traceback
3
+ try:
4
+ df = pd.read_csv("./2024-01/position_names.csv")
5
+ df.head()
6
+ df = df.sort_values(by='Name')
7
+ df.to_csv("./2024-01/position_names_sorted.csv",index=False)
8
+ except Exception as e:
9
+ print(e)
10
+ print(traceback.format_exc())
11
+
12
+
conjunctions.csv ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Name
2
+ and
3
+ as
4
+ because
5
+ but
6
+ for
7
+ however
8
+ if
9
+ moreover
10
+ nevertheless
11
+ or
12
+ so
13
+ therefore
14
+ though
15
+ thus
16
+ yet
conjunctions.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import logging
3
+ import pathlib
4
+ import pandas as pd
5
+
6
+ class Conjunctions:
7
+ '''Stores conjunctions so you dont have to.'''
8
+ def __init__(self):
9
+ self.name = "conjunctions"
10
+ self.logger = logging.getLogger(f"{self.name}")
11
+ self.logger.setLevel(logging.ERROR)
12
+ self.file_path = pathlib.Path(__file__).parent.resolve()
13
+ self.config_file = pathlib.Path(self.file_path) / f"{self.name}.csv"
14
+ #self.config_file = pathlib.Path(self.file_path) / f"{self.name}.json"
15
+
16
+ def get_data(self):
17
+ dtype={'Name': 'string'}
18
+ df = pd.read_csv(self.config_file,dtype=dtype)
19
+ return df['Name']
20
+ #self.data = self.load_json(self.config_file)
21
+ #return self.data['data']
22
+
23
+ def load_json(self,filename):
24
+ with open(filename, "r") as f:
25
+ data = json.load(f)
26
+ return data
hf_inference.py CHANGED
@@ -1,9 +1,9 @@
1
  import pickle
2
  from transformers import AutoModelForTokenClassification, AutoTokenizer
3
  from transformers import pipeline
4
- #text = "A software engineer walked into a library and then took a full stack engineer for coffee."
5
  #text="software engineer"
6
- text="cto"
7
  model = AutoModelForTokenClassification.from_pretrained('./jpn202401')
8
  tokenizer = AutoTokenizer.from_pretrained(
9
  './jpn202401', model_max_length=512)
 
1
  import pickle
2
  from transformers import AutoModelForTokenClassification, AutoTokenizer
3
  from transformers import pipeline
4
+ text = "A software engineer coded up some software."
5
  #text="software engineer"
6
+ #text="cto"
7
  model = AutoModelForTokenClassification.from_pretrained('./jpn202401')
8
  tokenizer = AutoTokenizer.from_pretrained(
9
  './jpn202401', model_max_length=512)
hf_model_train.py CHANGED
@@ -45,9 +45,9 @@ def compute_metrics(p, label_list):
45
 
46
  if __name__ == "__main__":
47
  model_n_version = "jpn202401"
48
- max_epochs = 50
49
  learning_rate = 2e-5
50
- batch_size = 16
51
  model_root_dir = "."
52
 
53
  hf_pretrained_model_checkpoint = "distilbert-base-uncased"
 
45
 
46
  if __name__ == "__main__":
47
  model_n_version = "jpn202401"
48
+ max_epochs = 150
49
  learning_rate = 2e-5
50
+ batch_size = 12
51
  model_root_dir = "."
52
 
53
  hf_pretrained_model_checkpoint = "distilbert-base-uncased"
hf_tokenize.py CHANGED
@@ -63,5 +63,5 @@ if __name__ == '__main__':
63
 
64
  tokenized_datasets = dataset.map(hf_preprocessor.tokenize_and_align_labels, batched=True)
65
 
66
- #print("First sample: ", dataset['train'][0])
67
  #print("First tokenized sample: ", tokenized_datasets['train'][0])
 
63
 
64
  tokenized_datasets = dataset.map(hf_preprocessor.tokenize_and_align_labels, batched=True)
65
 
66
+ print("First sample: ", dataset['train'][0])
67
  #print("First tokenized sample: ", tokenized_datasets['train'][0])
make_dataset.py CHANGED
@@ -1,74 +1,72 @@
 
1
  import pandas as pd
2
  import random
3
-
4
- def find(token,array):
5
- result = False
6
- for i,v in enumerate(array):
7
- if v.lower().strip() == token.lower().strip():
8
- result = True
9
- return result
10
- return result
11
 
12
  file = "./2024-01/position_names.csv"
13
- predicate_adverbs = ['python','c#','typescript','golang']
14
- predicate_verbs = ['writes','reads','speaks','presents','talks','tests','checks']
15
- predicate_nouns = ['code','papers','notebooks','documents','presentations']
16
- predicate_adjectives = ['.','a','an','and','does','in','not','the','to','yet']
17
- predicates = []
18
- predicates.extend(predicate_verbs)
19
- predicates.extend(predicate_nouns)
20
- predicates.extend(predicate_adverbs)
21
- predicates.extend(predicate_adjectives)
22
- dtype={'Name': 'string'}
23
  df = pd.read_csv(file,dtype=dtype)
24
- column = df['Name']
25
  tokens = []
26
- for i,c in enumerate(column):
27
- token=""
28
- tokenDict={}
29
- t=0
30
- for j,d in enumerate(c):
31
- if t==0 and (d == " " or j==len(c)-1):
32
- token += d
33
- token = token.strip()
34
- if find(token,predicates):
35
- #print(token.lower() + 'in')
36
- tokenDict['tag'] = 'O'
37
- else:
38
- #print(token + ' not in')
39
- tokenDict['tag'] = 'B-POS'
40
- tokenDict['token'] = token
41
- tokens.append(tokenDict)
42
- token=""
43
- tokenDict={}
44
- t+=1
45
- elif t>0 and (d == " " or j==len(c)-1):
46
- token += d
47
- token = token.strip()
48
- if find(token,predicates):
49
- tokenDict['tag'] = 'O'
50
- else:
51
- tokenDict['tag'] = 'I-POS'
52
- tokenDict['token'] = token
53
- tokens.append(tokenDict)
54
- token=""
55
- tokenDict={}
56
- t+=1
 
 
 
57
  else:
58
- token += d
59
-
60
- tokenDict={}
61
- num_of_records = 50000
62
- for _ in range(num_of_records):
63
- tokenDict['tag'] = '0'
64
- pIndex = random.randint(1,len(predicates)-1)
65
- tokenDict['token'] = predicates[pIndex]
66
- tokens.append(tokenDict)
67
- tokenDict={}
68
 
69
  random.shuffle(tokens)
70
 
71
- f = open('./2024-01/position_names_tags.txt', 'w', encoding="utf-8")
72
- for t in tokens:
73
- f.write(t['token'].lower() + " " + t['tag'] + "\n")
74
- f.close()
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from collections import defaultdict
2
  import pandas as pd
3
  import random
4
+ from sentence import SentenceBuilder
 
 
 
 
 
 
 
5
 
6
  file = "./2024-01/position_names.csv"
7
+ sentence = SentenceBuilder()
8
+ dtype={"Name": "string"}
 
 
 
 
 
 
 
 
9
  df = pd.read_csv(file,dtype=dtype)
10
+ titles = df["Name"]
11
  tokens = []
12
+ for i,t in enumerate(titles):
13
+ e=0
14
+ entities=[]
15
+ entity=""
16
+ token={}
17
+ words=[]
18
+ word=""
19
+ for j,c in enumerate(t):
20
+ if e==0 and (c == " " or j==len(t)-1):
21
+ entity += c
22
+ entity = entity.strip()
23
+ entities.append(entity)
24
+ entity=""
25
+ e+=1
26
+ if e==1:
27
+ words.append(random.choice(sentence.get_adjectives()))
28
+ elif e>0 and (c == " " or j==len(t)-1):
29
+ entity += c
30
+ entity = entity.strip()
31
+ entities.append(entity)
32
+ entity=""
33
+ e+=1
34
+ if e==2:
35
+ words.append(random.choice(sentence.get_verbs()))
36
+ elif e==3:
37
+ words.append(random.choice(sentence.get_adverbs()))
38
+ elif e==4:
39
+ words.append(random.choice(sentence.get_nouns()))
40
+ elif e==5:
41
+ words.append(random.choice(sentence.get_conjunctions()))
42
+ elif e==6:
43
+ words.append(random.choice(sentence.get_prepositions()))
44
+ elif e==7:
45
+ words.append(random.choice(sentence.get_pronouns()))
46
  else:
47
+ entity += c
48
+ token["entities"] = entities
49
+ token["words"] = words
50
+ tokens.append(token)
51
+ token={}
52
+ entities=[]
53
+ words=[]
 
 
 
54
 
55
  random.shuffle(tokens)
56
 
57
+ f = open("./2024-01/position_names_tags_new.txt", "w", encoding="utf-8")
58
+ entity_shortname = "POS"
59
+ for i,t in enumerate(tokens):
60
+ ner_sentence=""
61
+ ner_tags=""
62
+ for j,e in enumerate(t["entities"]):
63
+ ner_sentence += e + " "
64
+ if j == 0:
65
+ ner_tags += "B-"+entity_shortname + " "
66
+ else:
67
+ ner_tags += "I-"+entity_shortname + " "
68
+ for k,w in enumerate(t["words"]):
69
+ ner_sentence += w + " "
70
+ ner_tags += "O" + " "
71
+ f.write(ner_sentence + ner_tags + "\n")
72
+ f.close()
nouns.csv ADDED
@@ -0,0 +1,307 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Name
2
+ achievement
3
+ analysis
4
+ approach
5
+ budget
6
+ client
7
+ collaboration
8
+ communication
9
+ compliance
10
+ conference
11
+ consultation
12
+ contract
13
+ customer
14
+ data
15
+ deadline
16
+ decision
17
+ delivery
18
+ development
19
+ efficiency
20
+ employee
21
+ engagement
22
+ evaluation
23
+ execution
24
+ expense
25
+ feedback
26
+ goal
27
+ innovation
28
+ integration
29
+ leadership
30
+ management
31
+ meeting
32
+ negotiation
33
+ objective
34
+ operation
35
+ opportunity
36
+ organization
37
+ performance
38
+ plan
39
+ policy
40
+ presentation
41
+ problem
42
+ productivity
43
+ project
44
+ proposal
45
+ quality
46
+ report
47
+ research
48
+ revenue
49
+ risk
50
+ sales
51
+ solution
52
+ strategy
53
+ success
54
+ team
55
+ technology
56
+ training
57
+ value
58
+ vision
59
+ workshop
60
+ analysis
61
+ application
62
+ assessment
63
+ audit
64
+ benchmark
65
+ brand
66
+ business
67
+ campaign
68
+ case
69
+ change
70
+ clientele
71
+ communication
72
+ compensation
73
+ competency
74
+ conference
75
+ consultation
76
+ consumer
77
+ contract
78
+ contribution
79
+ convention
80
+ cooperation
81
+ corporate
82
+ culture
83
+ customer
84
+ data
85
+ deadline
86
+ decision
87
+ delivery
88
+ dependability
89
+ development
90
+ documentation
91
+ economy
92
+ efficiency
93
+ employee
94
+ employment
95
+ engagement
96
+ enterprise
97
+ evaluation
98
+ execution
99
+ expectation
100
+ experience
101
+ experiment
102
+ expense
103
+ experiment
104
+ facilitation
105
+ feedback
106
+ finance
107
+ forecast
108
+ fulfillment
109
+ goal
110
+ growth
111
+ guidance
112
+ implementation
113
+ improvement
114
+ incentive
115
+ income
116
+ innovation
117
+ integration
118
+ investment
119
+ issue
120
+ job
121
+ knowledge
122
+ leadership
123
+ learning
124
+ loyalty
125
+ management
126
+ market
127
+ meeting
128
+ negotiation
129
+ objective
130
+ operationalization
131
+ opportunity
132
+ organization
133
+ outcomes
134
+ partnership
135
+ performance
136
+ plan
137
+ policy
138
+ portfolio
139
+ position
140
+ possibility
141
+ potential
142
+ preparation
143
+ presentation
144
+ problem
145
+ procedure
146
+ process
147
+ product
148
+ profit
149
+ program
150
+ project
151
+ proposal
152
+ quality
153
+ recruitment
154
+ reputation
155
+ research
156
+ resolution
157
+ responsibility
158
+ revenue
159
+ risk
160
+ sales
161
+ satisfaction
162
+ schedule
163
+ service
164
+ solution
165
+ staff
166
+ standardization
167
+ strategy
168
+ success
169
+ sustainability
170
+ system
171
+ task
172
+ team
173
+ technology
174
+ time
175
+ training
176
+ transformation
177
+ understanding
178
+ value
179
+ vision
180
+ wealth
181
+ work
182
+ workplace
183
+ workshop
184
+ analysis
185
+ approach
186
+ assessment
187
+ audit
188
+ benchmark
189
+ brand
190
+ business
191
+ campaign
192
+ case
193
+ change
194
+ clientele
195
+ communication
196
+ compensation
197
+ competency
198
+ conference
199
+ consultation
200
+ consumer
201
+ contract
202
+ contribution
203
+ convention
204
+ cooperation
205
+ corporate
206
+ culture
207
+ customer
208
+ data
209
+ deadline
210
+ decision
211
+ delivery
212
+ dependability
213
+ development
214
+ documentation
215
+ economy
216
+ efficiency
217
+ employee
218
+ employment
219
+ engagement
220
+ enterprise
221
+ evaluation
222
+ execution
223
+ expectation
224
+ experience
225
+ experiment
226
+ expense
227
+ experiment
228
+ facilitation
229
+ feedback
230
+ finance
231
+ forecast
232
+ fulfillment
233
+ goal
234
+ growth
235
+ guidance
236
+ implementation
237
+ improvement
238
+ incentive
239
+ income
240
+ innovation
241
+ integration
242
+ investment
243
+ issue
244
+ job
245
+ knowledge
246
+ leadership
247
+ learning
248
+ loyalty
249
+ management
250
+ market
251
+ meeting
252
+ negotiation
253
+ objective
254
+ operationalization
255
+ opportunity
256
+ organization
257
+ outcomes
258
+ partnership
259
+ performance
260
+ plan
261
+ policy
262
+ portfolio
263
+ position
264
+ possibility
265
+ potential
266
+ preparation
267
+ presentation
268
+ problem
269
+ procedure
270
+ process
271
+ product
272
+ profit
273
+ program
274
+ project
275
+ proposal
276
+ quality
277
+ recruitment
278
+ reputation
279
+ research
280
+ resolution
281
+ responsibility
282
+ revenue
283
+ risk
284
+ sales
285
+ satisfaction
286
+ schedule
287
+ service
288
+ solution
289
+ staff
290
+ standardization
291
+ strategy
292
+ success
293
+ sustainability
294
+ system
295
+ task
296
+ team
297
+ technology
298
+ time
299
+ training
300
+ transformation
301
+ understanding
302
+ value
303
+ vision
304
+ wealth
305
+ work
306
+ workplace
307
+ workshop
nouns.json ADDED
@@ -0,0 +1,310 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "data": [
3
+ {"name": "Achievement"},
4
+ {"name": "Analysis"},
5
+ {"name": "Approach"},
6
+ {"name": "Budget"},
7
+ {"name": "Client"},
8
+ {"name": "Collaboration"},
9
+ {"name": "Communication"},
10
+ {"name": "Compliance"},
11
+ {"name": "Conference"},
12
+ {"name": "Consultation"},
13
+ {"name": "Contract"},
14
+ {"name": "Customer"},
15
+ {"name": "Data"},
16
+ {"name": "Deadline"},
17
+ {"name": "Decision"},
18
+ {"name": "Delivery"},
19
+ {"name": "Development"},
20
+ {"name": "Efficiency"},
21
+ {"name": "Employee"},
22
+ {"name": "Engagement"},
23
+ {"name": "Evaluation"},
24
+ {"name": "Execution"},
25
+ {"name": "Expense"},
26
+ {"name": "Feedback"},
27
+ {"name": "Goal"},
28
+ {"name": "Innovation"},
29
+ {"name": "Integration"},
30
+ {"name": "Leadership"},
31
+ {"name": "Management"},
32
+ {"name": "Meeting"},
33
+ {"name": "Negotiation"},
34
+ {"name": "Objective"},
35
+ {"name": "Operation"},
36
+ {"name": "Opportunity"},
37
+ {"name": "Organization"},
38
+ {"name": "Performance"},
39
+ {"name": "Plan"},
40
+ {"name": "Policy"},
41
+ {"name": "Presentation"},
42
+ {"name": "Problem"},
43
+ {"name": "Productivity"},
44
+ {"name": "Project"},
45
+ {"name": "Proposal"},
46
+ {"name": "Quality"},
47
+ {"name": "Report"},
48
+ {"name": "Research"},
49
+ {"name": "Revenue"},
50
+ {"name": "Risk"},
51
+ {"name": "Sales"},
52
+ {"name": "Solution"},
53
+ {"name": "Strategy"},
54
+ {"name": "Success"},
55
+ {"name": "Team"},
56
+ {"name": "Technology"},
57
+ {"name": "Training"},
58
+ {"name": "Value"},
59
+ {"name": "Vision"},
60
+ {"name": "Workshop"},
61
+ {"name": "Analysis"},
62
+ {"name": "Application"},
63
+ {"name": "Assessment"},
64
+ {"name": "Audit"},
65
+ {"name": "Benchmark"},
66
+ {"name": "Brand"},
67
+ {"name": "Business"},
68
+ {"name": "Campaign"},
69
+ {"name": "Case"},
70
+ {"name": "Change"},
71
+ {"name": "Clientele"},
72
+ {"name": "Communication"},
73
+ {"name": "Compensation"},
74
+ {"name": "Competency"},
75
+ {"name": "Conference"},
76
+ {"name": "Consultation"},
77
+ {"name": "Consumer"},
78
+ {"name": "Contract"},
79
+ {"name": "Contribution"},
80
+ {"name": "Convention"},
81
+ {"name": "Cooperation"},
82
+ {"name": "Corporate"},
83
+ {"name": "Culture"},
84
+ {"name": "Customer"},
85
+ {"name": "Data"},
86
+ {"name": "Deadline"},
87
+ {"name": "Decision"},
88
+ {"name": "Delivery"},
89
+ {"name": "Dependability"},
90
+ {"name": "Development"},
91
+ {"name": "Documentation"},
92
+ {"name": "Economy"},
93
+ {"name": "Efficiency"},
94
+ {"name": "Employee"},
95
+ {"name": "Employment"},
96
+ {"name": "Engagement"},
97
+ {"name": "Enterprise"},
98
+ {"name": "Evaluation"},
99
+ {"name": "Execution"},
100
+ {"name": "Expectation"},
101
+ {"name": "Experience"},
102
+ {"name": "Experiment"},
103
+ {"name": "Expense"},
104
+ {"name": "Experiment"},
105
+ {"name": "Facilitation"},
106
+ {"name": "Feedback"},
107
+ {"name": "Finance"},
108
+ {"name": "Forecast"},
109
+ {"name": "Fulfillment"},
110
+ {"name": "Goal"},
111
+ {"name": "Growth"},
112
+ {"name": "Guidance"},
113
+ {"name": "Implementation"},
114
+ {"name": "Improvement"},
115
+ {"name": "Incentive"},
116
+ {"name": "Income"},
117
+ {"name": "Innovation"},
118
+ {"name": "Integration"},
119
+ {"name": "Investment"},
120
+ {"name": "Issue"},
121
+ {"name": "Job"},
122
+ {"name": "Knowledge"},
123
+ {"name": "Leadership"},
124
+ {"name": "Learning"},
125
+ {"name": "Loyalty"},
126
+ {"name": "Management"},
127
+ {"name": "Market"},
128
+ {"name": "Meeting"},
129
+ {"name": "Negotiation"},
130
+ {"name": "Objective"},
131
+ {"name": "Operationalization"},
132
+ {"name": "Opportunity"},
133
+ {"name": "Organization"},
134
+ {"name": "Outcomes"},
135
+ {"name": "Partnership"},
136
+ {"name": "Performance"},
137
+ {"name": "Plan"},
138
+ {"name": "Policy"},
139
+ {"name": "Portfolio"},
140
+ {"name": "Position"},
141
+ {"name": "Possibility"},
142
+ {"name": "Potential"},
143
+ {"name": "Preparation"},
144
+ {"name": "Presentation"},
145
+ {"name": "Problem"},
146
+ {"name": "Procedure"},
147
+ {"name": "Process"},
148
+ {"name": "Product"},
149
+ {"name": "Profit"},
150
+ {"name": "Program"},
151
+ {"name": "Project"},
152
+ {"name": "Proposal"},
153
+ {"name": "Quality"},
154
+ {"name": "Recruitment"},
155
+ {"name": "Reputation"},
156
+ {"name": "Research"},
157
+ {"name": "Resolution"},
158
+ {"name": "Responsibility"},
159
+ {"name": "Revenue"},
160
+ {"name": "Risk"},
161
+ {"name": "Sales"},
162
+ {"name": "Satisfaction"},
163
+ {"name": "Schedule"},
164
+ {"name": "Service"},
165
+ {"name": "Solution"},
166
+ {"name": "Staff"},
167
+ {"name": "Standardization"},
168
+ {"name": "Strategy"},
169
+ {"name": "Success"},
170
+ {"name": "Sustainability"},
171
+ {"name": "System"},
172
+ {"name": "Task"},
173
+ {"name": "Team"},
174
+ {"name": "Technology"},
175
+ {"name": "Time"},
176
+ {"name": "Training"},
177
+ {"name": "Transformation"},
178
+ {"name": "Understanding"},
179
+ {"name": "Value"},
180
+ {"name": "Vision"},
181
+ {"name": "Wealth"},
182
+ {"name": "Work"},
183
+ {"name": "Workplace"},
184
+ {"name": "Workshop"},
185
+ {"name": "Analysis"},
186
+ {"name": "Approach"},
187
+ {"name": "Assessment"},
188
+ {"name": "Audit"},
189
+ {"name": "Benchmark"},
190
+ {"name": "Brand"},
191
+ {"name": "Business"},
192
+ {"name": "Campaign"},
193
+ {"name": "Case"},
194
+ {"name": "Change"},
195
+ {"name": "Clientele"},
196
+ {"name": "Communication"},
197
+ {"name": "Compensation"},
198
+ {"name": "Competency"},
199
+ {"name": "Conference"},
200
+ {"name": "Consultation"},
201
+ {"name": "Consumer"},
202
+ {"name": "Contract"},
203
+ {"name": "Contribution"},
204
+ {"name": "Convention"},
205
+ {"name": "Cooperation"},
206
+ {"name": "Corporate"},
207
+ {"name": "Culture"},
208
+ {"name": "Customer"},
209
+ {"name": "Data"},
210
+ {"name": "Deadline"},
211
+ {"name": "Decision"},
212
+ {"name": "Delivery"},
213
+ {"name": "Dependability"},
214
+ {"name": "Development"},
215
+ {"name": "Documentation"},
216
+ {"name": "Economy"},
217
+ {"name": "Efficiency"},
218
+ {"name": "Employee"},
219
+ {"name": "Employment"},
220
+ {"name": "Engagement"},
221
+ {"name": "Enterprise"},
222
+ {"name": "Evaluation"},
223
+ {"name": "Execution"},
224
+ {"name": "Expectation"},
225
+ {"name": "Experience"},
226
+ {"name": "Experiment"},
227
+ {"name": "Expense"},
228
+ {"name": "Experiment"},
229
+ {"name": "Facilitation"},
230
+ {"name": "Feedback"},
231
+ {"name": "Finance"},
232
+ {"name": "Forecast"},
233
+ {"name": "Fulfillment"},
234
+ {"name": "Goal"},
235
+ {"name": "Growth"},
236
+ {"name": "Guidance"},
237
+ {"name": "Implementation"},
238
+ {"name": "Improvement"},
239
+ {"name": "Incentive"},
240
+ {"name": "Income"},
241
+ {"name": "Innovation"},
242
+ {"name": "Integration"},
243
+ {"name": "Investment"},
244
+ {"name": "Issue"},
245
+ {"name": "Job"},
246
+ {"name": "Knowledge"},
247
+ {"name": "Leadership"},
248
+ {"name": "Learning"},
249
+ {"name": "Loyalty"},
250
+ {"name": "Management"},
251
+ {"name": "Market"},
252
+ {"name": "Meeting"},
253
+ {"name": "Negotiation"},
254
+ {"name": "Objective"},
255
+ {"name": "Operationalization"},
256
+ {"name": "Opportunity"},
257
+ {"name": "Organization"},
258
+ {"name": "Outcomes"},
259
+ {"name": "Partnership"},
260
+ {"name": "Performance"},
261
+ {"name": "Plan"},
262
+ {"name": "Policy"},
263
+ {"name": "Portfolio"},
264
+ {"name": "Position"},
265
+ {"name": "Possibility"},
266
+ {"name": "Potential"},
267
+ {"name": "Preparation"},
268
+ {"name": "Presentation"},
269
+ {"name": "Problem"},
270
+ {"name": "Procedure"},
271
+ {"name": "Process"},
272
+ {"name": "Product"},
273
+ {"name": "Profit"},
274
+ {"name": "Program"},
275
+ {"name": "Project"},
276
+ {"name": "Proposal"},
277
+ {"name": "Quality"},
278
+ {"name": "Recruitment"},
279
+ {"name": "Reputation"},
280
+ {"name": "Research"},
281
+ {"name": "Resolution"},
282
+ {"name": "Responsibility"},
283
+ {"name": "Revenue"},
284
+ {"name": "Risk"},
285
+ {"name": "Sales"},
286
+ {"name": "Satisfaction"},
287
+ {"name": "Schedule"},
288
+ {"name": "Service"},
289
+ {"name": "Solution"},
290
+ {"name": "Staff"},
291
+ {"name": "Standardization"},
292
+ {"name": "Strategy"},
293
+ {"name": "Success"},
294
+ {"name": "Sustainability"},
295
+ {"name": "System"},
296
+ {"name": "Task"},
297
+ {"name": "Team"},
298
+ {"name": "Technology"},
299
+ {"name": "Time"},
300
+ {"name": "Training"},
301
+ {"name": "Transformation"},
302
+ {"name": "Understanding"},
303
+ {"name": "Value"},
304
+ {"name": "Vision"},
305
+ {"name": "Wealth"},
306
+ {"name": "Work"},
307
+ {"name": "Workplace"},
308
+ {"name": "Workshop"}
309
+ ]
310
+ }
nouns.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import logging
3
+ import pathlib
4
+ import pandas as pd
5
+
6
+ class Nouns:
7
+ '''Stores Nouns so you dont have to.'''
8
+ def __init__(self):
9
+ self.name = "nouns"
10
+ self.logger = logging.getLogger(f"{self.name}")
11
+ self.logger.setLevel(logging.ERROR)
12
+ self.file_path = pathlib.Path(__file__).parent.resolve()
13
+ self.config_file = pathlib.Path(self.file_path) / f"{self.name}.csv"
14
+ #self.config_file = pathlib.Path(self.file_path) / f"{self.name}.json"
15
+
16
+ def get_data(self):
17
+ dtype={'Name': 'string'}
18
+ df = pd.read_csv(self.config_file,dtype=dtype)
19
+ return df['Name']
20
+ #self.data = self.load_json(self.config_file)
21
+ #return self.data['data']
22
+
23
+ def load_json(self,filename):
24
+ with open(filename, "r") as f:
25
+ data = json.load(f)
26
+ return data
position_names.csv CHANGED
The diff for this file is too large to render. See raw diff
 
position_names_tags.txt CHANGED
The diff for this file is too large to render. See raw diff
 
prepositions.csv ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Name
2
+ about
3
+ above
4
+ across
5
+ after
6
+ against
7
+ along
8
+ amid
9
+ among
10
+ around
11
+ as
12
+ at
13
+ before
14
+ behind
15
+ below
16
+ beneath
17
+ beside
18
+ between
19
+ beyond
20
+ by
21
+ concerning
22
+ considering
23
+ despite
24
+ down
25
+ during
26
+ except
27
+ for
28
+ from
29
+ in
30
+ inside
31
+ into
32
+ like
33
+ near
34
+ of
35
+ off
36
+ on
37
+ onto
38
+ out
39
+ outside
40
+ over
41
+ past
42
+ regarding
43
+ round
44
+ since
45
+ through
46
+ throughout
47
+ to
48
+ toward
49
+ under
50
+ underneath
51
+ until
52
+ unto
53
+ up
54
+ upon
55
+ with
56
+ within
57
+ without
prepositions.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import logging
3
+ import pathlib
4
+ import pandas as pd
5
+
6
+ class Prepositions:
7
+ '''Stores prepostions so you dont have to.'''
8
+ def __init__(self):
9
+ self.name = "prepositions"
10
+ self.logger = logging.getLogger(f"{self.name}")
11
+ self.logger.setLevel(logging.ERROR)
12
+ self.file_path = pathlib.Path(__file__).parent.resolve()
13
+ self.config_file = pathlib.Path(self.file_path) / f"{self.name}.csv"
14
+ #self.config_file = pathlib.Path(self.file_path) / f"{self.name}.json"
15
+
16
+ def get_data(self):
17
+ dtype={'Name': 'string'}
18
+ df = pd.read_csv(self.config_file,dtype=dtype)
19
+ return df['Name']
20
+ #self.data = self.load_json(self.config_file)
21
+ #return self.data['data']
22
+
23
+ def load_json(self,filename):
24
+ with open(filename, "r") as f:
25
+ data = json.load(f)
26
+ return data
pronouns.csv ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Name
2
+ i
3
+ you
4
+ he
5
+ she
6
+ it
7
+ we
8
+ they
9
+ me
10
+ you
11
+ him
12
+ her
13
+ us
14
+ them
15
+ myself
16
+ yourself
17
+ himself
18
+ herself
19
+ itself
20
+ ourselves
21
+ themselves
22
+ mine
23
+ yours
24
+ his
25
+ hers
26
+ its
27
+ ours
28
+ theirs
29
+ this
30
+ that
31
+ these
32
+ those
33
+ some
34
+ any
35
+ all
36
+ none
37
+ each
38
+ every
39
+ either
40
+ neither
41
+ both
42
+ few
43
+ many
44
+ several
45
+ one
46
+ someone
47
+ somebody
48
+ something
49
+ anyone
50
+ anybody
51
+ anything
52
+ everyone
53
+ everybody
54
+ everything
55
+ no one
56
+ nobody
57
+ nothing
58
+ another
59
+ other
60
+ others
61
+ another
62
+ each other
63
+ one another
pronouns.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import logging
3
+ import pathlib
4
+ import pandas as pd
5
+
6
+ class Pronouns:
7
+ '''Stores pronouns so you dont have to.'''
8
+ def __init__(self):
9
+ self.name = "pronouns"
10
+ self.logger = logging.getLogger(f"{self.name}")
11
+ self.logger.setLevel(logging.ERROR)
12
+ self.file_path = pathlib.Path(__file__).parent.resolve()
13
+ self.config_file = pathlib.Path(self.file_path) / f"{self.name}.csv"
14
+ #self.config_file = pathlib.Path(self.file_path) / f"{self.name}.json"
15
+
16
+ def get_data(self):
17
+ dtype={'Name': 'string'}
18
+ df = pd.read_csv(self.config_file,dtype=dtype)
19
+ return df['Name']
20
+ #self.data = self.load_json(self.config_file)
21
+ #return self.data['data']
22
+
23
+ def load_json(self,filename):
24
+ with open(filename, "r") as f:
25
+ data = json.load(f)
26
+ return data
sentence.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from adjectives import Adjectives
2
+ from adverbs import Adverbs
3
+ from conjunctions import Conjunctions
4
+ from nouns import Nouns
5
+ from prepositions import Prepositions
6
+ from pronouns import Pronouns
7
+ from verbs import Verbs
8
+
9
+ class SentenceBuilder:
10
+ def __init__(self):
11
+ self.adjectives = Adjectives()
12
+ self.adverbs = Adverbs()
13
+ self.conjunctions = Conjunctions()
14
+ self.nouns = Nouns()
15
+ self.prepositions = Prepositions()
16
+ self.pronouns = Pronouns()
17
+ self.verbs = Verbs()
18
+
19
+ def get_adjectives(self):
20
+ return self.adjectives.get_data()
21
+
22
+ def get_adverbs(self):
23
+ return self.adverbs.get_data()
24
+
25
+ def get_conjunctions(self):
26
+ return self.conjunctions.get_data()
27
+
28
+ def get_nouns(self):
29
+ return self.nouns.get_data()
30
+
31
+ def get_prepositions(self):
32
+ return self.prepositions.get_data()
33
+
34
+ def get_pronouns(self):
35
+ return self.pronouns.get_data()
36
+
37
+ def get_verbs(self):
38
+ return self.verbs.get_data()
split_dataset.py CHANGED
@@ -1,22 +1,16 @@
1
  import traceback
2
  try:
3
- validate_max=33000
4
- train_max=80000
5
- fp = open("./2024-01/position_names_tags.txt",'r')
6
  train = open("./2024-01/train.txt","w")
7
- validate = open("./2024-01/validate.txt","w")
8
  test = open("./2024-01/test.txt","w")
9
- for i,l in enumerate(fp):
10
- print(i,l)
11
- if i <= validate_max:
12
- validate.write(l)
13
- elif i > validate_max and i <= train_max:
14
  train.write(l)
15
  else:
16
  test.write(l)
17
- fp.close()
18
  train.close()
19
- validate.close()
20
  test.close()
21
 
22
  except Exception as e:
 
1
  import traceback
2
  try:
3
+ train_max=400
4
+ t = open("./2024-01/position_names_tags.txt",'r')
 
5
  train = open("./2024-01/train.txt","w")
 
6
  test = open("./2024-01/test.txt","w")
7
+ for i,l in enumerate(t):
8
+ if i <= train_max:
 
 
 
9
  train.write(l)
10
  else:
11
  test.write(l)
12
+ t.close()
13
  train.close()
 
14
  test.close()
15
 
16
  except Exception as e:
test.txt CHANGED
The diff for this file is too large to render. See raw diff
 
train.txt CHANGED
The diff for this file is too large to render. See raw diff
 
validate.txt CHANGED
The diff for this file is too large to render. See raw diff
 
verbs.csv ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Name
2
+ achieve
3
+ analyze
4
+ checks
5
+ codes
6
+ communicate
7
+ collaborate
8
+ coordinate
9
+ demonstrate
10
+ develop
11
+ direct
12
+ evaluate
13
+ execute
14
+ facilitate
15
+ generate
16
+ implement
17
+ influence
18
+ lead
19
+ manage
20
+ negotiate
21
+ organize
22
+ plan
23
+ presents
24
+ prioritize
25
+ problem-solve
26
+ programs
27
+ project-manage
28
+ reads
29
+ recommend
30
+ research
31
+ speaks
32
+ streamline
33
+ supervise
34
+ synthesize
35
+ talks
36
+ tests
37
+ train
38
+ transform
39
+ utilize
40
+ writes
verbs.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import logging
3
+ import pathlib
4
+ import pandas as pd
5
+
6
+ class Verbs:
7
+ '''Stores verbs so you dont have to.'''
8
+ def __init__(self):
9
+ self.name = "verbs"
10
+ self.logger = logging.getLogger(f"{self.name}")
11
+ self.logger.setLevel(logging.ERROR)
12
+ self.file_path = pathlib.Path(__file__).parent.resolve()
13
+ self.config_file = pathlib.Path(self.file_path) / f"{self.name}.csv"
14
+ #self.config_file = pathlib.Path(self.file_path) / f"{self.name}.json"
15
+
16
+ def get_data(self):
17
+ dtype={'Name': 'string'}
18
+ df = pd.read_csv(self.config_file,dtype=dtype)
19
+ return df['Name']
20
+ #self.data = self.load_json(self.config_file)
21
+ #return self.data['data']
22
+
23
+ def load_json(self,filename):
24
+ with open(filename, "r") as f:
25
+ data = json.load(f)
26
+ return data