Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check dictionaries and add to OpenNotebook #19

Open
petermr opened this issue Mar 19, 2020 · 2 comments
Open

check dictionaries and add to OpenNotebook #19

petermr opened this issue Mar 19, 2020 · 2 comments
Assignees

Comments

@petermr
Copy link
Owner

petermr commented Mar 19, 2020

Have added dictionaries automatically from ami3

input from
https://en.wikipedia.org/w/index.php?title=Template:Viral_systemic_diseases
and
https://en.wikipedia.org/w/index.php?title=Template:Viral_systemic_diseases&action=edit

in AMIDictionaryTest:

	@Test
	public void testCreateFromMediawikiTemplateFile() {
		String fileTop = "/Users/pm286/projects/openVirus";
		String dict = "viral_systemic_disease";
		String fileroot = fileTop + "/" + "dictionaries"+ "/" + dict;
		System.err.println("FILEROOT "+fileroot);
		String type = "mwk";
		File dictionaryDir = new File(new File(fileroot), type);
		String inputFilename = fileroot + "." + type;
		String args =
				"create " +
			   " --input " + inputFilename +
			   " --informat mediawikitemplate " +
	           " --dictionary " + dict +
	           " --directory " + dictionaryDir +
	           " --outformats html,xml " +
	           " --wikilinks wikidata"
				;
			new AMIDictionaryTool().runCommands(args);
	}

NOTE to PMR - write this as a commandline example

results in openVirus/

dictionaries/
├── sars_covid_2.html. // IGNORE
├── sars_covid_2.xml // IGNORE
├── target // IGNORE
│   └── dictionary
│       └── htmlElement.html

├── viral_systemic_disease
│   ├── html
│   │   ├── viral_systemic_disease.html
│   │   └── viral_systemic_disease.xml
│   └── mwk
│       ├── viral_systemic_disease.html
│       └── viral_systemic_disease.xml
├── viral_systemic_disease.html // INPUT html from Wikipedia
└── viral_systemic_disease.mwk // INPUT mediawiki from Wikipedia

only viral_systemic_disease/ is relevant

@petermr
Copy link
Owner Author

petermr commented Mar 19, 2020

4 more dictionaries added but NOT checked

├── antiretroviral_drug
│   └── mwk
│       ├── antiretroviral_drug.html
│       └── antiretroviral_drug.xml
├── baltimore_(virus_classification)
│   └── mwk
│       ├── baltimore_(virus_classification).html
│       └── baltimore_(virus_classification).xml
├── sars_covid_2.html
├── sars_covid_2.xml
├── viral_systemic_disease
│   ├── html
│   │   ├── viral_systemic_disease.html
│   │   └── viral_systemic_disease.xml
│   └── mwk
│       ├── viral_systemic_disease.html
│       └── viral_systemic_disease.xml
├── viral_systemic_diseases
│   └── mwk
│       ├── viral_systemic_diseases.html
│       └── viral_systemic_diseases.xml
└── virus_topics
    └── mwk
        ├── virus_topics.html
        └── virus_topics.xml

@ambarishK
Copy link

Sir
Any contribution required into dictionary making? I may be ready for role into TDM as well as apart from it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants