{"id":19014537,"url":"https://github.com/deeptiman/php-dom-parser-translation-tool","last_synced_at":"2025-10-04T20:12:00.996Z","repository":{"id":52665936,"uuid":"273155264","full_name":"Deeptiman/php-dom-parser-translation-tool","owner":"Deeptiman","description":"A Simple DOM Parser and Translation Tool using PHP, HTML, and MySQL. The translation model is supported for English to Odia language. There is a built in dictionary to support the translation.","archived":false,"fork":false,"pushed_at":"2021-04-21T19:31:36.000Z","size":4842,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-06T15:40:51.746Z","etag":null,"topics":["apache","corpus","corpus-tool","dom-parser","linguist","linguistic-analysis","linguistic-corpora","moses-machine-translation","mysql","odia-language","parallel-corpus","parser-generator","parser-library","php","phpmyadmin","statistical-machine-translation","tomcat-server","translation-service","translation-tool"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Deeptiman.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}},"created_at":"2020-06-18T06:05:02.000Z","updated_at":"2024-08-10T15:37:44.000Z","dependencies_parsed_at":"2022-08-21T14:40:17.840Z","dependency_job_id":null,"html_url":"https://github.com/Deeptiman/php-dom-parser-translation-tool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Deeptiman/php-dom-parser-translation-tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Deeptiman%2Fphp-dom-parser-translation-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Deeptiman%2Fphp-dom-parser-translation-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Deeptiman%2Fphp-dom-parser-translation-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Deeptiman%2Fphp-dom-parser-translation-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Deeptiman","download_url":"https://codeload.github.com/Deeptiman/php-dom-parser-translation-tool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Deeptiman%2Fphp-dom-parser-translation-tool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278366674,"owners_count":25975097,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["apache","corpus","corpus-tool","dom-parser","linguist","linguistic-analysis","linguistic-corpora","moses-machine-translation","mysql","odia-language","parallel-corpus","parser-generator","parser-library","php","phpmyadmin","statistical-machine-translation","tomcat-server","translation-service","translation-tool"],"created_at":"2024-11-08T19:29:55.151Z","updated_at":"2025-10-04T20:12:00.959Z","avatar_url":"https://github.com/Deeptiman.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 id=\"php-dom-parser-translation-tool\"\u003ephp-dom-parser-translation-tool\u003c/h1\u003e\n\u003cp\u003e\u003cimg src=\"https://img.shields.io/maintenance/no/2014\" alt=\"Maintenance\"\u003e     \u003cimg alt=\"GitHub last commit\" src=\"https://img.shields.io/github/last-commit/Deeptiman/php-dom-parser-translation-tool\"\u003e  \u003cimg alt=\"GitHub language count\" src=\"https://img.shields.io/github/languages/count/Deeptiman/php-dom-parser-translation-tool\"\u003e \u003cimg alt=\"GitHub top language\" src=\"https://img.shields.io/github/languages/top/Deeptiman/php-dom-parser-translation-tool\"\u003e\u003c/p\u003e\n\u003cp\u003eThis project was planned to demonstrate translation in live web pages by parsing through \u003cstrong\u003eHTML DOM\u003c/strong\u003e and extracting the text element and match them with an \u003cstrong\u003eEnglish to Odia\u003c/strong\u003e dictionary that is stored in a local database. The complete parsing result will preview as a translated webpage for a website. \u003c/p\u003e\n\n\u003ch1 id=\"teams\"\u003eTeams\u003c/h1\u003e\n\u003col\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/anshumanpattnaik\" target=\"_blank\"\u003eAnshuman Pattnaik\u003c/a\u003e  \u003ca href=\"https://github.com/anshumanpattnaik\" target=\"_blank\"\u003e  \u003cimg src=\"https://img.shields.io/github/followers/anshumanpattnaik?style=social\" alt=\"GitHub followers\"\u003e \u003c/a\u003e \u003ca href=\"https://twitter.com/anspattnaik\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/anspattnaik?style=social\" alt=\"Twitter Follow\"\u003e\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/Deeptiman\" target=\"_blank\"\u003eDeeptiman Pattnaik\u003c/a\u003e  \u003ca href=\"https://github.com/Deeptiman\" target=\"_blank\"\u003e  \u003cimg src=\"https://img.shields.io/github/followers/Deeptiman?style=social\" alt=\"GitHub followers\"\u003e \u003c/a\u003e \u003ca href=\"https://twitter.com/deeptimancode\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/deeptimancode?style=social\" alt=\"Twitter Follow\"\u003e\u003c/a\u003e\u003c/li\u003e\n\u003c/ol\u003e\n\n\n\u003ch1 id=\"parsertool\"\u003eParserTool\u003c/h1\u003e\n\u003cp\u003eThe tool will work to extract texts from a local directory that has collections of \u003cstrong\u003eXML\u003c/strong\u003e and \u003cstrong\u003eHTML\u003c/strong\u003e files. The tool will write the output in a text file line by line for each folder. The textual results will be useful to train in a \u003cem\u003eStatistical Machine Translation Engine\u003c/em\u003e (\u003cstrong\u003e\u003ca href=\"http://www.statmt.org/moses/\"\u003eMoses\u003c/a\u003e\u003c/strong\u003e) for translation accuracy purposes.\u003c/p\u003e\n\u003ch2 id=\"-installation-\"\u003e\u003cstrong\u003eInstallation\u003c/strong\u003e\u003c/h2\u003e\n\u003cp\u003eThe project has been developed using \u003cstrong\u003ePHP\u003c/strong\u003e, \u003cstrong\u003eHTML\u003c/strong\u003e, \u003cstrong\u003eMySQL\u003c/strong\u003e. So, \u003cstrong\u003eWampServer 2.0i\u003c/strong\u003e has required to set up the Web Server environment in the local machine.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eDownload WampServer 2.0i\u003c/strong\u003e\n   \u003ca href=\"https://sourceforge.net/projects/wampserver/files/latest/download\"\u003ehttps://sourceforge.net/projects/wampserver/files/latest/download\u003c/a\u003e\n\u003c/p\u003e\n\u003ch2 id=\"-import-the-databases-\"\u003e\u003cstrong\u003eImport the databases\u003c/strong\u003e\u003c/h2\u003e\n\u003cp\u003eThere are two different sets of the database for both the tools, so Go to \u0026quot;\u003ca href=\"http://localhost/phpmyadmin\"\u003ehttp://localhost/phpmyadmin\u003c/a\u003e\u0026quot; and create \u0026quot;\u003cstrong\u003eodia_translate\u003c/strong\u003e\u0026quot;, \u0026quot;\u003cstrong\u003edom_parser\u003c/strong\u003e\u0026quot; database in the phpMyAdmin panel. Then, import the corresponding SQLs that are available in this repo into the phpMyAdmin.\u003c/p\u003e\n\u003ch2 id=\"-add-the-folders-\"\u003e\u003cstrong\u003eAdd the folders\u003c/strong\u003e\u003c/h2\u003e\n\u003cp\u003eNow, place both \u0026quot;\u003cstrong\u003e_Odia\u003cem\u003eTranslation\u003c/em\u003e\u003c/strong\u003e\u0026quot;, \u0026quot;\u003cstrong\u003e\u003cem\u003eParserTool\u003c/em\u003e\u003c/strong\u003e\u0026quot; folders at the installed Wamp Server location inside www folder.\u003c/p\u003e\n\u003ch2 id=\"-run-the-application-\"\u003e\u003cstrong\u003eRun the application\u003c/strong\u003e\u003c/h2\u003e\n\u003cp\u003e \u003cstrong\u003eOdia Translation\u003c/strong\u003e\u003c/p\u003e\n\u003cul\u003e\n   \u003cli\u003eType \u0026quot;\u003ca href=\"http://localhost/Odia_Translation/\"\u003ehttp://localhost/Odia_Translation/\u003c/a\u003e\u0026quot; in the browser and press Enter. You should see the following screenshot on the screen.\u003c/li\u003e\n   \u003cimg src=\"/screenshots/export_homepage_google_odia.png\"/\u003e\n   \u003cli\u003eUsers can type an URL to translate into the Odia language by pressing the \u0026quot;\u003cstrong\u003eTranslate to ODIA\u003c/strong\u003e\u0026quot; button.\u003c/li\u003e\n   \u003cimg src=\"/screenshots/export_input_url_google_odia.png\" /\u003e\n\u003c/ul\u003e\n\u003cul\u003e\n   \u003cli\u003e\n      \u003cp\u003eIn this example- we have used \u0026quot;\u003cstrong\u003e\u003cem\u003e\u003ca href=\"https://www.news18.com\"\u003ehttps://www.news18.com\u003c/a\u003e\u003c/em\u003e\u003c/strong\u003e\u0026quot; to translate their home page but Users can use any \u0026quot;URL\u0026quot; to translate.\u003c/p\u003e \n   \u003c/li\u003e\n   \u003cimg src=\"/screenshots/export_news_eng.png\" /\u003e   \n   \u003cli\u003e\n      \u003cp\u003eThe first translate result will show the dom extraction table with \u003cstrong\u003eTag Name\u003c/strong\u003e and translated \u003cstrong\u003eTag Value\u003c/strong\u003e.\u003c/p\u003e\n   \u003c/li\u003e\n   \u003cimg src=\"/screenshots/export_translate_dom_table.png\" /\u003e\n   \u003cli\u003eThen the user can click on \u0026quot;\u003cstrong\u003e\u003cem\u003eClick here to see the Translated Webpage\u003c/em\u003e\u003c/strong\u003e\u0026quot; button to the real translated webpage on the screen.\u003c/li\u003e\n   \u003cimg src=\"/screenshots/export_news_ori.png\" /\u003e\n\u003c/ul\u003e\n\u003cp\u003e\u003cstrong\u003eParserTool\u003c/strong\u003e\u003c/p\u003e\n\u003cul\u003e\n   \u003cli\u003eUsers can click on the \u0026quot;\u003cstrong\u003eHTML Parser Tool\u003c/strong\u003e\u0026quot; button from the application home page to use the ParserTool.\u003c/li\u003e\n   \u003cimg src=\"/screenshots/export_parser_tool_homepage.png\" /\u003e\n   \u003cli\u003eEnter the local directory path that has a large collection of \u003cstrong\u003eHTML\u003c/strong\u003e and \u003cstrong\u003eXML\u003c/strong\u003e files and press the \u0026quot;\u003cstrong\u003e\u003cem\u003eExtract the Directory\u003c/em\u003e\u003c/strong\u003e\u0026quot; button.\u003c/li\u003e\n   \u003cimg src=\"/screenshots/export_parser_tool_extract.png\"/\u003e\n   \u003cli\u003eThe extracted text results are written to several \u0026quot;\u003cstrong\u003e\u003cem\u003eResult-[num].txt\u003c/em\u003e\u003c/strong\u003e\u0026quot; files inside Result folder in ParserTool.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 id=\"-how-does-it-work-\"\u003e\u003cstrong\u003eHow does it work?\u003c/strong\u003e\u003c/h2\u003e\n\u003cp\u003eIn the \u003cstrong\u003eParserTool,\u003c/strong\u003e there is a section to understand the step by step process of extracting textual elements from each node in an \u003cstrong\u003eHTML\u003c/strong\u003e or \u003cstrong\u003eXML\u003c/strong\u003e file.\u003c/p\u003e\n\u003cblockquote\u003e\n   \u003cp\u003eBrowse any \u0026quot;\u003cem\u003eHTML\u003c/em\u003e\u0026quot; or \u0026quot;\u003cem\u003eXML\u003c/em\u003e\u0026quot; file from the local machine or use the\n      sample \u0026quot;_\u003cstrong\u003e\u003cem\u003eHtml Basic.html\u003c/em\u003e\u003c/strong\u003e\u003cem\u003e\u0026quot; file from this repo and upload it\n      into the module.\u003c/em\u003e\n   \u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003e\u003cstrong\u003eStep - 1\u003c/strong\u003e\n   The user can the parser table with \u003cstrong\u003e\u003cem\u003eTag Name\u003c/em\u003e\u003c/strong\u003e and \u003cstrong\u003e\u003cem\u003eTag Value\u003c/em\u003e\u003c/strong\u003e with the total count of tags in a separate view.\n   \u003cimg src=\"/screenshots/export_step1.png\" /\u003e\n   \u003cstrong\u003eStep - 2\u003c/strong\u003e\n   After clicking the \u0026quot;\u003cstrong\u003e\u003cem\u003eProceed To Step.2\u003c/em\u003e\u003c/strong\u003e\u0026quot; button, the user can see the possible number of lines that can be formed from the extracted texts.\n   \u003cimg src=\"/screenshots/export_step2.png\" /\u003e\n   \u003cstrong\u003eStep - 3\u003c/strong\u003e\n   Then, in the last step, the complete list of lines can be shown with the total number of lines count in a separate view.\n   \u003cimg src=\"/screenshots/export_step3.png\" /\u003e\n\u003c/p\u003e\n\u003ch2 id=\"important-php-apis\"\u003eImportant PHP APIs\u003c/h2\u003e\n\u003cp\u003eThere are certain PHP APIs the application has used to analyze the DOM input and applied logic to provide Translation on the webpage.\u003c/p\u003e\n\u003col\u003e\n   \u003cli\u003e\u003cstrong\u003eparse_url\u003c/strong\u003e - \u003ca href=\"https://www.php.net/manual/en/function.parse-url.php\"\u003ehttps://www.php.net/manual/en/function.parse-url.php\u003c/a\u003e\u003c/li\u003e\n   \u003cli\u003e\u003cstrong\u003efile_get_contents\u003c/strong\u003e - \u003ca href=\"https://www.php.net/manual/en/function.file-get-contents.php\"\u003ehttps://www.php.net/manual/en/function.file-get-contents.php\u003c/a\u003e\u003c/li\u003e\n   \u003cli\u003e\u003cstrong\u003ehtmlentities\u003c/strong\u003e - \u003ca href=\"https://www.php.net/manual/en/function.htmlentities.php\"\u003ehttps://www.php.net/manual/en/function.htmlentities.php\u003c/a\u003e\u003c/li\u003e\n   \u003cli\u003e\u003cstrong\u003eexplode\u003c/strong\u003e - \u003ca href=\"https://www.php.net/manual/en/function.explode.php\"\u003ehttps://www.php.net/manual/en/function.explode.php\u003c/a\u003e\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch2 id=\"dictionary\"\u003eDictionary\u003c/h2\u003e\n\u003cp\u003eThere is a small collection of the dictionary (\u003cstrong\u003e\u003cem\u003e912 words\u003c/em\u003e\u003c/strong\u003e) has been used in this application to replace \u0026quot;\u003cstrong\u003eEnglish\u003c/strong\u003e\u0026quot; words into \u0026quot;\u003cstrong\u003eOdia\u003c/strong\u003e\u0026quot;. The dictionary follows \u003cstrong\u003e\u003cem\u003eUnicode\u003c/em\u003e\u003c/strong\u003e  \u003cstrong\u003e\u003cem\u003eCollation\u003c/em\u003e\u003c/strong\u003e in the SQL table for the \u0026quot;Odia\u0026quot; word column.\u003c/p\u003e\n\u003ch2 id=\"notice\"\u003eNotice\u003c/h2\u003e\n\u003cp\u003eThe project is no longer maintained or supported.\u003c/p\u003e\n\u003ch2 id=\"references\"\u003eReferences\u003c/h2\u003e\n\u003col\u003e\n   \u003cli\u003e\u003cstrong\u003eOdia Language\u003c/strong\u003e - \u003ca href=\"https://en.wikipedia.org/wiki/Odia_language\"\u003ehttps://en.wikipedia.org/wiki/Odia_language\u003c/a\u003e\u003c/li\u003e\n   \u003cli\u003e\u003cstrong\u003eOriya (Unicode block)\u003c/strong\u003e - [\u003ca href=\"https://en.wikipedia.org/wiki/Oriya_(Unicode_block\"\u003ehttps://en.wikipedia.org/wiki/Oriya_(Unicode_block\u003c/a\u003e)] (\u003ca href=\"https://en.wikipedia.org/wiki/Oriya_(Unicode_block\"\u003ehttps://en.wikipedia.org/wiki/Oriya_(Unicode_block\u003c/a\u003e))\u003c/li\u003e\n   \u003cli\u003e\u003cstrong\u003eMySQL API\u003c/strong\u003e - \u003ca href=\"https://www.php.net/manual/en/book.mysql.php\"\u003ehttps://www.php.net/manual/en/book.mysql.php\u003c/a\u003e\u003c/li\u003e\n   \u003cli\u003e\u003cstrong\u003ePHP API\u003c/strong\u003e - \u003ca href=\"https://www.php.net/manual/en/mysqlinfo.api.choosing.php\"\u003ehttps://www.php.net/manual/en/mysqlinfo.api.choosing.php\u003c/a\u003e\u003c/li\u003e\n   \u003cli\u003e\u003cstrong\u003eDocument Object Model\u003c/strong\u003e - \u003ca href=\"https://en.wikipedia.org/wiki/Document_Object_Model\"\u003ehttps://en.wikipedia.org/wiki/Document_Object_Model\u003c/a\u003e\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch2\u003eLicense\u003c/h2\u003e\n\u003cp\u003eThis project is licensed under the \u003ca href=\"https://github.com/Deeptiman/php-dom-parser-translation-tool/blob/master/LICENSE\"\u003eMIT License\u003c/a\u003e\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeptiman%2Fphp-dom-parser-translation-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeeptiman%2Fphp-dom-parser-translation-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeptiman%2Fphp-dom-parser-translation-tool/lists"}