package com.yunyan.web.controller.business;

import com.yunyan.business.service.IBaiduNlpService;
import com.yunyan.business.utils.baiduNlp.pojo.BaiduEcnetDto;
import com.yunyan.business.utils.baiduNlp.pojo.BaiduEcnetVo;
import com.yunyan.business.utils.baiduNlp.pojo.list.BaiduEcnetAndIndexListDto;
import com.yunyan.business.utils.baiduNlp.pojo.list.BaiduEcnetAndIndexListVo;
import com.yunyan.common.core.controller.BaseController;
import com.yunyan.common.core.domain.AjaxResultVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * 报告数据Controller
 *
 * @author yunyan
 * @date 2023-07-27
 */
@Api(tags = "3.0.1智能检测")
@RestController
@RequestMapping("/nlp")
public class NlpController extends BaseController
{
    @Autowired
    private IBaiduNlpService baiduNlpService;

    @ApiOperation(value="文本纠错", notes="文本纠错")
    //@Log(title = "报告数据", businessType = BusinessType.EXPORT)
    @PostMapping("/checkword")
    public AjaxResultVo<BaiduEcnetVo> checkword(@Valid @RequestBody BaiduEcnetDto dto)
    {
        return baiduNlpService.checkWord(dto);
    }

    @ApiOperation(value="文本纠错-集合", notes="文本纠错-集合")
    //@Log(title = "报告数据", businessType = BusinessType.EXPORT)
    @PostMapping("/checkWordList")
    public AjaxResultVo<BaiduEcnetAndIndexListVo> checkWordList(@Valid @RequestBody BaiduEcnetAndIndexListDto dto)
    {
        return baiduNlpService.checkWordList(dto);
    }


}
