Spaces:
Running
Running
Update segmenter.py
Browse files- segmenter.py +8 -2
segmenter.py
CHANGED
@@ -79,8 +79,14 @@ class ResumeSegmenter():
|
|
79 |
def segment(self, resume_lines):
|
80 |
self.find_segment_indices(resume_lines)
|
81 |
sections = self.slice_segments(resume_lines)
|
82 |
-
if sections is None:
|
83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
sections_list = [(k, v) for k,v in sections.items() if len(v) > 0 ]
|
85 |
"""intersection_intervals = []
|
86 |
|
|
|
79 |
def segment(self, resume_lines):
|
80 |
self.find_segment_indices(resume_lines)
|
81 |
sections = self.slice_segments(resume_lines)
|
82 |
+
if sections is None:
|
83 |
+
if len(self.resume_indices) == 0:
|
84 |
+
return None
|
85 |
+
else:
|
86 |
+
for key, value in self.resume_segments.items():
|
87 |
+
if len(value) > 0:
|
88 |
+
sections[key] = [min(value), max(value)]
|
89 |
+
sections["basics_info"] = (0, self.resume_indices[0])
|
90 |
sections_list = [(k, v) for k,v in sections.items() if len(v) > 0 ]
|
91 |
"""intersection_intervals = []
|
92 |
|