Update extractor.py
Browse files- extractor.py +11 -1
extractor.py
CHANGED
@@ -138,7 +138,17 @@ def predict(text):
|
|
138 |
for links in process_tokens(data, 'URL'):
|
139 |
profile['links'].append(links['text'])
|
140 |
# Process experiences and education
|
141 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
profile['experiences'].append({
|
143 |
"start": None,
|
144 |
"end": None,
|
|
|
138 |
for links in process_tokens(data, 'URL'):
|
139 |
profile['links'].append(links['text'])
|
140 |
# Process experiences and education
|
141 |
+
workzip = []
|
142 |
+
exp = process_tokens(data, 'EXPERIENCES DESC')
|
143 |
+
designation = process_tokens(data, 'DESIGNATION')
|
144 |
+
comp = process_tokens(data, 'COMPANY')
|
145 |
+
if len(exp) >= len (designation) and len(exp) >= len(comp):
|
146 |
+
workzip = zip(cycle(designation),cycle(company),exp)
|
147 |
+
elif len(designation)>=len(comp):
|
148 |
+
workzip = zip((designation),cycle(company),cycle(exp))
|
149 |
+
else:
|
150 |
+
workzip = zip(cycle(designation),(company),cycle(exp))
|
151 |
+
for designation, company, experience_desc in workzip:
|
152 |
profile['experiences'].append({
|
153 |
"start": None,
|
154 |
"end": None,
|