search.puml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. @startuml
  2. interface IProcessor
  3. class processor implements IProcessor
  4. class searcher
  5. processor --> searcher
  6. class car_searcher
  7. processor --> car_searcher
  8. abstract class srv_base
  9. class event_looper extends srv_base
  10. event_looper --> "1" IProcessor
  11. abstract class tcp_client {
  12. abstract function remote_addr;
  13. }
  14. class search_client extends tcp_client
  15. class relation_client extends tcp_client
  16. class factory_client extends tcp_client
  17. class room_client extends tcp_client
  18. class one_one {
  19. public function add($key,$val)
  20. public function get($key)
  21. }
  22. note bottom of one_one : 单个Key获取单个值
  23. class one_multi {
  24. public function add($key,$val)
  25. public function get($key)
  26. }
  27. note bottom of one_multi : 一个Key获取多个值
  28. class indexer {
  29. public function parase($words,$value)
  30. public function find($key)
  31. public function name($val)
  32. }
  33. class brand_dict extends indexer
  34. class category_dict extends indexer
  35. class goods_dict extends indexer
  36. class special_dict extends indexer
  37. searcher --> "1" brand_dict
  38. searcher --> "1" category_dict
  39. searcher --> "1" goods_dict
  40. searcher --> "1" special_dict
  41. searcher --> "1" valtokey
  42. car_searcher --> "1" brand_dict
  43. car_searcher --> "1" category_dict
  44. car_searcher --> "1" goods_dict
  45. car_searcher --> "1" special_dict
  46. car_searcher --> "1" valtokey
  47. brand_dict --> "1" one_one
  48. goods_dict --> "1" one_one
  49. special_dict --> "1" one_one
  50. category_dict --> "1" parent_sub_tree
  51. brand_dict --> "1" one_multi
  52. category_dict --> "1" one_multi
  53. note top of indexer : 添加句子自动分词,\n建立和值之间的关系,\n然后通过字获取值,\n也可通过值获取原始词
  54. class valtokey {
  55. public function add($key,$val)
  56. public function finish()
  57. public function findless($val,$start,$length)
  58. public function findall($val)
  59. }
  60. class parent_sub_tree {
  61. public function add($id,$pid)
  62. public function is_parent($hot)
  63. public function subs($hot)
  64. }
  65. note bottom of parent_sub_tree : 将父子关系表达为一维hash结构
  66. class word_segment
  67. indexer --> word_segment
  68. note bottom of word_segment : 过滤掉一些符号字符,中文按字组织,英文凑成词组织
  69. @enduml