Skip to content

Commit

Permalink
Temporarily remove blobbing from plagiarism to prepare for integratio…
Browse files Browse the repository at this point in the history
…n with Submitty (#39)

* Restrict reports to top matches

* Compare in the correct order

* Avoid blobify altogether at first to determine course of action

* Increase winnowing bounds for C

* Fix tilde/exclamation mark lexer bug for C

* Add depth counter

* Update version
  • Loading branch information
chameco authored and bmcutler committed Jul 24, 2017
1 parent fdd3698 commit 15aa0d5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lichen.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: lichen
version: 0.2.3
version: 0.2.4
synopsis: Plagiarism Detection and Other Static Analysis
description: Please see README.md
homepage: https://github.com/Submitty/AnalysisTools
Expand Down
2 changes: 1 addition & 1 deletion src/Lichen/Config/Languages.hs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ langDummy :: Language
langDummy = Language [] dummy (WinnowConfig 0 0) (const $ pure ()) dummy

langC :: Language
langC = Language [".c", ".h", ".cpp", ".hpp", ".C", ".H", ".cc"] C.lex (WinnowConfig 9 5) (smartRead :: String -> Erring C.Tok) dummy
langC = Language [".c", ".h", ".cpp", ".hpp", ".C", ".H", ".cc"] C.lex (WinnowConfig 16 9) (smartRead :: String -> Erring C.Tok) dummy

langPython :: Language
langPython = Language [".py"] Python.lex (WinnowConfig 16 9) (smartRead :: String -> Erring Python.Tok) Python.parse
Expand Down
2 changes: 1 addition & 1 deletion src/Lichen/Plagiarism/Render/Compare.hs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ renderBoth dir (fp, t) (fp', t') = do
s' <- T.IO.readFile (dir </> sq t')
let es = T.replace "\t" " " s
es' = T.replace "\t" " " s'
(p, p') = blobify (toPosList es fp) (toPosList es' fp')
(p, p') = (toPosList es fp, toPosList es' fp')
return (mconcat . fmap colorize $ splitInto es p, mconcat . fmap colorize $ splitInto es' p')

renderCompare :: (Show a, Eq a) => FilePath -> (Double, (Fingerprints, a), (Fingerprints, a)) -> IO H.Html
Expand Down

0 comments on commit 15aa0d5

Please sign in to comment.