import re


def Char_Tokenizer(sentence, boundary_chars, tokenized_chars):
	"""
		Separates boundary_chars from the boundary of a word 
		and tokenized_chars from any part of the string
	"""
	tok_sentence = sentence
	# separates boundary_chars when they're found at word boundary
	for curr_char in boundary_chars.split():
		tok_sentence = re.sub(r"(\W|^)(" + curr_char + r"+)(\w)", r"\1 \2 \3", tok_sentence)
		tok_sentence = re.sub(r"(\w)(" + curr_char + r"+)(\W|$)", r"\1 \2 \3", tok_sentence)

	# separates all tokenized_chars
	trans_table = dict((ord(char), " " + char + " ") for char in tokenized_chars)
	tok_sentence = tok_sentence.translate(trans_table)

	return tok_sentence