Name: Vincent Song
Date: May 4, 2017
Project Topic: Language Detection
URL:
Data point fields:
language: ...Type: Stringversion: ...Type: Numbersize: ...Type: Numberoriginal: ...Type: Booleancategory: ...Type: Stringorigin: ...Type: Stringcontributor: ...Type: Stringprofile: ...Type: [profileSchema]
Schema:
profileSchema = {
ngram: String,
value: Number
}
languageSchema = {
language: String,
version: 0,
size: Number,
original: Boolean,
category: String,
origin: String,
contributor: String,
profile: [profileSchema]
}
HTML form route: /add
POST endpoint route: /api/add
Example Node.js POST request to endpoint:
var request = require("request");
var options = {
method: 'POST',
url: 'http://localhost:3000/api/add',
headers: {
'content-type': 'application/x-www-form-urlencoded'
},
form: {
sample: 世界人权宣言... <700 characters or more>,
name: "Chinese",
category: "Sino-Tibetan",
origin: "Asia",
contributor: "Vincent Song"
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});GET endpoint route: /api/data
Search Field: Language
Navigation Filters
- Home ->
/ - Asian ->
/filter/asian - Indo-European ->
/filter/european - Romance ->
/filter/romance - Germanic ->
/filter/germanic - Other ->
/filter/other