NlpSemanticTextsAnalyzeRequest.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /**
  3. * TOP API: taobao.nlp.semantic.texts.analyze request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2015.06.12
  7. */
  8. class NlpSemanticTextsAnalyzeRequest
  9. {
  10. /**
  11. * 文本内容
  12. **/
  13. private $texts;
  14. /**
  15. * 需要获取的语义分析结果类型,以半角逗号(,)分隔,可以指定获取不同类型值的结果,以(=)号分割。如logistics_speed=0,logistics_speed=1;logistics_speed-物流速度分析;logistics_service-物流服务态度分析;logistics_package-物流包裹破损分析;
  16. **/
  17. private $types;
  18. private $apiParas = array();
  19. public function setTexts($texts)
  20. {
  21. $this->texts = $texts;
  22. $this->apiParas["texts"] = $texts;
  23. }
  24. public function getTexts()
  25. {
  26. return $this->texts;
  27. }
  28. public function setTypes($types)
  29. {
  30. $this->types = $types;
  31. $this->apiParas["types"] = $types;
  32. }
  33. public function getTypes()
  34. {
  35. return $this->types;
  36. }
  37. public function getApiMethodName()
  38. {
  39. return "taobao.nlp.semantic.texts.analyze";
  40. }
  41. public function getApiParas()
  42. {
  43. return $this->apiParas;
  44. }
  45. public function check()
  46. {
  47. }
  48. public function putOtherTextParam($key, $value) {
  49. $this->apiParas[$key] = $value;
  50. $this->$key = $value;
  51. }
  52. }