Package ai.djl.basicdataset.nlp
Class CookingStackExchange
- java.lang.Object
-
- ai.djl.basicdataset.nlp.CookingStackExchange
-
- All Implemented Interfaces:
ai.djl.training.dataset.Dataset
,ai.djl.training.dataset.RawDataset<java.nio.file.Path>
public class CookingStackExchange extends java.lang.Object implements ai.djl.training.dataset.RawDataset<java.nio.file.Path>
A text classification dataset contains questions from cooking.stackexchange.com and their associated tags on the site.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CookingStackExchange.Builder
A builder to construct aCookingStackExchange
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CookingStackExchange.Builder
builder()
Creates a builder to build aCookingStackExchange
.java.nio.file.Path
getData()
java.lang.Iterable<ai.djl.training.dataset.Batch>
getData(ai.djl.ndarray.NDManager manager)
void
prepare(ai.djl.util.Progress progress)
-
-
-
Method Detail
-
getData
public java.nio.file.Path getData() throws java.io.IOException
- Specified by:
getData
in interfaceai.djl.training.dataset.RawDataset<java.nio.file.Path>
- Throws:
java.io.IOException
-
getData
public java.lang.Iterable<ai.djl.training.dataset.Batch> getData(ai.djl.ndarray.NDManager manager)
- Specified by:
getData
in interfaceai.djl.training.dataset.Dataset
-
prepare
public void prepare(ai.djl.util.Progress progress) throws java.io.IOException
- Specified by:
prepare
in interfaceai.djl.training.dataset.Dataset
- Throws:
java.io.IOException
-
builder
public static CookingStackExchange.Builder builder()
Creates a builder to build aCookingStackExchange
.- Returns:
- a new builder
-
-