Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services AWS理解客户端检测实体,但不根据需要进行拆分_Amazon Web Services_Api_Amazon Comprehend - Fatal编程技术网

Amazon web services AWS理解客户端检测实体,但不根据需要进行拆分

Amazon web services AWS理解客户端检测实体,但不根据需要进行拆分,amazon-web-services,api,amazon-comprehend,Amazon Web Services,Api,Amazon Comprehend,我正在使用和检测率方法。它能够正确识别文本及其类型,但我需要它能够根据需要拆分名称 表单中有两个字段: 文档中似乎没有任何与此相关的内容。当发送到后端时,我需要将其正确解析为XML,例如: <name> <surname>Doe</surname> <given-names>John</given-names> <suffix>III</suffix> </name>. 它

我正在使用和
检测率
方法。它能够正确识别文本及其类型,但我需要它能够根据需要拆分名称

表单中有两个字段:

文档中似乎没有任何与此相关的内容。当发送到后端时,我需要将其正确解析为XML,例如:

<name>
    <surname>Doe</surname>
    <given-names>John</given-names>
    <suffix>III</suffix>
</name>.
dd
s带有:

这显然不是我需要的。它将始终识别名称,但无法预测将来需要如何拆分字符串

我真的很喜欢这个API,而且我还没有找到任何其他接近我所需要的东西。也许这是不可能的。只需添加第三列
后缀
并以这种方式绕过它就更容易了

$response = $GLOBALS['ComprehendClient']->detectEntities([
    'LanguageCode' => 'en',
    'Text' => 'John Doe Jr'
]);
dd($response);
die();