Visual Studio Reformat: Emby.Server.Implementations Part T-T

This commit is contained in:
Erwin de Haan
2019-01-13 20:22:56 +01:00
parent 0efc699e3d
commit 25f0315e91
39 changed files with 1054 additions and 892 deletions

View File

@@ -36,7 +36,6 @@
*
* ***** END LICENSE BLOCK ***** */
using System;
namespace UniversalDetector.Core
{
@@ -135,12 +134,14 @@ namespace UniversalDetector.Core
byte[] newbuf = FilterWithEnglishLetters(buf, offset, len);
byte charClass, freq;
for (int i = 0; i < newbuf.Length; i++) {
for (int i = 0; i < newbuf.Length; i++)
{
charClass = Latin1_CharToClass[newbuf[i]];
freq = Latin1ClassModel[lastCharClass * CLASS_NUM + charClass];
if (freq == 0) {
state = ProbingState.NotMe;
break;
if (freq == 0)
{
state = ProbingState.NotMe;
break;
}
freqCounter[freq]++;
lastCharClass = charClass;
@@ -155,13 +156,17 @@ namespace UniversalDetector.Core
float confidence = 0.0f;
int total = 0;
for (int i = 0; i < FREQ_CAT_NUM; i++) {
for (int i = 0; i < FREQ_CAT_NUM; i++)
{
total += freqCounter[i];
}
if (total <= 0) {
if (total <= 0)
{
confidence = 0.0f;
} else {
}
else
{
confidence = freqCounter[3] * 1.0f / total;
confidence -= freqCounter[1] * 20.0f / total;
}