source: other-projects/maori-lang-detection/src/org/greenstone/atea/morphia/SentenceInfo.java@ 33653

Last change on this file since 33653 was 33653, checked in by ak19, 4 years ago
  1. As suggested by Dr Bainbridge, made the code changes to use Morphia as ODM for MongoDB (Object Document Mapper, ODM for MongoDB is equivalent to what ORM is to RDBMS). 2. Adding jar files to get this to work. 3. Further changes to store site folder names of form ##### as primary key of Websites collection. However, may in a future commit decide to store a reference to a WebsiteInfo object (representing a JSON document in a Websites MongoDB collection) inside a WebpageInfo object. 4. The MongoDB collections are now called Websites and Webpages, not websites and webpages. 5. geolocation of site now stored as field in Websites mongodb collection. And containsMRI now stored as field in Webpages collection of mongoDB. 6. Tried out some mongodb query commands based on what Dr Bainbridge did yesterday.
File size: 443 bytes
Line 
1package org.greenstone.atea.morphia;
2
3import dev.morphia.annotations.*;
4
5@Entity("Sentences")
6public class SentenceInfo {
7 public final double confidenceLevel;
8 /** 3 letter lang code */
9 public final String langCode;
10 public final String sentence;
11
12 public SentenceInfo(double confidence, String langCode, String sentence) {
13 this.confidenceLevel = confidence;
14 this.langCode = langCode;
15 this.sentence = sentence;
16 }
17}
Note: See TracBrowser for help on using the repository browser.