Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #99718

Re: How can I count word frequency in a web site?

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Laura Creighton <lac@openend.se>
Newsgroups comp.lang.python
Subject Re: How can I count word frequency in a web site?
Date Mon, 30 Nov 2015 03:51:28 +0100
Lines 16
Message-ID <mailman.18.1448851896.14615.python-list@python.org> (permalink)
References <6851e3b8-0d46-4808-9f7f-372b71bf327c@googlegroups.com> <AE33E0E3-35FA-4C1B-A708-BFD2F83A55D2@gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset="us-ascii"
Content-Transfer-Encoding quoted-printable
X-Trace news.uni-berlin.de f/X9Xa536Vi6y2B6p6BkbAdvAip5aRYeELV6sQ7Vbstw==
Return-Path <lac@openend.se>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; 'modify': 0.04; 'cc:addr:python-list': 0.09; 'scripts': 0.09; 'subject:How': 0.09; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'cc:addr:lac': 0.16; 'cc:addr:openend.se': 0.16; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'luck,': 0.16; 'message- id:@fido.openend.se': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'soup': 0.16; 'tool.': 0.16; 'laura': 0.18; '2015': 0.20; 'cc:addr:python.org': 0.20; 'cc:2**2': 0.20; 'cc:addr:gmail.com': 0.24; 'script': 0.25; "i've": 0.25; '-0500,': 0.29; 'received:se': 0.29; 'cc:no real name:2**1': 0.29; 'url:python': 0.33; 'common': 0.33; 'suit': 0.33; 'could': 0.35; 'nov': 0.35; 'but': 0.36; 'url:org': 0.36; 'heard': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'things': 0.38; 'header:Message-Id:1': 0.61; 'beautiful': 0.66; '>you': 0.84; 'header:In-reply-to:1': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=openend.se; s=default; t=1448851889; bh=Km5zNq2dOeqrmuQd86hHGFwVGzSEb177gaSMTcaDDBA=; h=To:cc:From:Subject:In-reply-to:References:Date:From; b=L6MVFIBIaArUP77qBhZMYUmoQrPh4exfEFsxCQtu8laK/6LwtHk1zvjl6sxJjL0XX CGhSsis861rJeM0CNywP8OCFySh8i6sHqqI3YADPTFqQtardNhTSdYr3tISV/WTFdf mXLNa0HFdwleqqYpzXaIA0hjTYa21wEaz8gBX4uE=
In-reply-to <AE33E0E3-35FA-4C1B-A708-BFD2F83A55D2@gmail.com>
Comments In-reply-to Cem Karan <cfkaran2@gmail.com> message dated "Sun, 29 Nov 2015 21:31:49 -0500."
Content-ID <16222.1448851888.1@fido>
X-Greylist Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [82.96.5.2]); Mon, 30 Nov 2015 03:51:29 +0100 (CET)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:99718

Show key headers only | View raw


In a message of Sun, 29 Nov 2015 21:31:49 -0500, Cem Karan writes:
>You might want to look into Beautiful Soup (https://pypi.python.org/pypi/beautifulsoup4), which is an HTML screen-scraping tool.  I've never used it, but I've heard good things about it.
>
>Good luck,
>Cem Karan

http://codereview.stackexchange.com/questions/73887/finding-the-occurrences-of-all-words-in-movie-scripts

scrapes a site of movie scripts and then spits out the 10 most common
words.  I suspect the OP could modify this script to suit his or her needs.

Laura

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How can I count word frequency in a web site? ryguy7272 <ryanshuell@gmail.com> - 2015-11-29 16:49 -0800
  Re: How can I count word frequency in a web site? Cem Karan <cfkaran2@gmail.com> - 2015-11-29 21:31 -0500
    Re: How can I count word frequency in a web site? ryguy7272 <ryanshuell@gmail.com> - 2015-11-29 18:54 -0800
      Re: How can I count word frequency in a web site? Michiel Overtoom <motoom@xs4all.nl> - 2015-11-30 08:56 +0100
  Re: How can I count word frequency in a web site? Laura Creighton <lac@openend.se> - 2015-11-30 03:51 +0100
    Re: How can I count word frequency in a web site? ryguy7272 <ryanshuell@gmail.com> - 2015-11-30 07:04 -0800
  Re: How can I count word frequency in a web site? ryguy7272 <ryanshuell@gmail.com> - 2015-11-30 07:04 -0800

csiph-web