Skip to main content

Home/ interesting_sites/ Group items tagged time

Rss Feed Group items tagged

mesbah095

Guest Post Online - 0 views

  •  
    Article Writing & Guestpost You Can Join this Site for Your Article & guest post, Just Easy way to join this site & total free Article site. This site article post to totally free Way. Guest Post & Article Post live to Life time only for Current & this time new User. http://guestpostonline.com
pagetribe .

http://nltk.googlecode.com/svn/trunk/doc/book/ch01.html - 0 views

  • We can count how often a word occurs in a tex
  • Adding two lists creates a new list
  • count the occurrences of a particular word using text1.count('heaven')
  • ...18 more annotations...
  • By convention, m:n means elements m…n-1
  • A consequence of this last change is that the list only has four elements, and accessing a later value generates an error
  • We can join the words of a list to make a single string, or split a string into a list, as follows:
  • 'Monty Python'.split()
  • frequency distribution
  • frequency of each vocabulary item
  • find the 50 most frequent words
  • hese very long words are often hapaxes (i.e. unique) and perhaps it would be better to find frequently occurring long words.
  • Here are all words from the chat corpus that are longer than 7 characters, that occur more than 7 times:   >>> fdist5 = FreqDist(text5) >>> sorted([w for w in set(text5) if len(w) > 7 and fdist5[w] > 7]) ['#14-19teens', '#talkcity_adults', '((((((((((', '........', 'Question', 'actually', 'anything', 'computer', 'cute.-ass', 'everyone', 'football', 'innocent', 'listening', 'remember', 'seriously', 'something', 'together', 'tomorrow', 'watching'] >>>
  • The collocations() function does this for us
  • find bigrams that occur more often than we would expect based on the frequency of individual words.
  • fdist = FreqDist(samples) create a frequency distribution containing the given samples fdist.inc(sample) increment the count for this sample fdist['monstrous'] count of the number of times a given sample occurred fdist.freq('monstrous') frequency of a given sample fdist.N() total number of samples fdist.keys() the samples sorted in order of decreasing frequency for sample in fdist: iterate over the samples, in order of decreasing frequency fdist.max() sample with the greatest count fdist.tabulate() tabulate the frequency distribution fdist.plot() graphical plot of the frequency distribution fdist.plot(cumulative=True) cumulative plot of the frequency distribution fdist1 < fdist2 test if samples in fdist1 occur less frequently than in fdist2
  • it goes through each word in text1, assigning each one in turn to the variable w and performing the specified operation on the variable.
  • The above notation is called a "list comprehension"
  • [f(w) for ...] or [w.f() for ...],
  • Now that we are not double-counting words like This and this
  • by filtering out any non-alphabetic items:   >>> len(set([word.lower() for word in text1 if word.isalpha()]))
  • A collocation is a sequence of words which occur together unusually often. Thus red wine is a collocation, while the wine is not. A characteristic of collocations is that they are resistant to substitution with words that have similar senses — maroon wine sounds definitely odd.
cecilia marie

Reliable Online Computer Repair - 1 views

My PC has been acting strange lately and I can no longer fix it on my own. I did everything I could but this time, I really need someone who can really fix my computer problem. I called Computer Pr...

computer problem

started by cecilia marie on 17 May 11 no follow-up yet
anonymous

Reliable Online Computer Repair - 2 views

My PC has been acting strange lately and I can no longer fix it on my own. I did everything I could but this time, I really need someone who can really fix my computer problem. I called Computer Pr...

computer problem

started by anonymous on 12 May 11 no follow-up yet
Justin Pierce

The Most Excellent Bookkeeping Services - 1 views

When I was still single, I had all the time to manage my gift shop. But when I got married a year ago, I found it really hard to give equal attention to my business as well as to my roles as a wife...

started by Justin Pierce on 02 Oct 12 no follow-up yet
pagetribe .

Django Tagging - 0 views

shared by pagetribe . on 18 Nov 08 - Cached
  • >>> tags = Tag.objects.usage_for_model(Widget, counts=True)
  • [('cheese', 1), ('house', 2), ('thing', 1), ('toast', 1)]
  •  
    def usage_for_model(self, model, counts=False, min_count=None, filters=None): """ Obtain a list of tags associated with instances of the given Model class. If ``counts`` is True, a ``count`` attribute will be added to each tag, indicating how many times it has been used against the Model class in question. If ``min_count`` is given, only tags which have a ``count`` greater than or equal to ``min_count`` will be returned. Passing a value for ``min_count`` implies ``counts=True``. To limit the tags (and counts, if specified) returned to those used by a subset of the Model's instances, pass a dictionary of field lookups to be applied to the given Model as the ``filters`` argument. """ if filters is None: filters = {} if min_count is not None: counts = True model_table = qn(model._meta.db_table) model_pk = '%s.%s' % (model_table, qn(model._meta.pk.column)) query = """ SELECT DISTINCT %(tag)s.id, %(tag)s.name%(count_sql)s FROM %(tag)s INNER JOIN %(tagged_item)s ON %(tag)s.id = %(tagged_item)s.tag_id INNER JOIN %(model)s ON %(tagged_item)s.object_id = %(model_pk)s %%s WHERE %(tagged_item)s.content_type_id = %(content_type_id)s %%s GROUP BY %(tag)s.id, %(tag)s.name %%s ORDER BY %(tag)s.name ASC""" % { 'tag': qn(self.model._meta.db_table), 'count_sql': counts and (', COUNT(%s)' % model_pk) or '', 'tagged_item': qn(self._get_related_model_by_accessor('items')._meta.db_table), 'model': model_table, 'model_pk': model_pk, 'content_type_id': ContentType.objects.get_for_model(model).pk, } extra_joins = '' extra_criteria = '' min_count_sql
  •  
    usage_for_model
hansel molly

Great Remote Computer Support Services - 1 views

Computer Support Professional offers unrivaled online computer support services that gave me the assurance that my computer is in good hands. Every time I needed the help of their computer support ...

computer support

started by hansel molly on 26 May 11 no follow-up yet
helen hunt

Quality Computer Help Desk Support Services - 1 views

I am so thankful with HelpVirtualDeskSupport help desk support services. They help me fixed my computer. Their PC help desk support specialists really know what they are doing. HelpVirtualDeskSup...

help desk support

started by helen hunt on 17 May 11 no follow-up yet
pagetribe .

Django | Sending e-mail | Django Documentation - 0 views

  • Testing e-mail sending¶ The are times when you do not want Django to send e-mails at all. For example, while developing a website, you probably don't want to send out thousands of e-mails -- but you may want to validate that e-mails will be sent to the right people under the right conditions, and that those e-mails will contain the correct content.
  •  
    python -m smtpd -n -c DebuggingServer localhost:1025
felix montgomery

Fix Computer Issues Today! - 1 views

I can lose anything but my PC. It is my work, life and blood. So you can imagine how I reacted when my PC automatically rebooted twice in a day for 3 consecutive days. Thankfully I was able to subs...

fix computer

started by felix montgomery on 02 May 11 no follow-up yet
1 - 12 of 12
Showing 20 items per page