Go client for GRAAL-Research/deepparse's HTTP API.
Import the Go library and create a client to start parsing addresses. Requires a running instance of deepparse.
httpClient := &http.Client{
Timeout: 5 * time.Second,
}
cc := NewClient(httpClient, "http://localhost:8000")
ctx := context.Background()
resp, err := cc.ParseAddresses(ctx, ModelBPEmbAttention, []string{
"350 rue des Lilas Ouest Quebec city Quebec G1L 1B6",
"2325 Rue de l'Université, Québec, QC G1V 0A6",
})
// handle resp.Addresses
The tests require pulling the ghcr.io/graal-research/deepparse image.
Pull and start the container before running Go tests:
$ docker compose up -d # takes a while to download and load data
$ go test ./...
ok github.com/adamdecaf/deepparse-go 0.773s
MIT Licensed