Exemplo n.º 1
0
	def add_content(self, text):
		if self.stem:
			self.content += ' ' + cleaner.clean_text_and_stem(text)
		elif self.clean:
			self.content += ' ' + cleaner.clean_text(text)
		else:
			self.content += text
Exemplo n.º 2
0
	def __init__(self, post_id, post_time_str, forum_id, thread_id, author_id, author_name, first_post_marker, title, content, clean = True, stem = False):
		self.post_id = int(post_id)
		self.post_time_str = post_time_str
		self.forum_id = int(forum_id)
		self.thread_id = int(thread_id)
		self.author_id = int(author_id)
		self.author_name = author_name
		self.is_first_post = int(first_post_marker)
		self.title = title 
		self.clean = clean
		self.stem = stem
		if stem:
			self.content = cleaner.clean_text_and_stem(content)
		elif clean:
			self.content = cleaner.clean_text(content)
		else:
			self.content = content