To get the most out of the book, run all the code provided in the book using Google Colab.
Software/Hardware requirements |
Operating System |
Google Colab / Python 3.x |
Windows/macOS/Linux |
Download the example code files
You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Getting-Started-with-Google-BERT. In case there's an update to the code, it will be updated on the existing GitHub repository.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Download the color images
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781838821593_ColorImages.pdf.
Conventions used
There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "We will set maxlen to 100 and max_features to 100000."
A block of code is set as follows:
(x_train, y_train), (x_test, y_test), preproc = \
text.texts_from_df(train_df = df,
text_column = 'reviewText',
label_columns=['sentiment'],
maxlen=100,
max_features=100000,
preprocess_mode='bert',
val_pct=0.1)
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Select System info from the Administration panel."