def __get_contents_in_fragment(self, fragment):
    fragment = re.sub('_ANCHOR_(LEFT|RIGHT)_TAG_', ' ', fragment)
    if re.match('^ *$', fragment):
        return
    text_unit = TextUnit(fragment)
    if text_unit.is_sentence():
        if self.in_sentence:
            (yield '。\n')
        (yield text_unit.separated)
        (yield ' 。\n')
        self.in_sentence = False
    else:
        (yield text_unit.separated)
        (yield '―')
        self.in_sentence = True
def __get_contents_in_fragment(self, fragment):
    fragment = re.sub('_ANCHOR_(LEFT|RIGHT)_TAG_', ' ', fragment)
    if re.match('^ *$', fragment):
        return
    text_unit = TextUnit(fragment)
    if text_unit.is_sentence():
        if self.in_sentence:
            (yield '。\n')
        (yield text_unit.separated)
        (yield ' 。\n')
        self.in_sentence = False
    else:
        (yield text_unit.separated)
        (yield '―')
        self.in_sentence = True