LangProfile constructor

LangProfile({
  1. String? name,
  2. Map<String, int>? freq,
  3. List<int>? nWords,
})

Implementation

LangProfile({this.name, Map<String, int>? freq, List<int>? nWords})
    : freq = Map<String, int>.from(freq ?? {}),
      nWords = nWords ?? List<int>.filled(NGram.nGram, 0) {
  if (freq != null) {
    this.freq.addAll(freq);
  }
}