Created
June 6, 2017 13:50
-
-
Save honwen/81dbfcff871b19273ded5c08f2d6efe3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/Comdex/imgo" | |
"os" | |
) | |
func main() { | |
if len(os.Args) < 3 { | |
fmt.Println("Not enough args") | |
os.Exit(1) | |
} | |
cos, err := imgo.CosineSimilarity(os.Args[1], os.Args[2]) | |
if err != nil { | |
panic(err) | |
} | |
fmt.Printf("%2.0f\n",cos*99 +1) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment