示例#1
0
        public List <EntityInfo> ExtractMentionedScreenNames(string text)
        {
            var result = new List <EntityInfo>();

            if (!string.IsNullOrEmpty(text))
            {
                MentionExtractor.Extract(text, false, result);
            }
            return(result);
        }
示例#2
0
        public List <EntityInfo> ExtractMentionsOrLists(string text)
        {
            var result = new List <EntityInfo>();

            if (!string.IsNullOrEmpty(text))
            {
                MentionExtractor.Extract(text, true, result);
            }
            return(result);
        }
示例#3
0
        public List <EntityInfo> ExtractEntities(string text)
        {
            var result = new List <EntityInfo>();

            if (!string.IsNullOrEmpty(text))
            {
                UrlExtractor.Extract(text, this.ExtractsUrlWithoutProtocol, this._tldDictionary, this._longestTldLength, this._shortestTldLength, result);
                HashtagExtractor.Extract(text, result);
                MentionExtractor.Extract(text, true, result);
                CashtagExtractor.Extract(text, result);
                RemoveOverlappingEntities(result);
            }
            return(result);
        }