private void CreateFeatureRecord(PhoneDbDataContext dataContext, bool isCorrect, string name, string number, int parseId) { double areaCodeScore = _areaCode.GetScore(number); double phoneCrossScore = _phoneCrossRecord.GetScore(number); double phoneFormScore = _phoneForm.GetScore(number); double lengthScore = name.Length; double alphaScore = AlphaPerLengthFeature.GetScore(name); double bigramScore = _bigram.GetScore(name); try { dataContext.usp_Feature_AddressBook_Insert(parseId, name, number, areaCodeScore, phoneCrossScore, phoneFormScore, lengthScore, alphaScore, bigramScore, isCorrect); } catch (Exception ex) { Console.WriteLine(ex); } }
private void CreateFeatureRecord(PhoneDbDataContext dataContext, bool isCorrect, string name, string number, string number2, DateTime timestamp, string message, int parseId) { double areaCodeScore = Math.Max(_areaCode.GetScore(number), _areaCode.GetScore(number2)); double phoneCrossScore = Math.Max(_phoneCrossRecord.GetScore(number), _phoneCrossRecord.GetScore(number2)); double phoneFormScore = Math.Max(_phoneForm.GetScore(number), _phoneForm.GetScore(number2)); double lengthScore = (message == "*NONE*") ? 0f : message.Length; double alphaScore = AlphaPerLengthFeature.GetScore(message); double bigramScore = (message == "*NONE*")? double.MinValue : _bigram.GetScore(message); double distScore = _dateDist.GetScore(timestamp); try { dataContext.usp_Feature_Sms_Insert(parseId, name, number, number2, timestamp, message, areaCodeScore, phoneCrossScore, phoneFormScore, lengthScore, alphaScore, bigramScore, distScore, isCorrect); } catch (Exception ex) { Console.WriteLine(ex); } }