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
I'm guessing even Textpipe cannot do this.
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
-
- Posts: 13
- Joined: Sat Nov 10, 2007 11:10 am
- DataMystic Support
- Site Admin
- Posts: 2229
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Ahh -why?
Regards,
Simon Carter, https://www.DataMystic.com
https://www.JadeDiabetes.com - Insulin dose calculator for Type 1 diabetes
https://www.DownloadPipe.com - 250,000 free software downloads
Simon Carter, https://www.DataMystic.com
https://www.JadeDiabetes.com - Insulin dose calculator for Type 1 diabetes
https://www.DownloadPipe.com - 250,000 free software downloads
-
- Posts: 13
- Joined: Sat Nov 10, 2007 11:10 am
- DataMystic Support
- Site Admin
- Posts: 2229
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
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.
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.
Regards,
Simon Carter, https://www.DataMystic.com
https://www.JadeDiabetes.com - Insulin dose calculator for Type 1 diabetes
https://www.DownloadPipe.com - 250,000 free software downloads
Simon Carter, https://www.DataMystic.com
https://www.JadeDiabetes.com - Insulin dose calculator for Type 1 diabetes
https://www.DownloadPipe.com - 250,000 free software downloads
-
- Posts: 13
- Joined: Sat Nov 10, 2007 11:10 am
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
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
- DataMystic Support
- Site Admin
- Posts: 2229
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
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.
Regards,
Simon Carter, https://www.DataMystic.com
https://www.JadeDiabetes.com - Insulin dose calculator for Type 1 diabetes
https://www.DownloadPipe.com - 250,000 free software downloads
Simon Carter, https://www.DataMystic.com
https://www.JadeDiabetes.com - Insulin dose calculator for Type 1 diabetes
https://www.DownloadPipe.com - 250,000 free software downloads