Skip to content

Commit

Permalink
tureng-cli.sh improved to use all commands as bash script
Browse files Browse the repository at this point in the history
  • Loading branch information
mebaysan committed Oct 8, 2022
1 parent 76bd867 commit 52631eb
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tureng-cli.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#! /bin/bash

SEARCH_TERM=$1
N_RESULT=15

python3 -m tureng_cli translate -w "$SEARCH_TERM" -n 15
if [[ -n $3 ]]; then
N_RESULT=$3
fi


if [[ $1 != "translate" && $1 != "sentence" && $1 != "synonym" ]]; then
python3 -m tureng_cli translate -w "$1" -n $N_RESULT
else
python3 -m tureng_cli $1 -w "$2" -n $N_RESULT
fi

0 comments on commit 52631eb

Please sign in to comment.