1 | <?php |
||
25 | class MoreLike |
||
26 | { |
||
27 | /** |
||
28 | * Models to search from similar |
||
29 | * @var AnnotatedInterface[] |
||
30 | */ |
||
31 | public $models = []; |
||
32 | |||
33 | /** |
||
34 | * A list of fields to fetch and analyze the text from. Defaults to the _all field for free text and to all |
||
35 | * possible fields for document inputs. |
||
36 | * @var array |
||
37 | */ |
||
38 | public $fields = []; |
||
39 | |||
40 | /** |
||
41 | * |
||
42 | * The unlike parameter is used in conjunction with like in order not to select terms found in a chosen set of |
||
43 | * documents. In other words, we could ask for documents like: "Apple", but unlike: "cake crumble tree". The syntax |
||
44 | * is the same as like. |
||
45 | * @var array |
||
46 | */ |
||
47 | public $unlike = []; |
||
48 | |||
49 | /** |
||
50 | * Extra text to search for |
||
51 | * @var string[] |
||
52 | */ |
||
53 | public $texts = []; |
||
54 | |||
55 | /** |
||
56 | * The maximum number of query terms that will be selected. Increasing this value gives greater accuracy at the |
||
57 | * expense of query execution speed. |
||
58 | * @var int |
||
59 | */ |
||
60 | public $maxQueryTerms = 25; |
||
61 | |||
62 | /** |
||
63 | * The minimum term frequency below which the terms will be ignored from the input document. |
||
64 | * @var int |
||
65 | */ |
||
66 | public $minTermFreq = 2; |
||
67 | |||
68 | /** |
||
69 | * The minimum document frequency below which the terms will be ignored from the input document. |
||
70 | * @var int |
||
71 | */ |
||
72 | public $minDocFreq = 5; |
||
73 | |||
74 | /** |
||
75 | * The maximum document frequency above which the terms will be ignored from the input document. This could be |
||
76 | * useful in order to ignore highly frequent words such as stop words |
||
77 | * @var int |
||
78 | */ |
||
79 | public $maxDocFreq = null; |
||
80 | |||
81 | /** |
||
82 | * The minimum word length below which the terms will be ignored. The old name min_word_len is deprecated. |
||
83 | * @var int |
||
84 | */ |
||
85 | public $minWordLength = 0; |
||
86 | |||
87 | /** |
||
88 | * The maximum word length above which the terms will be ignored. The old name max_word_len is deprecated. |
||
89 | * @var int |
||
90 | */ |
||
91 | public $maxWordLength = null; |
||
92 | |||
93 | /** |
||
94 | * An array of stop words. Any word in this set is considered "uninteresting" and ignored. If the analyzer allows |
||
95 | * for stop words, you might want to tell MLT to explicitly ignore them, as for the purposes of document similarity |
||
96 | * it seems reasonable to assume that "a stop word is never interesting". |
||
97 | * @var array |
||
98 | */ |
||
99 | public $stopWords = []; |
||
100 | |||
101 | /** |
||
102 | * MoreLikeOptions constructor. |
||
103 | * @param AnnotatedInterface|AnnotatedInterface[]|DataProviderInterface|null $models |
||
104 | */ |
||
105 | 1 | public function __construct($models = null) |
|
120 | |||
121 | 1 | public function toArray() |
|
193 | } |