• Tutorials
  • Api Documentation
  • Download
  • Credits
Show / Hide Table of Contents
  • AutoCheck.Core
    • Output
    • Output.Log
    • Output.Style
    • Output.Type
    • Script
    • Script.ExecutionMode
    • Utils
    • Utils.OS
  • AutoCheck.Core.Connectors
    • Atom
    • Base
    • Compressed
    • Css
    • Csv
    • CsvDocument
    • Dmoj
    • GDrive
    • Html
    • Math
    • Odoo
    • Operator
    • PlainText
    • PlainText.PlainTextDocument
    • Postgres
    • Rss
    • Shell
    • TextStream
    • Xml
    • Xml.XmlNodeType
  • AutoCheck.Core.CopyDetectors
    • Base
    • Base.Mode
    • Css
    • Html
    • PlainText
    • PlainText.File
    • SourceCode
    • SqlLog
    • Xml
  • AutoCheck.Core.Events
    • LogUpdateEventArgs
    • StatusUpdateEventArgs
    • StatusUpdateEventArgs.ExecutionEvent
  • AutoCheck.Core.Exceptions
    • ArgumentInvalidException
    • ArgumentNotFoundException
    • ConfigFileMissingException
    • ConnectionInvalidException
    • ConnectorInvalidException
    • ConnectorNotFoundException
    • DocumentInvalidException
    • DownloadFailedException
    • ItemNotFoundException
    • PorpertyNotFoundException
    • QueryInvalidException
    • RegexInvalidException
    • ResultMismatchException
    • ScriptInvalidException
    • ScriptNotFoundException
    • StyleInvalidException
    • StyleNotAppliedException
    • StyleNotFoundException
    • TableInconsistencyException
    • VariableInvalidException
    • VariableNotFoundException
  • Google.DiffMatchPatch
    • Diff
    • DiffMatchPatch
    • Operation
    • Patch

Class PlainText

Copy detector for plain text files.

Inheritance
System.Object
Base
PlainText
Css
Html
SourceCode
SqlLog
Xml
Inherited Members
Base.Threshold
Base.Sensibility
Base.FilePattern
Base.Load(String)
Base.Load(Utils.OS, String, String, String, String)
Base.Load(Utils.OS, String, String, String, Int32, String)
Namespace: AutoCheck.Core.CopyDetectors
Assembly: AutoCheck.Core.dll
Syntax
public class PlainText : Base

Constructors

| Improve this Doc View Source

PlainText(Single, Int32, String)

Creates a new instance, setting up its properties in order to allow copy detection with the lowest possible false-positive probability.

Declaration
public PlainText(float threshold, int sensibility, string filePattern = "*.txt")
Parameters
Type Name Description
System.Single threshold
System.Int32 sensibility
System.String filePattern
| Improve this Doc View Source

PlainText(Single, String)

Creates a new instance, setting up its properties in order to allow copy detection with the lowest possible false-positive probability.

Declaration
public PlainText(float threshold, string filePattern = "*.txt")
Parameters
Type Name Description
System.Single threshold
System.String filePattern

Properties

| Improve this Doc View Source

Count

The quantity of files loaded.

Declaration
public override int Count { get; }
Property Value
Type Description
System.Int32
Overrides
Base.Count
| Improve this Doc View Source

Diffs

Declaration
protected List<Diff>[, ] Diffs { get; set; }
Property Value
Type Description
List<Diff>[,]
| Improve this Doc View Source

Files

Declaration
protected List<PlainText.File> Files { get; set; }
Property Value
Type Description
List<PlainText.File>
| Improve this Doc View Source

Index

Declaration
protected Dictionary<string, int> Index { get; set; }
Property Value
Type Description
Dictionary<System.String, System.Int32>
| Improve this Doc View Source

LineCountWeight

The weight that line counting (different documents with the same amount of lines) will have when computing the global matching percentage.

Declaration
protected float LineCountWeight { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

Matches

Declaration
protected float[, ] Matches { get; set; }
Property Value
Type Description
System.Single[,]
| Improve this Doc View Source

SentenceMatchWeight

The weight that sentence matching (different documents with the same sentences within) will have when computing the global matching percentage.

Declaration
protected float SentenceMatchWeight { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

WordCountWeight

The weight that word counting (different documents with the same amount of words) will have when computing the global matching percentage.

Declaration
protected float WordCountWeight { get; set; }
Property Value
Type Description
System.Single

Methods

| Improve this Doc View Source

Compare()

Compares all the previously loaded files, between each other.

Declaration
public override void Compare()
Overrides
Base.Compare()
| Improve this Doc View Source

CopyDetected(String)

Checks if a potential copy has been detected. The Compare() method should be called firts.

Declaration
public override bool CopyDetected(string path)
Parameters
Type Name Description
System.String path

The path to a compared file.

Returns
Type Description
System.Boolean

True of copy has been detected.

Overrides
Base.CopyDetected(String)
| Improve this Doc View Source

Dispose()

Disposes the current copy detector instance and releases its internal objects.

Declaration
public override void Dispose()
Overrides
Base.Dispose()
| Improve this Doc View Source

GetDetails(String)

Returns a printable details list, containing information about the comparissons (student, source and % of match).

Declaration
public override (string Folder, string File, (string Folder, string File, float Match)[] matches) GetDetails(string path)
Parameters
Type Name Description
System.String path

Path where the files has been loaded.

Returns
Type Description
System.ValueTuple<System.String, System.String, System.ValueTuple<System.String, System.String, System.Single>[]>

Left file followed by all the right files compared with its matching score.

Overrides
Base.GetDetails(String)
| Improve this Doc View Source

Load(String, String)

Loads the given file into the local collection, in order to compare it when Compare() is called.

Declaration
public override void Load(string folder, string file)
Parameters
Type Name Description
System.String folder

Path where the files will be looked for.

System.String file

File that will be loaded into the copy detector.

Overrides
Base.Load(String, String)

Extension Methods

ObjectExtensions.DeepClone<T>(T)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX