khrek commited on
Commit
4830708
1 Parent(s): 5313aae

Update segmenter.py

Browse files
Files changed (1) hide show
  1. 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
- return None
 
 
 
 
 
 
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