guesslang-go

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2023 License: MIT

README

guesslang-go 🔍

GoDoc Test

Go port of yoeo/guesslang. Detects programming language of source code using a deep learning model.

Setup

Dependencies

Requires libtensorflow C API.

On macOS, it can be installed with homebrew:

brew install libtensorflow

Alternatively, for Linux-based systems:

script/install-libtensorflow
Install
go get github.com/robherley/guesslang-go

See example usage in examples/main.go

Caveats

To work around some of the limitations of the Go TensorFlow bindings (and the wrapper library)^1, the SavedModel is embeded in the binary and when a Guesser is initialized, it temporarily writes the model to a directory (and removes it after).

So, in order to use this package, you must at least have a writeable temporary directory that aligns with Go's os.TempDir().

Acknowledgements

Powered by:

Inspired by:

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL