include hashtags in AP metadata
This commit is contained in:
parent
f65e89dbac
commit
507e4b6c6b
|
@ -733,6 +733,13 @@ func jonkjonk(user *WhatAbout, h *Honk) (junk.Junk, junk.Junk) {
|
||||||
t["href"] = m.where
|
t["href"] = m.where
|
||||||
tags = append(tags, t)
|
tags = append(tags, t)
|
||||||
}
|
}
|
||||||
|
ooo := ontologies(h.Noise)
|
||||||
|
for _, o := range ooo {
|
||||||
|
t := junk.New()
|
||||||
|
t["type"] = "Hashtag"
|
||||||
|
t["name"] = o
|
||||||
|
tags = append(tags, t)
|
||||||
|
}
|
||||||
herd := herdofemus(h.Noise)
|
herd := herdofemus(h.Noise)
|
||||||
for _, e := range herd {
|
for _, e := range herd {
|
||||||
t := junk.New()
|
t := junk.New()
|
||||||
|
|
7
fun.go
7
fun.go
|
@ -119,6 +119,13 @@ func xfiltrate() string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var re_hashes = regexp.MustCompile(`(?:^|\W)#[[:alnum:]]+`)
|
||||||
|
|
||||||
|
func ontologies(s string) []string {
|
||||||
|
m := re_hashes.FindAllString(s, -1)
|
||||||
|
return m
|
||||||
|
}
|
||||||
|
|
||||||
type Mention struct {
|
type Mention struct {
|
||||||
who string
|
who string
|
||||||
where string
|
where string
|
||||||
|
|
Loading…
Reference in New Issue