Class PlainText
Copy detector for plain text files.
Inherited Members
Namespace: AutoCheck.Core.CopyDetectors
Assembly: AutoCheck.dll
Syntax
public class PlainText : CopyDetector
Constructors
| Improve this Doc View SourcePlainText()
Creates a new instance, setting up its properties in order to allow copy detection with the lowest possible false-positive probability.
Declaration
public PlainText()
Properties
| Improve this Doc View SourceCount
The quantity of files loaded.
Declaration
public override int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
Extension
File extension
Declaration
protected string Extension { get; set; }
Property Value
Type | Description |
---|---|
System.String |
LineCountWeight
The weight that line counting will have when computing the global matching percentage.
Declaration
protected float LineCountWeight { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
WordCountWeight
The weight that word counting will have when computing the global matching percentage.
Declaration
protected float WordCountWeight { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
WordsAmountWeight
The weight that different words counting will have when computing the global matching percentage.
Declaration
protected float WordsAmountWeight { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Methods
| Improve this Doc View SourceCompare()
Compares all the previously loaded files, between each other.
Declaration
public override void Compare()
Overrides
CopyDetected(String, Single)
Checks if a potential copy has been detected. The Compare() method should be called firts.
Declaration
public override bool CopyDetected(string path, float threshold)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | |
System.Single | threshold | The threshold value, a higher one will be considered as copy. |
Returns
Type | Description |
---|---|
System.Boolean | True of copy has been detected. |
Overrides
GetDetails(String)
Returns a printable details list, containing information about the comparissons (student, source and % of match).
Declaration
public override List<(string student, string source, float match)> GetDetails(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Student name |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.ValueTuple<System.String, System.String, System.Single>> | A list of tuples, on each one will contain information about the current student, the source compared with and the % of match. |
Overrides
Load(String)
Loads the given file into the local collection, in order to compare it when Compare() is called.
Declaration
public override void Load(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path |