ianrothmann/ain-laravel-sdk 问题修复 & 功能扩展

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

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

ianrothmann/ain-laravel-sdk

最新稳定版本:1.0.39

Composer 安装命令:

composer require ianrothmann/ain-laravel-sdk

包简介

SDK for use with AIN Laravel.

README 文档

README

Try it out with the Ain Facade. Proper documentation will follow soon. Here are a few tasks:

    public function tldr()
    {
        $result=\Ain::TLdr()
            ->text($this->story)
            ->get();

        dd($result);
    }


    public function summarize()
    {
        $result=\Ain::summarize()
            ->text($this->story)
            ->inFirstPerson()
            ->forTargetGradeLevel(2)
            ->force()
            ->get();

        dd($result);
    }

    public function keywords()
    {
        $result=\Ain::extractKeywords()
            ->fromText($this->story)
            ->get();

        dd($result);
    }

    public function themes()
    {
        $result=\Ain::extractThemes()
            ->fromText($this->story)
            ->forContext('A person tells a story')
            ->get();

        dd($result);
    }

    public function sentiment()
    {
        $result=\Ain::classifySentiment()
            ->forSentences(['I like my dog','I dont like winter'])
            ->get();

        dd($result);
    }

    public function grammar()
    {
        $result=\Ain::languageCheck()
            ->text($this->spelling)
            ->get();

        dd($result);
    }

    public function rewriter()
    {
        $result=\Ain::rewrite()
            ->text($this->story)
            ->withHighCreativity()
            ->get();

        dd($result);
    }

    public function splitNames()
    {
        $result=\Ain::splitNames()
            ->forList(['Ian Rothmann','Hill, Peter'])
            ->get();

        dd($result);
    }

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-03