{"id":17718567,"url":"https://github.com/linuxscout/awk-arabic","last_synced_at":"2026-03-19T01:51:59.636Z","repository":{"id":181513033,"uuid":"666886264","full_name":"linuxscout/awk-arabic","owner":"linuxscout","description":"Arabic Texts task by AWK","archived":false,"fork":false,"pushed_at":"2023-07-16T08:46:58.000Z","size":6,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-27T00:36:54.910Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linuxscout.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-15T23:14:19.000Z","updated_at":"2023-08-17T16:51:41.000Z","dependencies_parsed_at":"2023-07-16T00:22:35.345Z","dependency_job_id":null,"html_url":"https://github.com/linuxscout/awk-arabic","commit_stats":null,"previous_names":["linuxscout/awk-arabic"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/linuxscout/awk-arabic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxscout%2Fawk-arabic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxscout%2Fawk-arabic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxscout%2Fawk-arabic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxscout%2Fawk-arabic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linuxscout","download_url":"https://codeload.github.com/linuxscout/awk-arabic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxscout%2Fawk-arabic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29154309,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T07:18:23.844Z","status":"ssl_error","status_checked_at":"2026-02-06T07:13:32.659Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-10-25T14:54:53.930Z","updated_at":"2026-02-06T07:32:52.172Z","avatar_url":"https://github.com/linuxscout.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# awk-arabic\nArabic Texts task by AWK\n\nهذه الصفحة لكتابة بعض الملاحظات والإرشادات عن استعمال لغة برمجة AWK في مهام اللغة العربية\n## أفكار لاستعمالات أوك\n\n* حذف الحركات\n* تغيير الفاصل في ملف csv\n* تقسيم النص إلى كلمات\n* حساب تكرار الكلمات\n* حذف الكلمات المستبعدة\n\n\n\n### حذف الحركات\nأوك لا يدعم اليونيكود لذا علينا تحويل الحركات إلى utf8\n\nسكريبت حذف الحركات بواسطة أوك:\n```awk\necho \"أُحِبُّ وَطَنِي\" | awk '{ gsub(/\\xd9\\x8b|\\xd9\\x8c|\\xd9\\x8d|\\xd9\\x8e|\\xd9\\x8f|\\xd9\\x90|\\xd9\\x91|\\xd9\\x92|\\xd9\\xb0/, \"\"); print }'\n```\nللحصول على سلسلة الحركات بشكل بايتات استعنّا بسكريبت بيثون\n```python\nrepru = []\nfor c in u\"\\u064b\\u064c\\u064d\\u064e\\u064f\\u0650\\u0651\\u0652\\u0670\":\n\tcode_point = ord(c)  # Unicode code point\n\tutf8_bytes = chr(code_point).encode('utf-8')\n\tutf8_representation = ''.join([f'\\\\x{byte:02x}' for byte in utf8_bytes])\n\trepru.append(utf8_representation)\nprint('|'.join(repru))\n```\nالناتج يكون:\n```\n\\xd9\\x8b|\\xd9\\x8c|\\xd9\\x8d|\\xd9\\x8e|\\xd9\\x8f|\\xd9\\x90|\\xd9\\x91|\\xd9\\x92|\\xd9\\xb0\n```\n\n\n\n### حذف التطويل\n\nرمز التطويل في يونيكود هو u0640\n```awk\necho \"1 **:-أحـــب:.*,5;\" | awk '{ gsub(/\\xd9\\x80/, \"\"); print }'\n```\n\n### convert multiline record  to csv\n\nFS = field separator\nRS = record separator\nOFS = output field separator\n```awk\nBEGIN { FS=\"\\n\"; RS=\"\"; OFS=\"\\t\"}\n\n{print $1,$2,$9}\nEND {}\n```\n\n## مراجع\n30 Examples for Awk Command in Text Processing\nhttps://likegeeks.com/awk-command/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxscout%2Fawk-arabic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinuxscout%2Fawk-arabic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxscout%2Fawk-arabic/lists"}