Package: rbpy-rb
ReaderBench PythonInstallWe recommend using virtual environments, as some packages require an exact version.If you only want to use the package do the following:sudo apt-get install python3-pip, python3-venv, python3-devpython3 -m venv rbenv(create virutal environment named rbenv)source rbenv/bin/activate(activate virtual env)pip3 uninstall setuptools && pip3 install setuptools && pip3 install --upgrade pip && pip3 install --no-cache-dir rbpy-rbUse it as in:https://github.com/readerbench/ReaderBench/blob/master/usage.pyIf you want to contribute to the code base of package:sudo apt-get install python3-pip, python3-venv, python3-devgit clone git@git.readerbench.com:ReaderBench/readerbenchpy.git && cd readerbenchpy/python3 -m venv rbenv(create virutal environment named rbenv)source rbenv/bin/activate(activate virtual env)pip3 uninstall setuptools && pip3 install setuptools && pip3 install --upgrade pippip3 install -r requirements.txtpython3 nltk_download.pyOptional: prei-install model for en (otherwise most of the English processings would fail
and ask to run this command):python3 -m spacy download en_core_web_lgIf you want to install spellchecking (hunspell) also you need this non-python libraries:sudo apt-get install libhunspell-1.6-0 libhunspell-dev hunspell-ropip3 install hunspellUsageFor usage (parsing, lemmatization, NER, wordnet, content words, indices etc.)  see fileusage.pyfromhttps://github.com/readerbench/ReaderBenchTipsYou may also need some spacy models which are downloaded through spacy.You have to download these spacy models by yourself, using the command:python3 -m spacy download name_of_the_modelThe logger will also write instructions on which models you need, and how to download them.Developer instructionsHow to use BertOur models are also available in the HuggingFace platform:https://huggingface.co/readerbenchYou can use them directly from HuggingFace:# tensorflow
from transformers import AutoModel, AutoTokenizer, TFAutoModel
tokenizer = AutoTokenizer.from_pretrained("readerbench/RoBERT-base")
model = TFAutoModel.from_pretrained("readerbench/RoBERT-base")
inputs = tokenizer("exemplu de propoziție", return_tensors="tf")
outputs = model(inputs)

# pytorch
from transformers import AutoModel, AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("readerbench/RoBERT-base")
model = AutoModel.from_pretrained("readerbench/RoBERT-base")
inputs = tokenizer("exemplu de propoziție", return_tensors="pt")
outputs = model(**inputs)or from ReaderBench:from rb.core.lang import Lang
from rb.processings.encoders.bert import BertWrapper
from tensorflow import keras

bert_wrapper = BertWrapper(Lang.RO, max_seq_len=128)
inputs, bert_layer = bert_wrapper.create_inputs_and_model()
cls_output = bert_wrapper.get_output(bert_layer, "cls") # or "pool"

# Add decision layer and compile model
# eg. 
# hidden = keras.layers.Dense(..)(cls_output)
# output = keras.layers.Dense(..)(hidden)
# model = keras.Model(inputs=inputs, outputs=[output])
# model.compile(..)

bert_wrapper.load_weights() #must be called after compile

# Process inputs for model
feed_inputs = bert_wrapper.process_input(["text1", "text2", "text3"])
# feed_output = ...
# model.fit(feed_inputs, feed_output, ...)How to use the loggerIn each file you have to initialize the logger:fromrb.utils.rbloggerimportLoggerlogger=Logger.get_logger()logger.info("info msg")logger.warning("warning msg")logger.error()How to push the wheel on piprm -r dist/pip3 install twine wheel./upload_to_pypi.shHow to run rb/core/cscl/csv_parser.pyDo the installing steps from contributionrunpip3 install xmltodictrunEXPORT PYTHONPATH=/add/path/to/repo/readerbenchpy/add json resources in ajsonsdirectory inreaderbenchpy/rb/core/cscl/runcd rb/core/cscl/ && python3 csv_parser.pySupported Date FormatsReaderBench is able to perform conversation analysis from chats and communities. Each utterance must have the time expressed in one of the following formats:%Y-%m-%d %H:%M:%S.%f %Z%Y-%m-%d %H:%M:%S %Z%Y-%m-%d %H:%M %Z%Y-%m-%d %H:%M:%S.%f%Y-%m-%d %H:%M:%S%Y-%m-%d %H:%M
where codifications are extracted fromPython date format codes.