petermr / tigr2ess

Materials for TIGR2ESS workshop in Delhi Feb 2019 - joint UK(Cambridge) - India project on Food Security.
Other
4 stars 10 forks source link

`ami-dictionaries` directory option not working as expected #12

Open ay-amityadav opened 5 years ago

ay-amityadav commented 5 years ago

Operating system: Ubuntu 16.04

To create dictionary from wikipedia page of millet, as described at https://github.com/ContentMine/dictionaries/blob/master/MAKING.md, the following command is issued.

ami-dictionaries create\
 --hreftext \
 --input https://en.wikipedia.org/wiki/Millet\
 --informat wikipage\
 --dictionary millets_wikipage \
 --outformats xml,json,html
 --directory /home/amit/Desktop/Workshop/Github/tigr2ess/millets/dictionary

I was hoping to get the dictionary files at the path specified by --directory option above. Instead, the concerned dictionary files were created as per the below directory structure under /home/amit/ .

~
├── ContentMine
│   ├── dictionary
│       └── dictionaries
|            └── millets_wikipage.html
|            └── millets_wikipage.json
|            └── millets_wikipage.xml

And the following (apparently not required for the concerned purpose) directory structure was created in the current working directory.

.
├── target
│   ├── dictionary
│       └── htmlElement.html

The above behaviour was also observed for all the four different dictionary creation examples present in https://github.com/ContentMine/dictionaries/blob/master/MAKING.md.

petermr commented 5 years ago

Thanks you. I have modified the code and believe that the new release (today) will solve this.Let's keep the issue open untill it has been verified

On Fri, Feb 8, 2019 at 4:54 PM amit yadav notifications@github.com wrote:

Assigned #12 https://github.com/petermr/tigr2ess/issues/12 to @petermr https://github.com/petermr.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/petermr/tigr2ess/issues/12#event-2127599639, or mute the thread https://github.com/notifications/unsubscribe-auth/AAsxSwaJAO0TDD2rFu6FzFI1FxBfsk5eks5vLau2gaJpZM4awkDu .

-- Peter Murray-Rust Founder ContentMine.org and Reader Emeritus in Molecular Informatics Dept. Of Chemistry, University of Cambridge, CB2 1EW, UK

petermr commented 5 years ago

Please retest and verify correction.

ay-amityadav commented 5 years ago

This is tested on the latest release i.e ami20190216b The above issue is partially resolved. The dictionary files are correctly created in the specified directory option, but the two not so required directories are still created:

I am attaching a test script for the same. I hope it helps. Please change the file extension to .sh, Github didn't allow me to upload file with that extension. test_issue_12.txt

petermr commented 5 years ago

Thanks!

On Sun, Feb 17, 2019 at 1:31 PM amit yadav notifications@github.com wrote:

This is tested on the latest release i.e ami20190216b The above issue is partially resolved. The dictionary files are correctly created in the specified directory option, but the two not so required directories are still created:

  • Contentmine under the home directory

Will think about this.

  • target in the current working directory (this is not created for dictionary creation from terms)

Yes - I think this is a feature that should be removed.

I am attaching a test script for the same. I hope it helps. Please change the file extension to .sh,

Don't understand this. I can commit *.sh files. What's the error message?

Github didn't allow me to upload file with that extension. test_issue_12.txt https://github.com/petermr/tigr2ess/files/2872980/test_issue_12.txt

I'll look at this and commit it myself

You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/petermr/tigr2ess/issues/12#issuecomment-464457542, or mute the thread https://github.com/notifications/unsubscribe-auth/AAsxS2BI9xEpVgyS99xeDK2sQn9ACnJAks5vOVnEgaJpZM4awkDu .

-- Peter Murray-Rust Founder ContentMine.org and Reader Emeritus in Molecular Informatics Dept. Of Chemistry, University of Cambridge, CB2 1EW, UK

petermr commented 5 years ago

I have added this and edited:

PLEASE TEST IT.

On Sun, Feb 17, 2019 at 7:55 PM Peter Murray-Rust < peter.murray.rust@googlemail.com> wrote:

Thanks!

On Sun, Feb 17, 2019 at 1:31 PM amit yadav notifications@github.com wrote:

This is tested on the latest release i.e ami20190216b The above issue is partially resolved. The dictionary files are correctly created in the specified directory option, but the two not so required directories are still created:

  • Contentmine under the home directory

Will think about this.

  • target in the current working directory (this is not created for dictionary creation from terms)

Yes - I think this is a feature that should be removed.

I am attaching a test script for the same. I hope it helps. Please change the file extension to .sh,

Don't understand this. I can commit *.sh files. What's the error message?

Github didn't allow me to upload file with that extension. test_issue_12.txt https://github.com/petermr/tigr2ess/files/2872980/test_issue_12.txt

I'll look at this and commit it myself

You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/petermr/tigr2ess/issues/12#issuecomment-464457542, or mute the thread https://github.com/notifications/unsubscribe-auth/AAsxS2BI9xEpVgyS99xeDK2sQn9ACnJAks5vOVnEgaJpZM4awkDu .

-- Peter Murray-Rust Founder ContentMine.org and Reader Emeritus in Molecular Informatics Dept. Of Chemistry, University of Cambridge, CB2 1EW, UK

-- Peter Murray-Rust Founder ContentMine.org and Reader Emeritus in Molecular Informatics Dept. Of Chemistry, University of Cambridge, CB2 1EW, UK

ay-amityadav commented 5 years ago

I tested the script amit_test.sh on the latest release i.e ami20190217. I have made minor changes to it, and now it's working properly.