{"id":27357982,"url":"https://github.com/davidlday/lingua-atd","last_synced_at":"2025-07-07T15:33:50.122Z","repository":{"id":56830857,"uuid":"2601527","full_name":"davidlday/Lingua-AtD","owner":"davidlday","description":"Perl module for using After the Deadline's API. See http://www.afterthedeadline.com/api.slp for details.","archived":false,"fork":false,"pushed_at":"2016-03-19T13:40:29.000Z","size":57,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T23:56:37.696Z","etag":null,"topics":["afterthedeadline","lingua","perl"],"latest_commit_sha":null,"homepage":"https://metacpan.org/pod/Lingua::AtD","language":"Perl","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/davidlday.png","metadata":{"files":{"readme":"README.pod","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-10-18T19:53:01.000Z","updated_at":"2018-02-12T00:34:27.000Z","dependencies_parsed_at":"2022-09-09T18:01:27.208Z","dependency_job_id":null,"html_url":"https://github.com/davidlday/Lingua-AtD","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/davidlday/Lingua-AtD","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidlday%2FLingua-AtD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidlday%2FLingua-AtD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidlday%2FLingua-AtD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidlday%2FLingua-AtD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidlday","download_url":"https://codeload.github.com/davidlday/Lingua-AtD/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidlday%2FLingua-AtD/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264103346,"owners_count":23557923,"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":["afterthedeadline","lingua","perl"],"created_at":"2025-04-12T23:56:36.503Z","updated_at":"2025-07-07T15:33:50.074Z","avatar_url":"https://github.com/davidlday.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n=head1 SYNOPSIS\n\n    use Lingua::AtD;\n\n    # Create a new service proxy\n    my $atd = Lingua::AtD-\u003enew( {\n        host     =\u003e 'service.afterthedeadline.com',\n        port     =\u003e 80,\n        throttle =\u003e 2,\n    });\n\n    # Run spelling and grammar checks. Returns a Lingua::AtD::Response object.\n    my $doc_check = $atd-\u003echeck_document('Text to check.');\n    # Loop through reported document errors.\n    foreach my $atd_error ($doc_check-\u003eget_errors()) {\n        # Do something with...\n        print \"Error string: \", $atd_error-\u003eget_string(), \"\\n\";\n    }\n\n    # Run only grammar checks. Essentially the same as\n    # check_document(), sans spell-check.\n    my $grmr_check = $atd-\u003echeck_grammar('Text to check.');\n    # Loop through reported document errors.\n    foreach my $atd_error ($grmr_check-\u003eget_errors()) {\n        # Do something with...\n        print \"Error string: \", $atd_error-\u003eget_string(), \"\\n\";\n    }\n\n    # Get statistics on a document. Returns a Lingua::AtD::Scores object.\n    my $atd_scores = $atd-\u003estats('Text to check.');\n    # Loop through reported document errors.\n    foreach my $atd_metric ($atd_scores-\u003eget_metrics()) {\n        # Do something with...\n        print $atd_metric-\u003eget_type(), \"/\", $atd_metric-\u003eget_key(),\n            \" = \", $atd_metric-\u003eget_value(), \"\\n\";\n    }\n\n=head1 DESCRIPTION\n\nLingua::AtD provides an OO-style interface for After the Deadline's grammar and spell checking services.\n\n=head1 METHODS\n\n=over 4\n\n=item new\n\nThis constructor takes four arguments, all optional. The sample below shows the defaults.\n\n    $atd = Lingua::AtD-\u003enew({\n        api_key  =\u003e 'Lingua-AtD',\n        host     =\u003e 'service.afterthedeadline.com',\n        port     =\u003e 80,\n        throttle =\u003e 2,\n    });\n\n=over 4\n\n=item api_key\n\nAPI key used to access the service. Defaults to this package's name plus 32 hex digits (i.e. I\u003cLingua-AtD\u003e-7b8391f59fd9fa4246b2c69cd8793b88). See the L\u003cAPI Documentation|http://www.afterthedeadline.com/api.slp\u003e for requirements. The default will work, and so far as I know will cause no problems.\n\n=item host\n\nHost for the AtD service. Defaults to the public host: I\u003cservice.afterthedeadline.com\u003e. AtD's software is open source, and it's entirely possible to download and set up your own private AtD service. See the L\u003cAtD Project website|http://open.afterthedeadline.com/\u003e for details.\n\n=item port\n\nPort for the AtD service. Defaults to the standard http port: I\u003c80\u003e. AtD's software is open source, and it's entirely possible to download and set up your own private AtD service. See the L\u003cAtD Project website|http://open.afterthedeadline.com/\u003e for details.\n\n=item throttle\n\nThere's no API documentation stating such, but testing has shown that AtD service throws a 503 error if called too quickly. This specifies the number of seconds to wait between calls. The default is 2 and seems to work find.\n\n=back\n\n=item get_api_key\n\n    $atd-\u003eget_api_key();\n\nReturns the API Key used to access the AtD service.\n\n=item get_host\n\n    $atd-\u003eget_host();\n\nReturns the host of the AtD service.\n\n=item get_port\n\n    $atd-\u003eget_port();\n\nReturns the port of the AtD service.\n\n=item get_service_url\n\n    $atd-\u003eget_service();\n\nReturns a formatted URL for the AtD service.\n\n=item get_throttle\n\n    $atd-\u003eget_throttle();\n\nReturns the number of seconds that must pass between calls to the AtD service.\n\n=item set_throttle\n\n    $atd-\u003eset_throttle(3);\n\nSets the number of seconds that must pass between calls to the AtD service.\n\n=item check_document\n\n    $atd_results = $atd-\u003echeck_document('Some text stringg in badd nneed of prufreding.');\n\nInvokes the document check service for some string of text and return a L\u003cLingua::AtD::Results\u003e object.\n\nFrom the L\u003cAPI Documentation|http://www.afterthedeadline.com/api.slp\u003e: I\u003cChecks a document and returns errors and suggestions\u003e\n\n=item check_grammar\n\n    $atd_results = $atd-\u003echeck_grammar('Some text stringg in badd nneed of prufreding.');\n\nInvokes the grammar check service for some string of text and return a L\u003cLingua::AtD::Results\u003e object. This differs from I\u003ccheck_document\u003e in that it only checks grammar and style, not spelling.\n\nFrom the L\u003cAPI Documentation|http://www.afterthedeadline.com/api.slp\u003e: I\u003cChecks a document (sans spelling) returns errors and suggestions\u003e\n\n=item stats\n\n    $atd_scores = $atd-\u003estats('Some text stringg in badd nneed of prufreding.');\n\nInvokes the stats service for some string of text and return a L\u003cLingua::AtD::Scores\u003e object. This differs from I\u003ccheck_document\u003e in that it only checks grammar and style, not spelling.\n\nFrom the L\u003cAPI Documentation|http://www.afterthedeadline.com/api.slp\u003e: I\u003cReturns statistics about the writing quality of a document\u003e\n\n=back\n\n=head1 BUGS\n\nNo known bugs.\n\n=head1 IRONY\n\nWouldn't it be kind of funny if I had a ton of spelling/grammar/style errors in my documentation? Yeah, it would. And I bet there are. Shame on me for not running my documentation through my own module.\n\n=head1 SEE ALSO\n\n=for :list\n* L\u003cYour::Module\u003e\n* L\u003cYour::Package\u003e\n\nSee the L\u003cAPI Documentation|http://www.afterthedeadline.com/api.slp\u003e at After the Deadline's website.\n\nB\u003cNB:\u003e In the L\u003cAPI Documentation|http://www.afterthedeadline.com/api.slp\u003e, there is a fourth service called B\u003c/info.slp\u003e. I do not plan to implement this. Each Lingua::AtD::Error supplies an informative URL when one is available. I see no reason to call this independently, but feel free to submit a patch if you find a reason.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidlday%2Flingua-atd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidlday%2Flingua-atd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidlday%2Flingua-atd/lists"}