sexist filter


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers sexist filter
# 1  
Old 12-08-2004
sexist filter

Many years ago while I was in college, there was a 'sexist' filter on our 3B2 to change words with sexual content to a more political correct form. eg: 'mailman' to 'postal carrier', 'policeman' to 'police officer' , etc. I believe it was part of the DWB, but I'm not sure. Can anyone point me to a source for the scripts or similiar to make substitutions in texts?
# 2  
Old 12-08-2004
Hmm... I have never heard of anything like this and couldn't turn anything up during a quick google, but it'd be fairly straightforward (if not lengthy) to write your own.

Code:
#!/usr/bin/perl

while (<>) {
  $_=~s/Mailman/Postal Carrier/gi;
  $_=~s/Mailwoman/Postal Carrier/gi;
  print "$_";
}

Then
$ ./filter.pl my_sexist_file

Unfortunately, you'd need to add a ton of rules covering all sexist eventualities! It'd probably run as slow as hell once you've got a few rules in there too.

Cheers
ZB
# 3  
Old 12-08-2004
Yes, you are one the right track. As I recall, there were several files. A script file as a front-end and 'translation files'. One of which was call 'sexist'. The file had two columns. One for the word to be replaced and the other for the translation.
# 4  
Old 12-08-2004
One of the dictionary scripts for VIM probaly could do this. Again, you may have to do the writeup as well. But then you could add

Bad words || Good words
------------------------------
mailman - postal carrier
copper - Law Enforcement Agent


http://www.vim.org/scripts/script.php?script_id=195


Though, not a Unix program, this program is called Newspeak 2.1: Politically Correct Translator
Description: Newspeak automatically edits your writing to make it:
either (a) Old Fashioned & Beautiful.
or (b) fashionable and politically correct.

# 5  
Old 12-29-2004
Please see the following link:
http://www.linuxdevcenter.com/pub/a/...vingLinux.html

It appears that it was the 'Writer's WorkBench' I was thinking of. The GNU version does not include a sexist filter, but I will give it a look. Thanks to all who responded.Smilie
# 6  
Old 01-02-2005
Quote:
Originally posted by Quintab
It appears that it was the 'Writer's WorkBench' I was thinking of.
I think you may have had it right the first time. I have the original DWB manuals in front of me. Good thing that I didn't post earlier with a guess as to what DWB meant. These books are labelled "UNIX System V Documenter's Workbench". They describe the following programs: mm, troff, sroff, nroff, tbl, pic, and eqn.

I have throughout all of my unix text processing docs. I can't find any mention of a sexist filter. The style/diction/explain programs came out later. They, as supplied, do not address sexist constructs. With a non-standard data file, I suppose that they could.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Filter records in a huge text file from a filter text file

Hi Folks, I have a text file with lots of rows with duplicates in the first column, i want to filter out records based on filter columns in a different filter text file. bash scripting is what i need. Data.txt Name OrderID Quantity Sam 123 300 Jay 342 498 Kev 78 2500 Sam 420 50 Vic 10... (3 Replies)
Discussion started by: tech_frk
3 Replies

2. UNIX for Dummies Questions & Answers

Filter a particular string

Hi, I have a long log file. Out of which I want to filter particular occurrences where APC=4-033-0. Please help how it can be done. Input : +++ ELEMENT 12-05-27 23:15:06 CC 3482 #040185 > REPT APB TPE=C7NTL SM=22 OPC=4-003-7 APC=4-033-4 inaccessible END OF REPORT #040185 ++- ... (7 Replies)
Discussion started by: vanand420
7 Replies

3. Shell Programming and Scripting

How to filter

Hi I have a file containing the below lines 1010001001639 1010001001789 1020001001927 1030001001928 1040001002033 1200001002609 1200001003481 1200001004935 I need to filter lines that starts with 101. It would be of great help if its in awk. (6 Replies)
Discussion started by: Naga06
6 Replies

4. Solaris

solaris IP filter ?

Hello, i have Solaris 10, is it possible to somehow limit remote access, via ssh for example , for only specific IP adresses , so when someone with IP that is not allowed can't connect via putty or something like that ? (2 Replies)
Discussion started by: tonijel
2 Replies

5. Shell Programming and Scripting

How to filter Alphanumerics

Hi all, Can you please let me know how to achieve the below thing AAABBCC@#$W123 123@#$DFG<>. Output: AAABBCW123 123DFG i.e I want to filer only alphanumerics from the strings (4 Replies)
Discussion started by: marcus_kosaman
4 Replies

6. Solaris

logger + filter

Hi, I have an application log file and I am redirecting it to syslog ...| logger -p user.err Howver, the size redirected is too arge and I am seeking a way to filter what to redirect to syslog. any mean to do this, knowing that I do not want to decrease the log level of the app? ... (1 Reply)
Discussion started by: melanie_pfefer
1 Replies

7. UNIX for Dummies Questions & Answers

How to filter sentences??

Hi, I have few sentences here. $a1="Division of Hematology-Oncology, and Stem cell transplantation, Schneider Childrens Hospital, Albert Einstein College of Medicine, New Hyde Park, New York. "; $a2="Department of Cell Biology and Anatomy, College of Medicine, National Cheng Kung... (3 Replies)
Discussion started by: vanitham
3 Replies

8. Shell Programming and Scripting

File filter

Hi Everyone , have a nice i would need a little help on this i have file which contains blocks such as given below <hgsdp:msisdn=923228719047,loc; HLR SUBSCRIBER DATA SUBSCRIBER IDENTITY MSISDN IMSI STATE AUTHD 923228719047 410072110070614 CONNECTED ... (3 Replies)
Discussion started by: Dastard
3 Replies

9. UNIX for Dummies Questions & Answers

Filter using awk

Hi, I need to filter the output of a command and display omitting the first 6 lines and the last two lines..How can i do this using awk. command | awk ' NR > 7' will omitt the first 6 lines but dont know how to omit the last two lines.. can anyone help? (3 Replies)
Discussion started by: arun_st
3 Replies
Login or Register to Ask a Question