Constructor
new Corpus()
- Source:
- Tutorials:
-
- Tutorial: tests/corpus/CorpusTest.js
Properties:
Name | Type | Description |
---|---|---|
title |
String | This is used to refer to the corpus, and what appears in the url on the main website eg http://fieldlinguist.com/LingLlama/SampleFieldLinguisticsCorpus |
description |
String | This is a short description that appears on the corpus details page |
remote |
String | The git url of the remote eg: git@fieldlinguist.com:LingLlama/SampleFieldLinguisticsCorpus.git |
consultants |
Consultants | Collection of consultants who contributed to the corpus |
datumstates |
DatumStates | Collection of datum states used to describe the state of datums in the corpus |
datumFields |
DatumFields | Collection of datum fields used in the corpus |
conversationfields |
ConversationFields | Collection of conversation-based datum fields used in the corpus |
sessions |
Sessions | Collection of sessions that belong to the corpus |
datalists |
DataLists | Collection of data lists created under the corpus |
permissions |
Permissions | Collection of permissions groups associated to the corpus |
glosser |
Glosser | The glosser listens to orthography/utterence lines and attempts to guess the gloss. |
lexicon |
Lexicon | The lexicon is a list of morphemes, allomorphs and glosses which are used to index datum, and also to gloss datum. |
The initialize function probably checks to see if
the corpus is new or existing and brings it down to
the user's client.
Extends
Members
api
- Source:
backbone-couchdb adaptor set up
buildLexiconFromTeamServer
- Source:
This function takes in a dbname, which could be different
from the current corpus incase there is a master corpus wiht
more/better monolingual data.
buildMorphologicalAnalyzerFromTeamServer
- Source:
This function takes in a dbname, which could be different
from the current corpus in case there is a master corpus with
more/better monolingual data.
corpusMask :Object
- Source:
TODO decide if we want to fetch these from the server, and keep a fossil in the object?
Type:
- Object
getFrequentDatumFields
- Source:
This function takes in a dbname, which could be different
from the current corpus incase there is a master corpus wiht
more representative datum
example : https://corpusdev.example.org/lingllama-cherokee/_design/deprecated/_view/get_frequent_fields?group=true
It takes the values stored in the corpus, if set, otherwise it will take the values from this corpus since the window was last refreshed
If a url is passed, it contacts the server for fresh info.
getFrequentDatumTags
- Source:
This function takes in a dbname, which could be different
from the current corpus incase there is a master corpus wiht
more representative datum
example : https://corpusdev.example.org/lingllama-cherokee/_design/deprecated/_view/get_corpus_validationStati?group=true
It takes the values stored in the corpus, if set, otherwise it will take the values from this corpus since the window was last refreshed
If a url is passed, it contacts the server for fresh info.
getFrequentDatumValidationStates
- Source:
This function takes in a dbname, which could be different
from the current corpus incase there is a master corpus wiht
more representative datum
example : https://corpusdev.example.org/lingllama-cherokee/_design/deprecated/_view/get_corpus_validationStati?group=true
It takes the values stored in the corpus, if set, otherwise it will take the values from this corpus since the window was last refreshed
If a url is passed, it contacts the server for fresh info.
glosser :FieldDBGlosser
- Source:
DO NOT store in attributes when saving to pouch (too big)
Type:
- FieldDBGlosser
id
- Source:
Must customize id to the original method since CorpusMask overrides it with "corpus"
newComment :Object
- Source:
This the function called by the add button, it adds a new comment state both to the collection and the model
Type:
- Object
newCorpus
- Source:
Builds a new corpus based on this one (if this is not the team's practice corpus)
newSession
- Source:
Builds a new session in this corpus, copying the current session's fields (if available) or the corpus' session fields.
normalizeFieldWithExistingCorpusFields
- Source:
This function looks for the field's details from the corpus fields, if it exists it returns that field template.
If the field isnt in the corpus' fields exactly, it looks for fields which this field should map to (eg, if the field is codepermanent it can be mapped to anonymouscode)
putInTrash
- Source:
Make the model marked as Deleted, mapreduce function will
ignore the deleted models so that it does not show in the app,
but deleted model remains in the database until the admin empties
the trash.
Also remove it from the view so the user cant see it.
replicateContinuouslyWithCouch
- Source:
- Inherited From:
Synchronize to server and from database.
replicateOnlyFromCorpus
- Source:
- Inherited From:
Pull down corpus to offline pouch, if its there.
saveCorpus
- Source:
Accepts two functions to call back when save is successful or
fails. If the fail callback is not overridden it will alert
failure to the user.
- Adds the corpus to the corpus if it is in the right corpus, and wasn't already there
- Adds the corpus to the user if it wasn't already there
- Adds an activity to the logged in user with diff in what the user changed.
team :Object
- Source:
- Inherited From:
TODO decide if we want to fetch these from the server, and keep a fossil in the object?
Type:
- Object
validDBQueries
- Source:
If more views are added to corpora, add them here