<commit_before>import unicodedata

from .attribute import Attribute, RenditionAttribute
from .misc import is_printable_char



class Character:
  def __init__(self, value, attr=RenditionAttribute.normal):
    assert is_printable_char(value) and isinstance(attr, int)
    self.__value = value
    self.__attr = attr

  @property
  def value(self):
    return self.__value

  @property
  def attr(self):
    return self.__attr

  @property
  def width(self):
    return 1 if unicodedata.east_asian_width(self.value) not in {"W", "F"} \
           else 2
<commit_msg>Remove extra imported class<commit_after>import unicodedata

from .attribute import RenditionAttribute
from .misc import is_printable_char



class Character:
  def __init__(self, value, attr=RenditionAttribute.normal):
    assert is_printable_char(value) and isinstance(attr, int)
    self.__value = value
    self.__attr = attr

  @property
  def value(self):
    return self.__value

  @property
  def attr(self):
    return self.__attr

  @property
  def width(self):
    return 1 if unicodedata.east_asian_width(self.value) not in {"W", "F"} \
           else 2

{'fraction_non_alphanumeric': 0.08576480990274093, 'fraction_numerical': 0.0035366931918656055, 'mean_word_length': 3.7364016736401675, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5790397', 'n_tokens_mistral': 362, 'n_tokens_neox': 345, 'n_words': 100}