{"id":15899590,"url":"https://github.com/stefan-it/deep-wittgenstein","last_synced_at":"2025-08-14T10:33:55.088Z","repository":{"id":110973723,"uuid":"123495217","full_name":"stefan-it/deep-wittgenstein","owner":"stefan-it","description":"Classification of Wittgenstein's remarks","archived":false,"fork":false,"pushed_at":"2018-03-05T14:35:50.000Z","size":6675,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-28T07:56:05.510Z","etag":null,"topics":["deep-learning","multi-label-classification","wittgenstein"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefan-it.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-01T21:36:34.000Z","updated_at":"2024-07-13T00:33:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"77b5a4ca-c8f4-4739-8ce3-69d1d2ad1977","html_url":"https://github.com/stefan-it/deep-wittgenstein","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-it%2Fdeep-wittgenstein","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-it%2Fdeep-wittgenstein/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-it%2Fdeep-wittgenstein/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-it%2Fdeep-wittgenstein/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefan-it","download_url":"https://codeload.github.com/stefan-it/deep-wittgenstein/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229821822,"owners_count":18129428,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","multi-label-classification","wittgenstein"],"created_at":"2024-10-06T10:21:55.754Z","updated_at":"2024-12-15T13:08:36.862Z","avatar_url":"https://github.com/stefan-it.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deep-Wittgenstein\n\nIn this repository we present a pretrained model for classifiying\nWittgenstein's remarks. The pretrained model can detect and classify 70\ndifferent categories for a remark: Jetzt, Regel, Sprache, Gedanke, Behauptung,\nMengenlehre, Gleich, Unendliche Möglichkeit, Begriff, Idealismus, Gegenstand,\nKardinalzahlen, Phänomenologie, Hypothese, Ursache, Ungefähr, Unendlichkeit,\nEntdeckung, Problem, Mathematik Metamathematik, Schmerzen, Sprache Sprachspiel,\nSatz, Klasse, Erwartung und Erfüllung, Gesichtsraum, XXX, Bedeutung, Grund,\nSinn, Philosophie, Versuchen Suchen, Vorstellung, Abbild, Fähigkeit, Zeit,\nLogik, Farben und Farbenmischung, Minima Visibilia, Grund des Denkens,\nW-F-Notation, Undeutlichkeit, Glaube, Wissen, Logische Form, Tabelle,\nAnwendung, Unmittelbares, Allgemeinheit, Grammatik, Zeichen, Schach, Folgen,\nBeweis, Mathematik, Induktion Induktionsbeweis, Wahrscheinlichkeit, Gebrauch,\nMeinen, Physikalischer Raum, Absicht, Im selben Sinn, Zahlen, Regel\nErfahrungssatz, Nicht, Verifikation, Verstehen, Tonfolge, Physikalische Sprache\nand Denken.\n\nThis work was done during summer semester 2017 with support by [Dr. Maximilian\nHadersbeck](http://cis.lmu.de/personen/mitarbeiter/hadersbeck/index.html) ([LMU\nMunich](https://www.en.uni-muenchen.de/index.html)). Hand-labeled data is\nprovided by [Dr. Josef G. F.\nRothhaupt](http://www.philosophie.uni-muenchen.de/lehreinheiten/philosophie_1/personen/josef_rothhaupt/index.html)\n([LMU Munich](https://www.en.uni-muenchen.de/index.html)).\n\nThis project was funded by\n[Lehre@LMU](https://www.uni-muenchen.de/studium/lehre_at_lmu/index.html) with a\nNVIDIA Jetson TX-1.\n\n## Example\n\nInput remark:\n\n```text\nDer Unterschied der Wortarten ist immer wie der Unterschied der Spielfiguren,\noder, wie der noch größere, einer Spielfigur und des Schachbrettes.\n```\n\nHand-labeled gold label: \"Grammatik\"\n\n# Requirements\n\nThe multi-label classification approach is implemented with *Keras*, *TensorFlow*\nand the *magpie* library. The following libraries must be installed:\n\n| Library      | Version (tested)\n| ------------ | ----------------\n| *magpie*     | 2.0\n| *Keras*      | 2.1.3\n| *TensorFlow* | 1.5.0\n| *h5py*       | 2.7.1\n\nNotice: *magpie* should be installed via:\n\n```bash\npip3 install --user git+https://github.com/inspirehep/magpie.git@v2.0\n```\n\n# Dataset\n\nHand-labeled data is available for the complete Ts-212. Thus, hand-labeled\ncategories for 7099 remarks are used. Then this corpus is split into training,\ndevelopment and test set.\n\n| Dataset     | # Remarks\n| ----------- | ---------\n| Training    | 5620\n| Development | 719\n| Test        | 760\n\n# Pretrained model\n\nThe pretrained model consists of four files:\n\n| Description | Download\n| ----------- | --------\n| Word Embeddings | [embedding.pkl](https://github.com/stefan-it/deep-wittgenstein/raw/master/current_model/embedding.pkl)\n| Model           | [model.h5](https://github.com/stefan-it/deep-wittgenstein/raw/master/current_model/model.h5)\n| Scaler          | [scaler.pkl](https://github.com/stefan-it/deep-wittgenstein/raw/master/current_model/scaler.pkl)\n| Category labels | [categories.labels](https://github.com/stefan-it/deep-wittgenstein/raw/master/categories.labels)\n\nWord embeddings, model and scaler are located in the `current_model` of this\nrepository. `categories.labels` is located in the root folder of this repository.\n\n# Classification - Example\n\nTo classify new remarks of Ludwig Wittgenstein, the following script can be used:\n\n```python\nfrom magpie import Magpie\n\nwith open('categories.labels') as f:\n    labels = [line.rstrip() for line in f.readlines()]\n\nmagpie = Magpie(\n    keras_model='current_model/model.h5',\n    word2vec_model='current_model/embedding.pkl',\n    scaler='current_model/scaler.pkl',\n    labels=labels\n)\n```\n\nThis loaded the pretrained model with all its dependencies like word embeddings\nor labels.\n\nThen the following command can be used to classifiy a remark:\n\n```python\npredicted = magpie.predict_from_text('“Ich denke, Du wirst die Scheibe irgendwo innerhalb dieses Kreises treffen”.')\nprint(predicted)\n```\n\nThis will output of 5 best predicted categories for the input remark:\n\n```python\n[('Allgemeinheit', 0.66499853), ('Folgen', 0.53158545),\n ('Regel', 0.004923807), ('Satz', 0.0018804041), ('Meinen', 0.0017680882)]\n```\n\nThe gold categories are \"Allgemeinheit\" and \"Folgen\".\n\nThis classification script is located under `classification.py`.\n\n# Acknowledgements\n\nWe would like to thank Dr. Maximilian Hadersbeck for his great support during\nthe development phase. We also want to thank Dr. Josef G. F. Rothhaupt for\nproviding us high-quality hand-labeled data for over 7000 remarks of Ludwig\nWittgenstein.\n\nWe are deeply grateful that Lehre@LMU funded our research project with a\nNVIDIA Jetson TX1 developer board and we would like thank LMU Munich for this\nawesome program. This really helps students and boosts research.\n\n# Contact (Bugs, Feedback, Contribution and more)\n\nFor questions about *deep-wittgenstein*, contact the current maintainer:\nStefan Schweter \u003cstefan@schweter.it\u003e.\n\n# License\n\nTo respect the Free Software Movement and the enormous work of Dr. Richard Stallman\nthis repository is released under the *GNU Affero General Public License*\nin version 3. More information can be found [here](https://www.gnu.org/licenses/licenses.html)\nand in `COPYING`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefan-it%2Fdeep-wittgenstein","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefan-it%2Fdeep-wittgenstein","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefan-it%2Fdeep-wittgenstein/lists"}