summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesus Rivero <neurogeek@gentoo.org>2008-11-28 01:39:20 +0000
committerJesus Rivero <neurogeek@gentoo.org>2008-11-28 01:39:20 +0000
commitb7283e8144c410d819a1efbee344521ec4438d98 (patch)
tree9ce9d2d7e6ed2e7edcfda82a745b076911d3cc60 /dev-python
parentversion bump, changelog: https://projects.gentooexperimental.org/eix/browser/... (diff)
downloadgentoo-2-b7283e8144c410d819a1efbee344521ec4438d98.tar.gz
gentoo-2-b7283e8144c410d819a1efbee344521ec4438d98.tar.bz2
gentoo-2-b7283e8144c410d819a1efbee344521ec4438d98.zip
Initial commit. Thanks to David Guerizec for ebuild
(Portage version: 2.2_rc12/cvs/Linux 2.6.18-gentoo-r3 i686)
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/reverend/ChangeLog10
-rw-r--r--dev-python/reverend/Manifest5
-rw-r--r--dev-python/reverend/files/reverend-0.3-email.patch63
-rw-r--r--dev-python/reverend/metadata.xml9
-rw-r--r--dev-python/reverend/reverend-0.3.ebuild35
5 files changed, 122 insertions, 0 deletions
diff --git a/dev-python/reverend/ChangeLog b/dev-python/reverend/ChangeLog
new file mode 100644
index 000000000000..5308eb8faef6
--- /dev/null
+++ b/dev-python/reverend/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for dev-python/reverend
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/reverend/ChangeLog,v 1.1 2008/11/28 01:39:20 neurogeek Exp $
+
+*reverend-0.3 (28 Nov 2008)
+
+ 28 Nov 2008; Jesus Rivero <neurogeek@gentoo.org>
+ +files/reverend-0.3-email.patch, +metadata.xml, +reverend-0.3.ebuild:
+ Initial commit. Thanks to David Guerizec for ebuild
+
diff --git a/dev-python/reverend/Manifest b/dev-python/reverend/Manifest
new file mode 100644
index 000000000000..085affa397c5
--- /dev/null
+++ b/dev-python/reverend/Manifest
@@ -0,0 +1,5 @@
+AUX reverend-0.3-email.patch 2025 RMD160 2681eadb8142fa705ba30f8b15f7ea48f7574388 SHA1 13e2555cc34fd601d15f4447c03255135df908ef SHA256 698c8e67802f7c184becc4103f186eb0db8f7763e4c77b767dd3ebdcbe5b748d
+DIST Reverend-0.3.tar.gz 11892 RMD160 6a35e41fbbd6eeb910ca39f34ccc5b63cf250c83 SHA1 e981539e0e1f62280a93322d26d9b2f98c92c62e SHA256 a8610d05cf7be266fc3a6c779a4917aebd1f490649e365255e17c7fd9e799d17
+EBUILD reverend-0.3.ebuild 672 RMD160 ad19675192282a4d7bdc6e2691d0cc5f428cb0b7 SHA1 86dcd026d6ba92cf01a62ad778c08d10cc76f1a3 SHA256 2b1f05551d7d5adc23e759867688ceca9b7cd51ac51e7731ccef92d794101272
+MISC ChangeLog 327 RMD160 3fef4d3f6db6915ea20a940de0dde05968404b20 SHA1 8fbed9e7ee3ff36f2bce7fc2ac58542341d4896e SHA256 b5ca4059d9c167601b3bed156a8db6c9a9822ade3f23e8be51127fbee86dc4e9
+MISC metadata.xml 255 RMD160 b69d2df062aad1158c03b925d5bfdeab02f98db2 SHA1 c94d776662afd93f3be5dc1fea7793b80738dbc5 SHA256 01d09f8eee4532c21a12d462263dfa84fda9e1b421410b13fe9799ed4680ba7b
diff --git a/dev-python/reverend/files/reverend-0.3-email.patch b/dev-python/reverend/files/reverend-0.3-email.patch
new file mode 100644
index 000000000000..6b343d61b7a0
--- /dev/null
+++ b/dev-python/reverend/files/reverend-0.3-email.patch
@@ -0,0 +1,63 @@
+--- reverend/guessers/email.py 2006-04-25 00:15:27.000000000 +0200
++++ reverend/guessers/email.py 2006-04-25 01:12:16.000000000 +0200
+@@ -9,7 +9,6 @@
+ import email
+
+ from reverend.thomas import Bayes
+-from reverend.splitter import Splitter
+
+
+ class EmailClassifier(Bayes):
+@@ -19,19 +18,22 @@
+ # This should return a list of strings
+ # which will be used as the key into
+ # the table of token counts
+- tokens = self.getHeaderTokens(msg)
+- tokens += self.getBodyTokens(msg)
+-
++ for tok in self.getHeaderTokens(msg):
++ yield tok
++
++ for tok in self.getBodyTokens(msg):
++ yield tok
++
+ # Get some tokens that are generated from the
+ # header and the structure
+- tokens += self.getMetaTokens(msg)
+- return tokens
++ for tok in self.getMetaTokens(msg):
++ yield tok
+
+ def getBodyTokens(self, msg):
+ text = self.getTextPlain(msg)
+ if text is None:
+ text = ''
+- tl = self.splitter.split(text)
++ tl = self._tokenizer.tokenize(text)
+ return tl
+
+ def getHeaderTokens(self, msg):
+@@ -40,12 +42,12 @@
+ text += msg.get('from','fromnoone') + ' '
+ text += msg.get('to','tonoone') + ' '
+ text += msg.get('cc','ccnoone') + ' '
+- tl = self.splitter.split(text)
++ tl = self._tokenizer.tokenize(text)
+ return tl
+
+ def getTextPlain(self, msg):
+ for part in msg.walk():
+- typ = part.get_type()
++ typ = part.get_content_type()
+ if typ and typ.lower() == "text/plain":
+ text = part.get_payload(decode=True)
+ return text
+@@ -53,7 +55,7 @@
+
+ def getTextHtml(self, msg):
+ for part in msg.walk():
+- typ = part.get_type()
++ typ = part.get_content_type()
+ if typ and typ.lower() == "text/html":
+ text = part.get_payload(decode=False)
+ return text
diff --git a/dev-python/reverend/metadata.xml b/dev-python/reverend/metadata.xml
new file mode 100644
index 000000000000..2ea988a46e81
--- /dev/null
+++ b/dev-python/reverend/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>python</herd>
+ <maintainer>
+ <email>neurogeek@gentoo.org</email>
+ <name>Jesus Rivero</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-python/reverend/reverend-0.3.ebuild b/dev-python/reverend/reverend-0.3.ebuild
new file mode 100644
index 000000000000..a5abd753a492
--- /dev/null
+++ b/dev-python/reverend/reverend-0.3.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/reverend/reverend-0.3.ebuild,v 1.1 2008/11/28 01:39:20 neurogeek Exp $
+
+inherit distutils
+
+MY_P=R${P#r}
+
+DESCRIPTION="Reverend - Simple Bayesian classifier"
+SRC_URI="mirror://sourceforge/reverend/${MY_P}.tar.gz"
+HOMEPAGE="http://divmod.org/trac/wiki/DivmodReverend"
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+DEPEND="virtual/python"
+
+DOCS="README.txt changelog.txt"
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ distutils_src_unpack
+ epatch "${FILESDIR}/${P}-email.patch"
+}
+
+
+src_install() {
+ distutils_src_install
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*
+ fi
+}