<commit_before>import urlparse
import urllib
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.template.loader import render_to_string
from django.utils import simplejson, text
from jellyroll.managers import ItemManager
from tagging.fields import TagField

class Item(models.Model):
    """
    A generic jellyroll item. Slightly denormalized for performance.
    """
    
    # Generic relation to the object.
    content_type = models.ForeignKey(ContentType)
    object_id = models.IntegerField()
    object = models.GenericForeignKey()
    
    # "Standard" metadata each object provides.
    url = models.URLField(blank=True)
    timestamp = models.DateTimeField()
    tags = TagField()
    
    # Metadata about where the object "came from" -- used by data providers to
    # figure out which objects to update when asked.
    source = models.CharField(maxlength=100, blank=True)
    source_id = models.TextField(blank=True)
    <commit_msg>Updated models for GFK move in Django trunk.<commit_after>import urlparse
import urllib
from django.conf import settings
from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.template.loader import render_to_string
from django.utils import simplejson, text
from jellyroll.managers import ItemManager
from tagging.fields import TagField

class Item(models.Model):
    """
    A generic jellyroll item. Slightly denormalized for performance.
    """
    
    # Generic relation to the object.
    content_type = models.ForeignKey(ContentType)
    object_id = models.IntegerField()
    object = generic.GenericForeignKey()
    
    # "Standard" metadata each object provides.
    url = models.URLField(blank=True)
    timestamp = models.DateTimeField()
    tags = TagField()
    
    # Metadata about where the object "came from" -- used by data providers to
    # figure out which objects to update when asked.
    source = models.CharField(maxlength=100, blank=True)
    source_id = models.TextField(blank=True)
    
{'fraction_non_alphanumeric': 0.0715622076707203, 'fraction_numerical': 0.002806361085126286, 'mean_word_length': 3.9172413793103447, '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': '5131308', 'n_tokens_mistral': 574, 'n_tokens_neox': 558, 'n_words': 191}