473,405 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Need to sort a very large list of words

I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word and
asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.
Any helpful comments?
Thanks in advance.
Jan 8 '07 #1
10 3472
" Frank" <fr***@a-znet.comwrote in message news:OZ*************@TK2MSFTNGP04.phx.gbl...
>I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word and
asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.
Any helpful comments?
Thanks in advance.


Why not use the command line utility sort.exe?

Willy.

Jan 8 '07 #2

" Frank" <fr***@a-znet.comwrote in message
news:OZ*************@TK2MSFTNGP04.phx.gbl...
>I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word and
asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.
Any helpful comments?
Suggestion, first pigeonhole the data, by reading one line at a time, and
putting all the As in one file, Bs in another, etc, without worrying about
sorting. Then, sort each file independently, then catenate all the files
back together.
>

Thanks in advance.

Jan 8 '07 #3
I'll bite... what does "too large" mean?

Is there some actual number of words you might let us in on? I don't mean
to sound silly but if it is gazillion you'd probably run into different
problems than if it was just .5 gazillion. Other than that are you sorting
it in realtime, once per hour, once per day, on demand, this one time and
then who cares?

" Frank" <fr***@a-znet.comwrote in message
news:OZ*************@TK2MSFTNGP04.phx.gbl...
>I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word and
asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.

Any helpful comments?
Thanks in advance.

Jan 8 '07 #4
I didn't know it existed. I'll try

thanks

"Willy Denoyette [MVP]" <wi*************@telenet.bewrote in message
news:Ow**************@TK2MSFTNGP04.phx.gbl...
>" Frank" <fr***@a-znet.comwrote in message
news:OZ*************@TK2MSFTNGP04.phx.gbl...
>>I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word
and asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.
Any helpful comments?
Thanks in advance.


Why not use the command line utility sort.exe?

Willy.

Jan 8 '07 #5
Thanks, I think I'll try the suggestion from Willy then Ben if needed
"Tom Leylan" <tl*****@nospam.netwrote in message
news:er**************@TK2MSFTNGP06.phx.gbl...
I'll bite... what does "too large" mean?

Is there some actual number of words you might let us in on? I don't mean
to sound silly but if it is gazillion you'd probably run into different
problems than if it was just .5 gazillion. Other than that are you
sorting it in realtime, once per hour, once per day, on demand, this one
time and then who cares?

" Frank" <fr***@a-znet.comwrote in message
news:OZ*************@TK2MSFTNGP04.phx.gbl...
>>I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word
and asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.

Any helpful comments?
Thanks in advance.


Jan 8 '07 #6
Good idea, thanks
"Ben Voigt" <rb*@nospam.nospamwrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
>
" Frank" <fr***@a-znet.comwrote in message
news:OZ*************@TK2MSFTNGP04.phx.gbl...
>>I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word
and asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.
Any helpful comments?

Suggestion, first pigeonhole the data, by reading one line at a time, and
putting all the As in one file, Bs in another, etc, without worrying about
sorting. Then, sort each file independently, then catenate all the files
back together.
>>

Thanks in advance.


Jan 8 '07 #7
I would create a table in SQL2005 Express and read each word line at a
time into the data table. Then pull out using ORDER BY clause and
write to output file.

Something like this gets even easier with a software like LLBLGenPro
(http://llblgen.com) I imagine this could all be done in a matter of 5
mins. or less :)
Frank wrote:
I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word and
asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.
Any helpful comments?
Thanks in advance.
Jan 9 '07 #8
Or he could lease time on Deep Blue. But why would he need an OR mapper to
sort a list of words?

I don't believe anybody knows why he wants to do it in which case an old
copy of FoxPro can sort them as could any number of free database tools.
The last thing on my list would have been Word, I didn't even know Word
could do such a thing. If I wanted MS Office to do it I might have given
Excel a shot at it. :-)

"Sir C4" <Va*******@gmail.comwrote in message
news:11**********************@i15g2000cwa.googlegr oups.com...
>I would create a table in SQL2005 Express and read each word line at a
time into the data table. Then pull out using ORDER BY clause and
write to output file.

Something like this gets even easier with a software like LLBLGenPro
(http://llblgen.com) I imagine this could all be done in a matter of 5
mins. or less :)
Frank wrote:
>I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word
and
asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.
Any helpful comments?
Thanks in advance.

Jan 9 '07 #9
"Sir C4" <Va*******@gmail.comwrote in message
news:11**********************@i15g2000cwa.googlegr oups.com...
>I would create a table in SQL2005 Express and read each word line at a
time into the data table. Then pull out using ORDER BY clause and
write to output file.

Something like this gets even easier with a software like LLBLGenPro
(http://llblgen.com) I imagine this could all be done in a matter of 5
mins. or less :)

If you are familiar with it. I may try it just to learn about SQL

Thanks

>

Frank wrote:
>I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word
and
asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.
Any helpful comments?
Thanks in advance.

Jan 10 '07 #10
Thanks to all but the first reply about the command line sort utility worked
great.
If that didn't I sure the second reply would have been simple to program.


"Tom Leylan" <tl*****@nospam.netwrote in message
news:OD**************@TK2MSFTNGP02.phx.gbl...
Or he could lease time on Deep Blue. But why would he need an OR mapper
to sort a list of words?

I don't believe anybody knows why he wants to do it in which case an old
copy of FoxPro can sort them as could any number of free database tools.
The last thing on my list would have been Word, I didn't even know Word
could do such a thing. If I wanted MS Office to do it I might have given
Excel a shot at it. :-)

"Sir C4" <Va*******@gmail.comwrote in message
news:11**********************@i15g2000cwa.googlegr oups.com...
>>I would create a table in SQL2005 Express and read each word line at a
time into the data table. Then pull out using ORDER BY clause and
write to output file.

Something like this gets even easier with a software like LLBLGenPro
(http://llblgen.com) I imagine this could all be done in a matter of 5
mins. or less :)
Frank wrote:
>>I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word
and
asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and
what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.
Any helpful comments?
Thanks in advance.


Jan 10 '07 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kamilche | last post by:
I've written a generic sort routine that will sort dictionaries, lists, or tuples, either by a specified key or by value. Comments welcome! import types def sort(container, key = None,...
1
by: DJTB | last post by:
zodb-dev@zope.org] Hi, I'm having problems storing large amounts of objects in a ZODB. After committing changes to the database, elements are not cleared from memory. Since the number of...
3
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems...
8
by: Ben Fidge | last post by:
Hi I'm working on a site which requires the users to specify a hotel at which they're staying in London. The complete list of hotels comes to something like 1600 records. Each record consists of...
4
by: naknak4 | last post by:
Introduction This assignment requires you to develop solutions to the given problem using several different approaches (which actually involves using three different STL containers). You will...
6
by: naknak | last post by:
Introduction This assignment requires you to develop solutions to the given problem using several different approaches (which actually involves using three different STL containers). You will...
20
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
3
by: dotyet | last post by:
Hello Everyone, I have a mixed workload DB2 UDB 8.2 FP 14 Windows x64 database. The database performs as per the expectations. I have just one small question. The sort related parameters are...
4
by: kj | last post by:
I'm downloading some very large tables from a remote site. I want to sort these tables in a particular way before saving them to disk. In the past I found that the most efficient way to do this...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
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,...
0
tracyyun
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...
0
agi2029
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,...
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.