Rename library
Signed-off-by: András Schmelczer <andras@schmelczer.dev>
This commit is contained in:
parent
8708b157eb
commit
eb7ddf1496
141 changed files with 844 additions and 842 deletions
|
|
@ -7,6 +7,6 @@ mkdir ss-data && cd ss-data
|
|||
wget https://s3-us-west-2.amazonaws.com/ai2-s2-research-public/open-corpus/2022-02-01/manifest.txt
|
||||
wget -B https://s3-us-west-2.amazonaws.com/ai2-s2-research-public/open-corpus/2022-02-01/ -i manifest.txt
|
||||
cd -
|
||||
python3 -m good_ai.open_s3 --secrets s3.ini --push ss-data
|
||||
python3 -m great_ai.open_s3 --secrets s3.ini --push ss-data
|
||||
rm -rf ss-data
|
||||
```
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ from random import shuffle
|
|||
from devtools import debug
|
||||
from predict_domain import predict_domain
|
||||
|
||||
from good_ai import process_batch
|
||||
from great_ai import process_batch
|
||||
|
||||
if __name__ == "__main__":
|
||||
with open(".cache/data-1/s2-corpus-323.json") as f:
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
from predict_domain import predict_domain
|
||||
|
||||
from good_ai import serve
|
||||
from great_ai import serve
|
||||
|
||||
if __name__ == "__main__":
|
||||
serve(predict_domain)
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ from preprocess import preprocess
|
|||
from pydantic import BaseModel
|
||||
from sklearn.pipeline import Pipeline
|
||||
|
||||
from good_ai import log_argument, log_metric, use_model
|
||||
from good_ai.utilities.clean import clean
|
||||
from great_ai import log_argument, log_metric, use_model
|
||||
from great_ai.utilities.clean import clean
|
||||
|
||||
|
||||
class DomainPrediction(BaseModel):
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import re
|
||||
|
||||
from good_ai.utilities.lemmatize_text import lemmatize_text
|
||||
from great_ai.utilities.lemmatize_text import lemmatize_text
|
||||
|
||||
|
||||
def preprocess(text: str) -> str:
|
||||
lemmas = [re.sub(r"\d+", "NUM", lemma) for lemma in lemmatize_text(text)]
|
||||
lemmas = [re.sub(r"\d[\d.,]*", "NUM", lemma) for lemma in lemmatize_text(text)]
|
||||
return " ".join(lemmas)
|
||||
|
|
|
|||
1576
example/train.ipynb
1576
example/train.ipynb
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue