code: def filter_segs(self, segs):
          
          def whole_seg(seg):
              m = self.seg_regex.match(seg)
              if m and m.group(0) == seg:
                  return True
              else:
                  return False
          return list(filter(whole_seg, segs))
docs: Given list of strings, return only those which are valid segments.
  
          Args:
              segs (list): list of unicode values
  
          Returns:
              list: values in `segs` that are valid segments (according to the
                    definititions of bases and diacritics/modifiers known to the
                    object