Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/yesnault/hashtag

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/yesnault/hashtag

  • v0.0.0-20170128132512-0679bce411de
  • Source
  • Go
  • Socket score

Version published
Created
Source

hashtag

Package hashtag implements extraction of Twitter type hashtags, mentions and replies form text in Go. This package partially ports extraction routines from Twitter's official Java package to Go and runs most of the standard twitter-text conformance tests. It does not yet implement URL extraction (and hence URL/Hashtag overlaps), cashtags and lists

Since the package attempts to closely follow the Twitter-Text Java API, function names may be longer than typical Go package function names

Installation

Note: As the package matures, I plan to move this to gopkg.in

go get github.com/srinathh/hashtag

Usage

Import the package as

import "github.com/srinathh/hashtag"

This package supports the following functions to extract hashtags and mentions with or without position markers. The functions omit # and @ characters (and also their higher unicode number counterparts @ and #) from return values

  • ExtractHashtags(text string) []string
  • ExtractHashtagsWithIndices(text string) []Entity
  • ExtractMentions(text string) []string
  • ExtractMentionsWithIndices(text string) []Entity
  • ExtractReply(text string) string

Documentation

Read the full documentation and examples on GoDoc

FAQs

Package last updated on 28 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc