Hi. Is anyone aware of any python based unacceptable language filter
code to scan and detect bad language in text from uploads etc.
Many thanks.
David 4 2002
David Pratt wrote: Hi. Is anyone aware of any python based unacceptable language filter code to scan and detect bad language in text from uploads etc.
Many thanks. David
You might be able to adapt languagetool. http://www.danielnaber.de/languagetool/features.html
Later versions have been ported to Java, but the old python version of
languagetool is at http://tkltrans.sourceforge.net/#r03
His thesis paper is at http://www.danielnaber.de/languageto...ar_checker.pdf
Mind you, given the poor language skills of many native english speakers
(not to mention those for whom english is a second language) relying on
automated filters to enforce 'good' language seems a trifle extreme. This
post for example would probably not pass.
Cheers,
Nigel
PS. For the humour impaired, this g*d d*mm post was a f*cking joke, OK! :-)
Mind you, the links are real.
--
Nigel Rowe
A pox upon the spammers that make me write my address like..
rho (snail) swiftdsl (stop) com (stop) au
"David Pratt" <fa*******@east link.ca> wrote in message
news:ma******** *************** **************@ python.org... Hi. Is anyone aware of any python based unacceptable language filter code to scan and detect bad language in text from uploads etc.
Many thanks. David
Look up Spambayes - if you can filter on terms like "dear friend" you can
filter on the inverse too, no? It needs samples to work with.
On Oct 2, 2005, at 9:45 PM, Nigel Rowe wrote: David Pratt wrote:
Hi. Is anyone aware of any python based unacceptable language filter code to scan and detect bad language in text from uploads etc.
Many thanks. David
You might be able to adapt languagetool. http://www.danielnaber.de/languagetool/features.html
Later versions have been ported to Java, but the old python version of languagetool is at http://tkltrans.sourceforge.net/#r03
His thesis paper is at http://www.danielnaber.de/languagetool/download/ style_and_gramm ar_checker.pdf
Mind you, given the poor language skills of many native english speakers (not to mention those for whom english is a second language) relying on automated filters to enforce 'good' language seems a trifle extreme. This post for example would probably not pass.
Cheers, Nigel
PS. For the humour impaired, this g*d d*mm post was a f*cking joke, OK! :-)
Mind you, the links are real.
-- Nigel Rowe A pox upon the spammers that make me write my address like.. rho (snail) swiftdsl (stop) com (stop) au -- http://mail.python.org/mailman/listinfo/python-list
I think he may be referring to "bad" words, and 'filthy' language. At
least that's what i got from the question.
There are many PHP implementations on the web, which could be adapted
to python fairly easily. Most of which are probably not the most
ideal solution and
involve alot of stuff like
for n in badwords:
texttofilter.re place(n, '<bad word deleted>')
If that's all you need though, maybe it's not so bad.
---
Andrew Gwozdziewycz ap****@gmail.co m http://ihadagreatview.org http://plasticandroid.org
Andrew Gwozdziewycz wrote: I think he may be referring to "bad" words, and 'filthy' language. At least that's what i got from the question. There are many PHP implementations on the web, which could be adapted to python fairly easily. Most of which are probably not the most ideal solution and involve alot of stuff like
for n in badwords: texttofilter.re place(n, '<bad word deleted>')
If that's all you need though, maybe it's not so bad.
This is a no-op, since it replaces the text, but then discards it. You
meant:
for badWord in badWords:
textToFilter = textToFilter.re place(badWord, '<)!&%(#&)%>')
--
Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
If anything is sacred, the human body is sacred.
-- Walt Whitman This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Irmen de Jong |
last post by:
QOTW: "I'll claim without proof that how mixed-type comparisons work
with Python classes is also beyond wizard prediction in all cases: the
implementation of comparison in Python is crushingly complicated."
-- Tim Peters
"Honest to God, if it doesn't have coloured cells all over the place, then
they kind of stare at you like rabbits caught in the
headlights of an oncoming car." -- Mark Carter
|
by: mike420 |
last post by:
I think everyone who used Python will agree that its syntax is
the best thing going for it. It is very readable and easy
for everyone to learn. But, Python does not a have very good
macro capabilities, unfortunately. I'd like to know if it may
be possible to add a powerful macro system to Python, while
keeping its amazing syntax, and if it could be possible to
add Pythonistic syntax to Lisp or Scheme, while keeping all
of the...
|
by: Ville Vainio |
last post by:
I don't know if you have seen this before, but here goes:
http://text.userlinux.com/white_paper.html
There is a jab at Python, though, mentioning that Ruby is more
"refined".
--
Ville Vainio http://www.students.tut.fi/~vainio24
|
by: Emile van Sebille |
last post by:
QOTW (advanced interfaces track): "I'm firmly in favour of any language
that can DWIMNWIS." -- Tim Delaney
QOTW (MS roadkill track): "Underestimate MS at your own risk. It is one
thing to not like MS, and possibly a reasonable position to take.
However, underestimating them is for fools." -- Mark Hammond, on
Microsoft's commitment to .net.
Anthony Baxter releases Python 2.3.3 final.
|
by: Lad |
last post by:
Is anyone capable of providing Python advantages over PHP if there are
any?
Cheers,
L.
| |
by: Alex |
last post by:
I'm looking at a tutorial with the code below
from wxPython.wx import *
class MyApp(wxApp):
def OnInit(self):
frame = wxFrame(NULL, -1, "winApp", size = (800,640))
frame.Show(true)
self.SetTopWindow(frame)
return true
|
by: Ville Voipio |
last post by:
I would need to make some high-reliability software
running on Linux in an embedded system. Performance
(or lack of it) is not an issue, reliability is.
The piece of software is rather simple, probably a
few hundred lines of code in Python. There is a need
to interact with network using the socket module,
and then probably a need to do something hardware-
related which will get its own driver written in
C.
|
by: Xah Lee |
last post by:
Python, Lambda, and Guido van Rossum
Xah Lee, 2006-05-05
In this post, i'd like to deconstruct one of Guido's recent blog about
lambda in Python.
In Guido's blog written in 2006-02-10 at
http://www.artima.com/weblogs/viewpost.jsp?thread=147358
|
by: Lorenzo Stella |
last post by:
Hi all,
I haven't experienced functional programming very much, but now I'm
trying to learn Haskell and I've learned that: 1) in functional
programming LISTS are fundmental; 2) any "cycle" in FP become
recursion.
I also know that Python got some useful tool such as map, filter,
reduce... so I told: "let's try some FP-style programming with
Python!". I took a little example of Haskell:
listprimes :: Integer -
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |