Python Forum
Grouping lots of words in lots of txt files: programmer needed
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Grouping lots of words in lots of txt files: programmer needed
#1
I wasn't too sure where to put this, so I went for off-topic. Sorry if that's not the spot.

As you might be able to tell from the title...I'm not really a programmer. But I do need some programming to be done. I think that this is a task that should take less than a hour for pretty much any person who knows python programming well (maybe I'm wrong though), so instead of investing hours and hours in learning a programming language, I thought I might just, you know, knock at the door.

What I want to do is fairly simple, but the motivations might seem random, esoteric, or...anything. 
I don't want to talk about it as that would involve explaining things for ages and could start a heated discussion that might turn to crap, so please...
I just need some bit of code, or rather, a product coming from said code, and that's it... So please, if anyone would be so kind as to do this task...I, well, I'd be really happy.

To get to the point...
I have a text file (the kind that you open with notepad) of over a hundred thousand English and not-so English words. For each line there is only one word.
The word list should be available there. Be careful, Dropbox might lag a little (or maybe my computer's hard disk drive is a bit slow):

https://www.dropbox.com/s/8s2dt08f6wp7us...s.txt?dl=0

(Please report to me if this link does not work)

For the code, each letter from A to Z must have a numerical value associated to it, like this: 
A = 1, B = 2, C = 3, D = 4, E = 5, F = 6, G = 7, H = 8, I = 9, J = 10, K = 11, L = 12, M = 13,
N = 14, O = 15, P = 16, Q = 17, R = 18, S = 19, T = 20, U = 21, V = 22, W = 23, X = 24, Y = 25, Z = 26
Any character that isn't a letter must have a value of zero, EVEN the numbers from 0 to 9, if there are any.


So, what the code needs to do is:
1.Read one line of the text file at a time (starting with the first one)

2.Calculate the combined value of the letters in that line (example: if the word on that line is "cake", do C+A+K+E, aka 3+1+11+5, which gives 20)

3.In a folder called "WordListsFolder" (or whatever you wanna call it really, as long as it's not offensive):
-create a text file called after the value of the word in question (in the above example, call the file "20", and write the calculated word on the first line;
-if a text file with the same name (as the value of the word) already exists, use that text file instead of creating a new one;
-if there are already words in the text file that we want to write a word into, place the calculated word on an empty line directly under all the already taken lines.

4.Once a line has been read, the characters on that line summed, and the word(s) of the line added to a correspondingly named text file, 
repeat steps 1, 2, and 3 with the next line in the file. 
Do this until there are no more lines left to calculate.

Words that are added to the text files must be written in UPPER CASE letters, since I might add notes in lower case letters to the text files later on. 
This distinction of upper case and lower case letters will help me to distinguish the data from the notes despite the limited capabilities of a txt file. 
I want to use txt files mainly because they are lightweight and are quick to open, and it's easy to compare two or more txt files next to one another.

While I want the words to be classed alphabetically, you won't need to do code for that, as the words in the file I provided are already classed alphabetically, which means that if its lines are read from top to bottom, the words should be automatically classed alphabetically in each individually produced text files, without any code involved to ensure that. That is, if my logic is right.





Once the program has done its job and produced all that was required, please give me access to the folder containing the text files, be it by Dropbox or anything else that works. I couldn't thank enough whoever does complete my request.

Make sure that your code has worked properly though, by taking a sample of words in some of the produced files, to see if it they correspond to the name of those files.

The hierarchy of the "WordListsFolder" folder should resemble this:
WordListsFolder >
1.txt
2.txt
3.txt
4.txt
...
Idontknowwhatnumber.txt

and the content of the text files should look like this (taking, for example, the text file called 20):
AS
CAGED
CAKE
CAP
DIG
FEED
JADE
(etc. (this is just an example, I don't know which words would show up first in that text file))

By the way, I'll be using the Courier New font when working with the files, for a few reasons. So if you want to see how I would see the files, you should use that font in Notepad.




Now I can't think of anything else to say...oh yes, to get you started, the infos in this page might be helpful:
http://stackoverflow.com/questions/31224...and-values

Heck, maybe I should have just used that.. But why, oh why, would I force myself into learning coding when I just need one task done, and tens of thousands can do that task blindfolded. I don't see any foreseeable future involving me being a programmer in anything, too. I do enjoy logic problems but I still don't feel that coding is my vocation...So I hope you understand my lack of motivation.

Sorry for posting on a programming forum while simultaneously not wanting to program...I know, it feels bad and inappropriate. But I can't think of anything else to do right now.





If anything is not clear about the task, I'll gladly reformulate what lacks clarity.

As for sharing the code or making a small program out of it that could be used by anyone...Well, that's out of the scope of the present request, but if you feel like doing it it certainly would be appreciated. It's not required though. All I need now is what the code creates.

Thanks in advance.
Reply
#2
I have moved your thread here to the "Jobs" category, which given your description is a more appropriate location.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#3
(Mar-07-2017, 02:21 AM)sparkz_alot Wrote: I have moved your thread here to the "Jobs" category, which given your description is a more appropriate location.

Alright, thanks. For some reason I thought the category was about jobs people were paid to do, so I wasn't too sure.
Reply
#4
And what, pray tell, is the remuneration provided in exchange for producing the listings as specified?

Edit: Never mind, it appears my question is answered.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#5
(Mar-07-2017, 02:31 AM)ichabod801 Wrote: And what, pray tell, is the remuneration provided in exchange for producing the listings as specified?

Edit: Never mind, it appears my question is answered.

Yup, that's exactly why I avoided to put the thread there :P

But well, if it has to come to that I can pay you something, I guess...I'm not sure how the pay should be calculated though, nor how to pay someone online for that matter, so if you have any preferred way of being paid online we can opt for that.

If I'd go by guts I'd say 50$, if that makes any sense. (assuming that the task takes roughly one hour to do, or less than that)
Reply
#6
Everything programming takes one hour.
(if you're not a programmer)

nltk?

Last I checked, I got $200 per hour.

If you really want to get it done for free, I'd post it on a college bulletin board,
just possibly someone would rather do this that have a beer.
Reply
#7
(Mar-07-2017, 04:05 AM)Larz60+ Wrote: Everything programming takes one hour.
(if you're not a programmer)

nltk?


Basically you're saying I should really learn coding...right?
Reply
#8
Not a bad way to go, to do what you want to do won't take very long (about an hour)
Reply
#9
Here it is: https://mega.nz/#!1FtSTYCT!jzsHlj8zUfPB_...c8GjVomXBE

The archive is .tar.gz. The end line character is '\r\n' as in your word list file.

This is a simple task. You definitely should consider to learning Python. The basics at least.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#10
(Mar-07-2017, 11:11 AM)wavic Wrote: Here it is: https://mega.nz/#!1FtSTYCT!jzsHlj8zUfPB_...c8GjVomXBE

The archive is .tar.gz. The end line character is '\r\n' as in your word list file.

This is a simple task. You definitely should consider to learning Python. The basics at least.

Thanks a million times wavic! I'll hold on to this and make backups just in case.

If I'm ever to learn a programming language it will certainly be python...I just need to find the time and energy for it. One day, hopefully, so I don't have to make requests for things as trivial as this ;)


Godspeed!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Programmer looking for work Johndg20 1 2,244 Sep-12-2021, 01:21 PM
Last Post: Larz60+
  programmer for my project siliconvalleymusicbrokerscom 1 2,937 Feb-01-2018, 07:51 AM
Last Post: PythonMagic003
  Python programmer needed to integrate GUI in Linux/LinuxCNC blazini36 1 4,232 Aug-18-2017, 03:32 PM
Last Post: victor_cis
  Need hired help from python programmer oj43085 6 6,249 May-10-2017, 06:06 PM
Last Post: nilamo
  Summer programmer needed to teach camp Tampa, Florida MOSI MOSI 0 3,060 Apr-18-2017, 04:55 PM
Last Post: MOSI

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020