ErwinKomen / RU-cesar

1 stars 0 forks source link

Tablet: add different lists #182

Closed ErwinKomen closed 1 year ago

ErwinKomen commented 2 years ago

Make it possible to add more lists of words with their concreteness scores. E.g: Baldey, Ernestus & Cutler 2015, T-scan info etc

If a word occurs in different lists with different scores, then make it possible for the researcher to see those different scores

ErwinKomen commented 1 year ago

Note: see the Excel called TABLET_rightscores.xlsx

ErwinKomen commented 1 year ago

Implementation

  1. Added new model doc.Wordlist that provides the name and container for a wordlist
  2. Added new model doc.Worddef that links to a wordlist, and defines one particular word (stimulus) for a wordlist, optionally with a POS-tag
  3. Add views for Wordlist:
    1. listview - added
    2. edit view - added
    3. details view - added
  4. Additions to wordlist details view
    1. Allow uploading a list (Excel)
    2. Show the contents of this list
    3. Allow clearing a list
ErwinKomen commented 1 year ago

Implementation

ErwinKomen commented 1 year ago

Allow uploading a list (Excel)

  1. Added field upload to model Wordlist.
    1. This field is of type FileField, and a separate upload_to function has been specified, namely wordlist_path().
    2. That function must make sure any new upload overwrites the old one and the upload is saved in the folder media/wordlist.
  2. Make the Edit view such, that the upload file is correctly remembered
  3. Add a field worksheet that contains the name of the worksheet within the Excel, where the appropriate wordlist is kept
  4. Add a view WordklistUpload to initiate the Excel uploading
  5. Adapt the code in model Wordlist, method read_upload() to correctly download a list

Show the contents of this list

  1. Add a Worddef list, edit and details view
  2. Extend WordlistDetails to show the list of word definitions (Worddef items)

Allow clearing a list

  1. That's done by deleting the Wordlist - no special op needed

Include all uploaded lists in processing

That is to say: make use of them at the correct place in do_concreteness() Done: added them in do_concreteness(). See issue #179 for priority details.

Testing

  1. Tested uploading and showing a list - that works
  2. Test making use of the uploaded list(s) - works
    1. Do note: proper names are SPEC within Frog, but so are quite a few other things. So setting the rules to include SPEC is not really a good thing
ErwinKomen commented 1 year ago

Instructions

The list to be uploaded in an Excel must contain three headers in this order (the names of the headers are not important, but the order of the columns is):

  1. Word
  2. Score
  3. POS tag