MCPcopy
hub / github.com/Mimino666/langdetect / create

Method create

langdetect/detector_factory.py:98–103  ·  view source on GitHub ↗

Construct Detector instance with smoothing parameter.

(self, alpha=None)

Source from the content-addressed store, hash-verified

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:

Callers 6

detectFunction · 0.80
detect_langsFunction · 0.80
test_detector1Method · 0.80
test_detector2Method · 0.80
test_detector3Method · 0.80
test_detector4Method · 0.80

Calls 2

_create_detectorMethod · 0.95
set_alphaMethod · 0.80

Tested by 4

test_detector1Method · 0.64
test_detector2Method · 0.64
test_detector3Method · 0.64
test_detector4Method · 0.64