matasarei/strike-plagiarism-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

matasarei/strike-plagiarism-php

Composer 安装命令:

composer require matasarei/strike-plagiarism-php

包简介

StrikePlagiarism API for PHP

README 文档

README

An unofficial StrikePlagiarism API v2 client.

How to install

This is a composer package, to install simply run:

composer require matasarei/strike-plagiarism-php

How to use

use Matasar\StrikePlagiarism\Client;
use Matasar\StrikePlagiarism\Document;

$client = new Client('YOUR_API_KEY');

$document = new Document(
    'en', // language code (ISO 639-1)
    'A test document', // title
    'Yevhen Matasar', // author
    'Yevhen Matasar', // coordinator
    __DIR__ . '/test.pdf' // file uri
);

$response = $client->addDocument($document);

$report = $client->getReport($response['id']);

The content of $report will be:

{
  ["html"]=> "<html>...original html report...</html>",
  ["name"]=>
  string(15) "A test document"
  ["author"]=>
  string(14) "Yevhen Matasar"
  ["coordinator"]=>
  string(14) "Yevhen Matasar"
  ["similarity_1"]=>
  float(100)
  ["similarity_2"]=>
  float(0)
  ["phrase_length"]=>
  int(25)
  ["words_count"]=>
  int(20)
  ["chars_count"]=>
  int(110)
  ["sources"]=>
  array(1) {
    ["081e22a6707edb4e115f8bb033a73f9f"]=>
    array(3) {
      ["url"]=>
      string(59) "https://s1.q4cdn.com/806093406/files/doc_downloads/test.pdf"
      ["author"]=>
      string(2) " "
      ["similar_words"]=>
      int(20)
    }
  }
}

Tests

To run tests you need to:

  1. Get your own API key
  2. Copy phpunit.xml.dist to phpunit.xml
  3. Edit phpunit.xml, replace API_KEY with your own
  4. Run vendor/bin/phpunit (you need to run composer install first).

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-05-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固