public Sentence(String text, Article article) { this._article = article; this._text = text; this._createdAt = DateTime.Now; this._updatedAt = DateTime.Now; }
public NotenizerSentence(Annotation annotation, Article article) { _annotation = annotation; _sentence = new Sentence(this.ToString(), article); _structure = new NotenizerStructure(GetDepencencies(annotation)); }
/// <summary> /// Gets article from database or creates a new one, if not found. /// </summary> /// <param name="text">Text of article</param> /// <returns></returns> private Article GetArticle(String text) { Article article; List<BsonDocument> articles = DB.GetAll(DBConstants.ArticlesCollectionName, DocumentCreator.CreateFilter(DBConstants.TextFieldName, text)).Result; if (articles.Count == 0) { article = new Article(String.Empty, DateTime.Now, DateTime.Now, text); article.ID = DB.InsertToCollection(DBConstants.ArticlesCollectionName, DocumentCreator.CreateArticleDocument(article)).Result; } else article = DocumentParser.ParseArticle(articles[0]); return article; }