{ "info": { "author": "beapen", "author_email": "github@gulfdoctor.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Scientific/Engineering :: Information Analysis" ], "description": "# QRMine \n*/\u02c8k\u00e4rm\u012bn/*\n\n\nQRMine is a suite of qualitative research (QR) data mining tools in Python using Natural Language Processing (NLP) and Machine Learning (ML). QRMine is work in progress. [Read More..](https://nuchange.ca/2017/09/grounded-theory-qualitative-research-python.html)\n\n## What it does\n\n### NLP\n* [x] Lists common categories for open coding.\n* [x] Create a coding dictionary with categories, properties and dimensions.\n* [x] Topic modelling.\n* [x] Arrange docs according to topics.\n* [x] Compare two documents/interviews.\n* [x] Select documents/interviews by sentiment, category or title for further analysis.\n* [x] Sentiment analysis\n* [ ] Network analysis\n* [ ] Co-citation finder\n\n### ML\n* [x] Accuracy of a neural network model trained using the data\n* [x] Confusion matrix from an support vector machine classifier\n* [x] K nearest neighbours of a given record\n* [x] K-Means clustering\n* [x] Principal Component Analysis (PCA)\n* [ ] Association rules\n\n## How to install\n\n```text\n\n\npip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.1.0/en_core_web_sm-2.1.0.tar.gz#egg=en_core_web_sm\n\npip install qrmine\n\n\n```\n\n## How to Use\n\n* input files are transcripts as txt files and a single csv file with numeric data. The output txt file can be specified.\n\n* The coding dictionary, topics and topic assignments can be created from the entire corpus (all documents) using the respective command line options.\n\n* Categories (concepts), summary and sentiment can be viewed for entire corpus or specific titles (documents) specified using the --titles switch. Sentence level sentiment output is possible with the --sentence flag.\n\n* You can filter documents based on sentiment, titles or categories and do further analysis, using --filters or -f\n\n* Many of the ML functions like neural network takes a second argument (-n) . In nnet -n signifies the number of epochs, number of clusters in kmeans, number of factors in pca, and number of neighbours in KNN. KNN also takes the --rec or -r argument to specify the record.\n\n* Variables from csv can be selected using --titles (defaults to all). The first variable will be ignored (index) and the last will be the DV (dependant variable). \n\n\n### Command-line options\n\n```text\npythom -m qrmine --help\n\n```\n\n| Command | Alternate | Description |\n| --- | --- | --- |\n| --inp | -i | Input file in the text format with Topic |\n| --out | -o | Output file name |\n| --csv | | csv file name |\n| --num | -n | N (clusters/epochs etc depending on context) |\n| --rec | -r | Record (based on context) |\n| --titles | -t | Document(s) title(s) to analyze/compare |\n| --codedict | | Generate coding dictionary |\n| --topics | | Generate topic model |\n| --assign | | Assign documents to topics |\n| --cat | | List categories of entire corpus or individual docs |\n| --summary | | Generate summary for entire corpus or individual docs |\n| --sentiment | | Generate sentiment score for entire corpus or individual docs |\n| --nlp | | Generate all NLP reports |\n| --sentence | | Generate sentence level scores when applicable |\n| --nnet | | Display accuracy of a neural network model -n epochs(3)|\n| --svm | | Display confusion matrix from an svm classifier |\n| --knn | | Display nearest neighbours -n neighbours (3)|\n| --kmeans | | Display KMeans clusters -n clusters (3)|\n| --cart | | Display Association Rules |\n| --pca | | Display PCA -n factors (3)|\n\n\n## Use it in your code\n```python\nfrom qrmine import Content\nfrom qrmine import Network\nfrom qrmine import Qrmine\nfrom qrmine import ReadData\nfrom qrmine import Sentiment\nfrom qrmine import MLQRMine\n\n```\n* *More instructions and a jupyter notebook available [here.](https://nuchange.ca/2017/09/grounded-theory-qualitative-research-python.html)*\n\n## Input file format\n\n### NLP\nIndividual documents or interview transcripts in a single text file separated by Topic. Example below\n\n```\nTranscript of the first interview with John.\nAny number of lines\nFirst_Interview_John\n\nText of the second interview with Jane.\nMore text.\nSecond_Interview_Jane\n\n....\n```\n\nMultiple files are suported, each having only one break tag at the bottom with the topic.\n(The tag may be renamed in the future)\n\n### ML\n\nA single csv file with the following generic structure.\n\n* Column 1 with identifier. If it is related to a text document as above, include the title.\n* Last column has the dependent variable (DV). (NLP algorithms like the topic asignments may provide the DV)\n* All independent variables (numerical) in between.\n\n```\nindex, obesity, bmi, exercise, income, bp, fbs, has_diabetes\n1, 0, 29, 1, 12, 120, 89, 1\n2, 1, 32, 0, 9, 140, 92, 0\n......\n\n```\n\n## Author\n\n* [Bell Eapen](https://nuchange.ca) (McMaster U) | [Contact](https://nuchange.ca/contact)\n* This software is developed and tested using [Compute Canada](http://www.computecanada.ca) resources.\n* See also: [:fire: The FHIRForm framework for managing healthcare eForms](https://github.com/E-Health/fhirform)\n* See also: [:eyes: Drishti | An mHealth sense-plan-act framework!](https://github.com/E-Health/drishti)\n\n## Citation\n\nPlease cite QRMine in your publications if it helped your research. Here\nis an example BibTeX entry:\n\n```\n\n@misc{eapenbr2019qrmine,\n title={QRMine -Qualitative Research Tools in Python.},\n author={Eapen, Bell Raj and contributors},\n year={2019},\n publisher={GitHub},\n journal = {GitHub repository},\n howpublished={\\url{https://github.com/dermatologist/qrmine}}\n}\n\n```\n\nPublication with the theoretical foundations of this tool is being worked on. QRMine is inspired by [this work](https://github.com/lknelson/computational-grounded-theory) and the associated [paper](https://journals.sagepub.com/doi/abs/10.1177/0049124117729703).\n\n\n## Demo\n\n[![QRMine](https://github.com/dermatologist/nlp-qrmine/blob/develop/notes/qrmine.gif)](https://github.com/dermatologist/nlp-qrmine/blob/develop/notes/qrmine.gif)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dermatologist/nlp-qrmine", "keywords": "", "license": "gpl3", "maintainer": "", "maintainer_email": "", "name": "qrmine", "package_url": "https://pypi.org/project/qrmine/", "platform": "any", "project_url": "https://pypi.org/project/qrmine/", "project_urls": { "Homepage": "https://github.com/dermatologist/nlp-qrmine" }, "release_url": "https://pypi.org/project/qrmine/2.1.2/", "requires_dist": [ "numpy", "pandas", "matplotlib", "imbalanced-learn", "xgboost", "mlxtend", "Keras", "keras-text", "click", "vaderSentiment", "spacy", "textacy" ], "requires_python": "", "summary": "Qualitative Research support tools in Python!", "version": "2.1.2" }, "last_serial": 5574578, "releases": { "2.0.0": [ { "comment_text": "", "digests": { "md5": "117ac725e222c94ce7ace1c587eb8077", "sha256": "80bbda73abd2b6bfdb0cb1921f99a0fcff9ce54778958ac553f72d26fcbda71b" }, "downloads": -1, "filename": "qrmine-2.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "117ac725e222c94ce7ace1c587eb8077", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 27466, "upload_time": "2019-07-14T15:32:42", "url": "https://files.pythonhosted.org/packages/29/d4/2c9a8b16bc9ac4658e9b46c0ae236de8974faddd4583797d39fa74d26cf7/qrmine-2.0.0-py2.py3-none-any.whl" } ], "2.1.2": [ { "comment_text": "", "digests": { "md5": "202d7018a9cb1b4323275fd01d36b4be", "sha256": "afc7c29503f851a34be0e6760e457aa8df8823e033a0cc5bb57d306692f01abe" }, "downloads": -1, "filename": "qrmine-2.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "202d7018a9cb1b4323275fd01d36b4be", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15740, "upload_time": "2019-07-23T21:35:47", "url": "https://files.pythonhosted.org/packages/12/c8/263d34b86295cfd066fe64729c206b4f08bdf28ade904c5a4877c4bedfcc/qrmine-2.1.2-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "202d7018a9cb1b4323275fd01d36b4be", "sha256": "afc7c29503f851a34be0e6760e457aa8df8823e033a0cc5bb57d306692f01abe" }, "downloads": -1, "filename": "qrmine-2.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "202d7018a9cb1b4323275fd01d36b4be", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15740, "upload_time": "2019-07-23T21:35:47", "url": "https://files.pythonhosted.org/packages/12/c8/263d34b86295cfd066fe64729c206b4f08bdf28ade904c5a4877c4bedfcc/qrmine-2.1.2-py2.py3-none-any.whl" } ] }