Skip to content

Commit

Permalink
Merge branch 'HEAD' of https://catalindumitru@github.com/catalindumit…
Browse files Browse the repository at this point in the history
…ru/Proiect-AI-2012---GUI.git

Conflicts:
	WebServer/App_Data/WebServerDatabase.mdf
	WebServer/App_Data/WebServerDatabase_log.LDF
	WebServer/Content/Timeline.css
	WebServer/Data/ModuleWorker.cs
	WebServer/Scripts/timeline.js
  • Loading branch information
colin-dumitru committed Feb 18, 2012
2 parents 4d71da9 + 9f51250 commit f5c85b9
Show file tree
Hide file tree
Showing 89 changed files with 9,199 additions and 94 deletions.
79 changes: 79 additions & 0 deletions Backup/AbstractClassifier.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#region Copyright (c) 2004, Ryan Whitaker
/*********************************************************************************
'
' Copyright (c) 2004 Ryan Whitaker
'
' This software is provided 'as-is', without any express or implied warranty. In no
' event will the authors be held liable for any damages arising from the use of this
' software.
'
' Permission is granted to anyone to use this software for any purpose, including
' commercial applications, and to alter it and redistribute it freely, subject to the
' following restrictions:
'
' 1. The origin of this software must not be misrepresented; you must not claim that
' you wrote the original software. If you use this software in a product, an
' acknowledgment (see the following) in the product documentation is required.
'
' This product uses software written by the developers of NClassifier
' (http://nclassifier.sourceforge.net). NClassifier is a .NET port of the Nick
' Lothian's Java text classification engine, Classifier4J
' (http://classifier4j.sourceforge.net).
'
' 2. Altered source versions must be plainly marked as such, and must not be
' misrepresented as being the original software.
'
' 3. This notice may not be removed or altered from any source distribution.
'
'********************************************************************************/
#endregion

using System;

namespace NClassifier
{
public abstract class AbstractClassifier : IClassifier
{
protected double cutoff = IClassifierConstants.DEFAULT_CUTOFF;

/// <summary>
/// Gets or sets the value which determines the minimum probability that should be classified as a match.
/// </summary>
/// <remarks>
/// Throws an ArgumentOutOfRangeException if the cutoff is not equal to or greater than 0 or less than or equal to 1.
/// </remarks>
public double MatchCutoff
{
get
{
return cutoff;
}
set
{
if (cutoff > 1 || cutoff < 0)
throw new ArgumentOutOfRangeException("Cutoff must be equal to or greater than 0 and less than or equal to 1.");
cutoff = value;
}
}

public abstract double Classify(string input);

public bool IsMatch(string input)
{
try
{
double matchProbability = Classify(input);
return IsMatch(matchProbability);
}
catch (Exception ex)
{
throw new ClassifierException("AbstractClassifier.IsMatch(string input)", ex);
}
}

public bool IsMatch(double matchProbability)
{
return (matchProbability >= cutoff);
}
}
}
58 changes: 58 additions & 0 deletions Backup/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
using System.Reflection;
using System.Runtime.CompilerServices;

//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("NClassifier for Microsoft .NET Framework 1.1")]
[assembly: AssemblyDescription("A text classification and summarization library.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("nclassifier.sourceforge.net")]
[assembly: AssemblyProduct("NClassifier")]
[assembly: AssemblyCopyright("Licensed under LGPL.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:

[assembly: AssemblyVersion("0.1.0.0")]

//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]
Loading

0 comments on commit f5c85b9

Please sign in to comment.