markly

Markov chain for text generation
git clone git://git.yotsev.xyz/markly.git
Log | Files | Refs | README | LICENSE

commit fe80ba0327d942e446ee95f66260a69a259c7b35
parent b89b3f0af00a18e682c002e660e3a8c3d956dbc7
Author: Petar Yotsev <petar@yotsev.xyz>
Date:   Thu, 24 Jun 2021 15:34:25 +0100

Add installation option to makefile and fix README

Diffstat:
MMakefile | 9+++++++++
MREADME.md | 20++++++++++----------
2 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile @@ -11,5 +11,14 @@ $(EXEC): $(OBJECTS) %.o: %.cpp $(CC) -c $(CC_FLAGS) $< -o $@ +install: $(EXEC) + cp -f $(EXEC) /usr/local/bin + chmod 755 /usr/local/bin/$(EXEC) + +uninstall: + rm -f /usr/local/bin/$(EXEC) + clean: rm -f $(EXEC) $(OBJECTS) + +.PHONY: install uninstall diff --git a/README.md b/README.md @@ -18,44 +18,44 @@ To install them on debian: git clone git://git.yotsev.xyz/markly.git cd markly - make + make install ## Usage examples Generating 10000 usernames at order 3 and length 10 that resemble the ones in names.txt: - ./markly -s -f names.txt -o 3 -l 10 -n 10000 + markly -s -f names.txt -o 3 -l 10 -n 10000 Continuously generating usernames at order 3 and length 10: - ./markly -s -f names.txt -o 3 -l 10 -C + markly -s -f names.txt -o 3 -l 10 -C Continuously generating usernames at order 3 and maximum length: - ./markly -s -f names.txt -o 3 -m -C + markly -s -f names.txt -o 3 -m -C Generating a continuous username by resetting the gram when nothing follows: - ./markly -s -f names.txt -o 3 -m -C > username.tmp + markly -s -f names.txt -o 3 -m -C > username.tmp cat username.tmp | tr -d '\n' > username rm username.tmp Generating continuous text resembling that of book.txt: - ./markly -f book.txt -o 5 -m -C + markly -f book.txt -o 5 -m -C Saving a compiled chain for later use: - ./markly -g book.txt -o 3 + markly -g book.txt -o 3 # produces chain.o3 - ./markly -s -g names.txt names -o 3 + markly -s -g names.txt names -o 3 # produces names.o3 Using a compiled chain: - ./markly -c chain.o3 -n 5 -m - ./markly -c names.o3 -n 10000 -l 10 + markly -c chain.o3 -n 5 -m + markly -c names.o3 -n 10000 -l 10 ## Options