I'm guessing even Textpipe cannot do this.

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
ezinestein
Posts: 13
Joined: Sat Nov 10, 2007 11:10 am

I'm guessing even Textpipe cannot do this.

Post by ezinestein »

Hi,

I'll guess that there is no way to achieve this using textpipe, but I'll ask anyway.

I would like to clean a text file of all lines that contain alphabetized phrases.

For example:

a new business adventure
a cat chases mice
I like sandwiches
the dog eats grass

In the above example, lines 2 and 3 are what I'm calling 'alphabetized'. This is because the first letter in each word goes in alphabetical order.

Like 'a cat chases mice'. In that example the first letters of each word go like this 'a,ca,ch m'.

The 'I like sandwiches example goes like this 'i,l,s'.

In each case the initial letters of the word go in alphabetical sequence.

I would love for textpipe to filter out or remove such lines?

Is this at all possible?

Best,
ez
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support »

Ahh -why?
ezinestein
Posts: 13
Joined: Sat Nov 10, 2007 11:10 am

Post by ezinestein »

Thank you for your response.

I know it may seem like a strange request... but it would take too long for me to explain why I'd like it done.

That said... any chance that I might be able to accomplish this with textpipe?

Thanks again,
ez
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support »

Yes - it sounds like a student project!

It can be done by copying each line into 2 columns, then sorting the 2nd column to get the words in alphabetical order, and then comparing the 1st and 2nd columns.
ezinestein
Posts: 13
Joined: Sat Nov 10, 2007 11:10 am

Post by ezinestein »

Thanks again for the response.

I can't seem to wrap my mind around what you're saying... as I can't figure out how textpipe will alphabetize the words in a line. Alphabetize lines, yes... but the words in a single line?

I feel dense... and all without being a student too. lol

Thanks again if you're willing to help me understand what you meant in your last post.

Best,
ez
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support »

Inside the 2nd column, convert the words to a word list (which puts them one per line), then sort this, then replace line feeds with spaces to return the line to a sentence form.
Post Reply