Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

5
LINES

< > BotCompany Repo | #1014316 // guessGermanOrEnglish_ngrams - returns "german", "english" or null

JavaX fragment (include)

static S guessGermanOrEnglish_ngrams(int n, S text) {
  Set<S> set1 = uniqNgrams(n, mechCISet("English words"));
  Set<S> set2 = uniqNgrams(n, mechCISet("Deutsche Wörter"));
  ret ngramScoreBySet(n, text, set1, set2, "english", "german");
}

Author comment

Began life as a copy of #1014231

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1014316
Snippet name: guessGermanOrEnglish_ngrams - returns "german", "english" or null
Eternal ID of this version: #1014316/6
Text MD5: 66236a6c3e288e5d347339cb50d16ccb
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-20 03:14:04
Source code size: 245 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 321 / 350
Version history: 5 change(s)
Referenced in: [show references]