[Tutor] language aid

Carnell, James E jecarnell at saintfrancis.com
Thu Feb 4 19:09:18 CET 2010



> Hi,
> ?
> A dictionary (associative array of keys and values) seems a good 
> datatype to use. vocab = {} vocab[frenchword]?= englishword
> ?
.......
> Cheers!!
> Albert-Jan

Sure, a dict is the obvious choice. For saving into file, if the app is
to be used internally, you can even print it in the form of a python
dict (with the '{}', ':' & ',') so that reading the dict data is just
importing:
    import french_english

Denis

I 3rd the dictionary choice. They (for me at least) aren't as clean on
the computer screen as arrays, but once you get good at it you can even
have multiple definitions and weights for how relevant that word is. You
(in the future when you get comfortable with dictionaries) can take it
into networkx or something and draw pictures of it, and really start
messing around with it (using subnetworks to try and get context
information). Google has some tech talks on  youtube concerning Language
Processing using networks etc if that kind of thing interests you.

Sincerely,

Bad answer man


More information about the Tutor mailing list