{"id":15581844,"url":"https://github.com/ozlerhakan/cyber","last_synced_at":"2025-11-08T05:30:34.382Z","repository":{"id":148099685,"uuid":"151620813","full_name":"ozlerhakan/cyber","owner":"ozlerhakan","description":null,"archived":false,"fork":false,"pushed_at":"2018-10-05T20:46:28.000Z","size":1104,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-28T01:32:59.944Z","etag":null,"topics":["desiciontree","machine-learning","ml","random-forest","sckiit-learn","svc"],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ozlerhakan.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":null,"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-10-04T18:51:37.000Z","updated_at":"2024-02-10T09:20:48.000Z","dependencies_parsed_at":"2023-05-19T04:00:30.598Z","dependency_job_id":null,"html_url":"https://github.com/ozlerhakan/cyber","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/ozlerhakan%2Fcyber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozlerhakan%2Fcyber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozlerhakan%2Fcyber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozlerhakan%2Fcyber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozlerhakan","download_url":"https://codeload.github.com/ozlerhakan/cyber/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239549823,"owners_count":19657536,"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":["desiciontree","machine-learning","ml","random-forest","sckiit-learn","svc"],"created_at":"2024-10-02T19:56:40.675Z","updated_at":"2025-11-08T05:30:34.317Z","avatar_url":"https://github.com/ozlerhakan.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"== Model Turkish Cyber Bullying\n\nKaggle platformu üzerinde bulunan https://www.kaggle.com/abozyigit/turkish-cyberbullying[Türkçe siberzorbalık] veri kümesini kullanarak bir model tespitinde bulunulmuştur. Bu modeli ve ilgili parametreleriyle birlikte kaydedildi. Kaydedilen dosya `cyber.py` dosyasındaki ufak web servis içerisinde kullanarak `cURL` üzerinden yapılacak talebin hakaret olup olmadığının bilgisini döndürecektir.\n\nModelin tespitinde atılan adımların hepsini `verius-cyber-bullying` Jupyter Notebook üzerinden inceleyebilirsiniz.\n\n=== Version 1 (Master Branch)\n\nSeçilen model ve parametreleri:\n\n[python]\n----\nfinal_pipeline = Pipeline([\n        ('tfidfvectorizer', TfidfVectorizer(min_df=1, ngram_range=(1,1), stop_words=stops)),\n        ('linearsvc', LinearSVC(max_iter=2000, C=1))\n])\n----\n\n=== Version 2 (version2 Branch)\n\nSeçilen model ve parametreleri:\n\n[python]\n----\nfinal_pipeline = Pipeline([\n        ('countvectorizer', CountVectorizer(min_df=1, ngram_range=(1,2), stop_words=stops)),\n        ('linearsvc', LinearSVC(max_iter=1000, C=1))\n])\n----\n\n=== Docker\n\n----\n$ cd cyber/\n$ docker build -t cyber:1.0 .\n$ docker run -d --name cyber -p 5000:5000 cyber:1.0\n\n# version 2 için\n$ cd cyber/\n$ git checkout version2\n$ docker build -t cyber:2.0 .\n$ docker run -d --name cyber -p 5000:5000 cyber:2.0\n----\n\nVersion 1 için\n\n----\n$ docker run -d --name cyber -p 5000:5000 ozlerhakan/cyber:1.0\n----\n\nVersion 2 için\n\n----\n$ docker run -d --name cyber -p 5000:5000 ozlerhakan/cyber:2.0\n----\n\n=== cURL\n\n----\n$ curl -u hakan:admin -H \"Content-Type: application/json\" -X POST -d '{\"text\": \"anlamıyorum\"}' localhost:5000/submit\nAuthentication Denied!\n\n$ curl -H \"Content-Type: application/json\" -X POST -d '{\"text\": \"anlamıyorum\"}' localhost:5000/submit\nPlease use authorization service to submit.\n\n$ curl -u admin:admin -H \"Content-Type: application/json\" -X POST -d '{\"text\": \"anlamıyorum\"}' localhost:5000/submit\n{\"result\":\"Non-abusive\"}\n\n$ curl -u admin:admin -H \"Content-Type: application/json\" -X POST -d '{\"text\": \"mal mısın\"}' localhost:5000/submit\n{\"result\":\"Abusive\"}\n----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozlerhakan%2Fcyber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozlerhakan%2Fcyber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozlerhakan%2Fcyber/lists"}