Update .gitignore; improve documentation
Add the `files` directories to the .gitignore to prevent them from being committed again. Update the readme with the latest command line options, and revise method documentation to match implementation.
This commit is contained in:
parent
e11464082b
commit
52373cff45
|
|
@ -1,3 +1,5 @@
|
|||
*.log
|
||||
output.*.txt
|
||||
.vscode
|
||||
files
|
||||
files.*/
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ arguments cannot be passed to a Makefile target.
|
|||
## Options
|
||||
|
||||
```
|
||||
-output string
|
||||
output file (default is stdout)
|
||||
-path string
|
||||
path to the file pool (default "files")
|
||||
-prefix
|
||||
|
|
|
|||
7
main.go
7
main.go
|
|
@ -311,9 +311,10 @@ func (dm *DocumentManager) maybeAssociateFileWithDocument(workItem WorkItem, wor
|
|||
}
|
||||
}
|
||||
|
||||
// compareFiles computes how much two files overlap, on a scale
|
||||
// of 0 to 1 by iterating through the files and identifying lines
|
||||
// that are duplicated.
|
||||
// compareFiles computes how much two files overlap on a scale of 0 to 1 by
|
||||
// iterating through the files and calculating a similarity score that's based
|
||||
// on the number of line-centric differences between the contents of the two
|
||||
// files.
|
||||
func (dm *DocumentManager) compareFiles(f1Number, f2Number int) (float64, error) {
|
||||
f1, err := dm.fcc.GetFileContents(f1Number)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in New Issue