compares essays and rates their similarity - Maple Help

Home : Support : Online Help : Education : EssayTools : EssayTools/DetectPlagiarism

EssayTools[DetectPlagiarism] - compares essays and rates their similarity

 Calling Sequence DetectPlagiarism( essays ) DetectPlagiarism( similarityMatrix )

Parameters

 essays - list or array of strings: the essays to be compared similarityMatrix - numeric Matrix threshold - (optional) float between 0 and 1

Description

 • The DetectPlagiarism command compares essays using the SimilarityScore command and returns list indicating the entries that scored above the specified threshold.
 • Instead of passing in the essays to be compared, a similarity matrix like one generated by the SimilarityScore command can be pregenerated and passed in.
 • The DetectPlagiarism command recommends essays that are so similar that they are likely to be copies of each other, or contain sub-text that is copied.  This is a probabilistic measure and does not guarantee that the similar essays are indeed copies of each other or were copied from the same source.
 • If no two essays exceed the threshold in the similarity comparison, then an empty list, $\left[\right]$, will be returned.  Otherwise, a list of lists will be retured.  Each sublist will contain two integer indices and the similarity score.  For example, [4,5,.695] indicates that essays 4 and 5 received a similarity score of .695, and are therefore likely to be copied from the same source, or copies of each other.
 • The default threshold is .35, and the default similarity metric is the BinaryJaccardCoefficient.  Similarity scores flagged will range from .35 to 1, where numbers closer to 1 indicate more similarity. A score of 1 indicates identical copies.
 • This function is part of the EssayTools package, so it can be used in the short form DetectPlagiarism(..) only after executing the command with(EssayTools). However, it can always be accessed through the long form of the command by using EssayTools[DetectPlagiarism](..).

Examples

 > $\mathrm{with}\left(\mathrm{EssayTools}\right):$
 > $\mathrm{sample}:=\left["a b c d","e f g h","a b y z","a i j k","a b j d"\right]:$
 > $\mathrm{DetectPlagiarism}\left(\mathrm{sample}\right)$
 $\left[\left[{1}{,}{5}{,}{0.6000000000}\right]\right]$ (1)
 > $\mathrm{SimilarityScore}\left({\mathrm{sample}}_{1},{\mathrm{sample}}_{5}\right)$
 $\left[\begin{array}{c}{0.6000000000}\end{array}\right]$ (2)
 > $\mathrm{altScores}:=\mathrm{SimilarityScore}\left(\mathrm{sample},\mathrm{methods}=\left[\mathrm{CosineCoefficient}\right]\right)$
 ${\mathrm{altScores}}{:=}\left[\begin{array}{ccccc}{1.000000000}& {0.}& {0.5000000000}& {0.2500000000}& {0.7500000000}\\ {0.}& {1.000000000}& {0.}& {0.}& {0.}\\ {0.5000000000}& {0.}& {1.000000000}& {0.2500000000}& {0.5000000000}\\ {0.2500000000}& {0.}& {0.2500000000}& {1.000000000}& {0.5000000000}\\ {0.7500000000}& {0.}& {0.5000000000}& {0.5000000000}& {1.000000000}\end{array}\right]$ (3)
 > $\mathrm{DetectPlagiarism}\left(\mathrm{altScores},'\mathrm{threshold}'=0.45\right)$
 $\left[\left[{1}{,}{3}{,}{0.5000000000}\right]{,}\left[{1}{,}{5}{,}{0.7500000000}\right]{,}\left[{3}{,}{5}{,}{0.5000000000}\right]{,}\left[{4}{,}{5}{,}{0.5000000000}\right]\right]$ (4)
 > $\mathrm{Answer1}:="An abacus is a counting device consisting of a frame that holds rods on each of which a specific number of beads are free to move in such a way that each configuration of beads represents a unique number by a form of place-value notation. For example, if each rod holds nine beads, the successive rods could represent units, tens, hundreds, etc., in the decimal counting system, and the number represented by a particular configuration would depend upon how many beads are moved towards the horizontal bar. However, the Chinese abacus uses a more complex system. Each rod contains five beads and two beads separated by a horizontal bar. The five beads represent units, tens, hundreds, etc. and the two beads represent fives, fifties, five hundreds, etc.":$
 > $\mathrm{ReplaceWords}:="An abacus is a machine for counting made up of an enclosure that holds bars on each of which a determined number of beads are free to move in such a way that each arrangement of beads represents a different number by a form of place-value notation. For example, if each bar has nine beads, the successive bars could indicate units, tens, hundreds, etc., in the decimal counting system, and the number represented by a particular arrangement would depend upon how many beads are moved towards the horizontal bar. But, the Chinese abacus uses a more complicated system. Each bar has five beads and two beads divided by a horizontal bar. The five beads denote units, tens, hundreds, etc. and the two beads denote fives, fifties, five hundreds, etc.":$
 > $\mathrm{TextAdded}:="The abacus is an ancient machine dating back thousands of years. An abacus is a counting device consisting of a frame that holds rods on each of which a specific number of beads are free to move in such a way that each configuration of beads represents a unique number by a form of place-value notation. For example, if each rod holds nine beads, the successive rods could represent units, tens, hundreds, etc., in the decimal counting system, and the number represented by a particular configuration would depend upon how many beads are moved towards the horizontal bar. However, the Chinese abacus uses a more complex system. Each rod contains five beads and two beads separated by a horizontal bar. The five beads represent units, tens, hundreds, etc. and the two beads represent fives, fifties, five hundreds, etc. Even today people still use the abacus for counting.":$
 > $\mathrm{IndependentAnswer}:="An abacus is a device used for counting. It is made up of rods and beads. Each rod has 9 beads and represents a digit in a number. The rightmost rod is the ones column, the rod adjacent to that is the tens column, the next rod is the hundreds column, etc. Each bead can slide up and down the rod. The number of beads moved to the top of the rod indicates the digit for that column. For example, an abucus with 7 rods would represent the number 123 by moving one bead to the top of rod #5, two beads to the top of rod #6, and three beads to the top of rod #7.":$
 > $\mathrm{DetectPlagiarism}\left(\left[\mathrm{Answer1},\mathrm{ReplaceWords},\mathrm{TextAdded},\mathrm{IndependentAnswer}\right]\right)$
 $\left[\left[{1}{,}{2}{,}{0.6951219512}\right]{,}\left[{1}{,}{3}{,}{0.8607594937}\right]{,}\left[{2}{,}{3}{,}{0.6483516484}\right]\right]$ (5)