Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
damesek committed Oct 31, 2023
1 parent 20effb0 commit d44b6f2
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ In project.clj, please add the Java source path.
```
![GUI init](resources/gui.png)

GUI namespace functions:

- [**save-image-berkley**](): on the picture, the right graph
- [**save-image-whatswrong**](): on the picture, the left graph
- [**save-image-to-resources**](): save both image

## FUNCTIONS

Expand Down Expand Up @@ -482,7 +487,45 @@ E.g. spell checking
["." "." "PUNCT" "_" "*))"])})
```

### Save image Berkley

Retrieves a visual representation of the parsed sentence using the
`get-buffered-image` function and saves it as a PNG image to the specified path.

```clojure
(require '[eszterlanc.gui :as gui])

(gui/save-image-berkley "Ez egy teszt, amit nagyon jó lett." "temp.png")
```

![save-image-berkley](temp.png)

### Save image whatswrong

Retrieves a visual representation of the parsed sentence using the
`get-image-from-bytes` function and saves it as a PNG image to the specified path.

```clojure
(save-image-whatswrong "Ez egy teszt, amit nagyon jó lett." "temp-w.png")
```

![save-image-whatswrong](temp-w.png)



### Save image to resources

Save both image export with one call.
Obtains two visual representations of the parsed sentence: one via
`get-buffered-image` and another via `get-image-from-bytes`. Both images are
saved as PNG files in the specified directory with distinct filenames
(`image-berkley.png` and `image-whatswrong.png`).

```clojure
(save-image-to-resources "Ez egy teszt, amit nagyon jó lehetett volna."
"resources/magyarlanc-exported-images/")
```

## Tests

Expand Down

0 comments on commit d44b6f2

Please sign in to comment.