Construct Detector instance with smoothing parameter.
(self, alpha=None)
| 96 | self.word_lang_prob_map = {} |
| 97 | |
| 98 | def create(self, alpha=None): |
| 99 | '''Construct Detector instance with smoothing parameter.''' |
| 100 | detector = self._create_detector() |
| 101 | if alpha is not None: |
| 102 | detector.set_alpha(alpha) |
| 103 | return detector |
| 104 | |
| 105 | def _create_detector(self): |
| 106 | if not self.langlist: |