Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def with_paragraf(data):
- table = []
- for p in data:
- paragraf = []
- for sentence in p:
- sentence_string = ''
- for word in sentence:
- if word[0].tail is not None:
- merge = word[0].tail + word.tail.replace('\n', '')
- print(merge)
- sentence_string += merge + ' '
- paragraf.append(sentence_string)
- table.append(paragraf)
- return table
- def with_no_paragraf(data):
- table = []
- for sentence in data:
- sentence_string = ''
- for word in sentence:
- if word[0].tail is not None:
- merge = word[0].tail + word.tail.replace('\n', '')
- sentence_string += merge + ' '
- table.append(sentence_string)
- return table
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement