ClassifierForJ: DotNet.patch
| File DotNet.patch, 1.4 kB (added by edrishn, 2 years ago) |
|---|
-
NClassifier\summariser\SimpleSummariser.cs
old new 121 121 result.Append(sentence); 122 122 result.Append("."); 123 123 // This isn't always correct - perhaps it should be whatever symbol the sentence finished with 124 if (it.MoveNext()) 125 { 126 result.Append(" "); 127 } 124 result.Append(" "); 128 125 } 129 126 130 return result.ToString() ;127 return result.ToString().TrimEnd(' '); 131 128 } 132 129 133 130 /** -
NClassifier\vector\VectorClassifier.cs
old new 99 99 { 100 100 int[] result = new int[terms.Length]; 101 101 for (int i = 0; i < terms.Length; i++) { 102 int value = (int)wordFrequencies[terms[i]];103 if (value == System.Int32.MinValue)102 object value = wordFrequencies[terms[i]]; 103 if (value == null) 104 104 { 105 105 result[i] = 0; 106 106 } 107 107 else 108 108 { 109 result[i] = value;109 result[i] = (int) value; 110 110 } 111 111 112 112 }
