Amazon Comprehend Medical 返回标记为 [FILTERED] 的值。我有一个 rails 5.2 应用程序并安装了aws-sdk
gem。我现在正在尝试通过 rails 控制台调用 API 并获得返回 JSON。但大多数值都以 [FILTERED] 形式返回。知道是什么原因造成的吗?
我已经搜索了 AWS 文档,但似乎无法找到答案。
class Comprehend
require 'aws-sdk-comprehendmedical'
client = Aws::ComprehendMedical::Client.new
resp = client.detect_entities({
text: "45 yr old male with chestpain and SOB BP 120/70", # required
})
puts(resp)
end
这是在控制台中将其作为 Comprehend.new 运行时的结果。
{
:entities=>[
{
:id=>"[FILTERED]",
:begin_offset=>0,
:end_offset=>2,
:score=>0.9994971752166748,
:text=>"[FILTERED]",
:category=>"PROTECTED_HEALTH_INFORMATION",
:type=>"[FILTERED]",
:traits=>[],
:attributes=>nil
},
{
:id=>"[FILTERED]",
:begin_offset=>20,
:end_offset=>29,
:score=>0.9164832830429077,
:text=>"[FILTERED]",
:category=>"MEDICAL_CONDITION",
:type=>"[FILTERED]",
:traits=>[],
:attributes=>nil
},
{
:id=>"[FILTERED]",
:begin_offset=>34,
:end_offset=>37,
:score=>0.8974254131317139,
:text=>"[FILTERED]",
:category=>"MEDICAL_CONDITION",
:type=>"[FILTERED]",
:traits=>[],
:attributes=>nil
},
{
:id=>"[FILTERED]",
:begin_offset=>38,
:end_offset=>40,
:score=>0.8211551904678345,
:text=>"[FILTERED]",
:category=>"TEST_TREATMENT_PROCEDURE",
:type=>"[FILTERED]",
:traits=>[],
:attributes=>[
{
:type=>"[FILTERED]",
:score=>0.9983691573143005,
:relationship_score=>1.0,
:id=>"[FILTERED]",
:begin_offset=>41,
:end_offset=>47,
:text=>"[FILTERED]",
:traits=>[]
}
]
}
],
:unmapped_attributes=>[],
:pagination_token=>nil
}