<commit_before>import util
from urlparse import urlparse

class Biblio(object):
    def __init__(self, raw_dict, aliases):

        # temporary for until we get this from the db via sqlalchemy
        self.raw_dict = raw_dict
        for k, v in raw_dict.iteritems():
            setattr(self, k, v)

        if aliases.best_url is not None:
            self.url = aliases.best_url


    @property
    def display_year(self):
        try:
            return self.year
        except AttributeError:
            return None

    @property
    def display_genre(self):
        try:
            genre=self.genre
        except AttributeError:
            genre = "other"
        if genre=="unknown":
            genre = "other"
        return genre

    @property
    def display_genre_plural(self):
        # for use in phrases like "79 - 91 percentile of articles from 2013"
        genre_plural = self.display_genre + u"s"
        if genre_plural.startswith("other"):<commit_msg>back out changes of genre heading from unknown to other<commit_after>import util
from urlparse import urlparse

class Biblio(object):
    def __init__(self, raw_dict, aliases):

        # temporary for until we get this from the db via sqlalchemy
        self.raw_dict = raw_dict
        for k, v in raw_dict.iteritems():
            setattr(self, k, v)

        if aliases.best_url is not None:
            self.url = aliases.best_url


    @property
    def display_year(self):
        try:
            return self.year
        except AttributeError:
            return None

    @property
    def display_genre(self):
        try:
            genre=self.genre
        except AttributeError:
            genre = "unknown"
        return genre

    @property
    def display_genre_plural(self):
        # for use in phrases like "79 - 91 percentile of articles from 2013"
        genre_plural = self.display_genre + u"s"
        if genre_plural.startswith("other"):
{'fraction_non_alphanumeric': 0.07095115681233934, 'fraction_numerical': 0.008226221079691516, 'mean_word_length': 2.0549450549450547, 'pattern_counts': {'":': 1, '<': 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': '5420927', 'n_tokens_mistral': 577, 'n_tokens_neox': 553, 'n_words': 174}