tagging

How to implement tagging system similar to SO in php/mysql?

随声附和 提交于 2019-12-02 16:01:41
I'm coding a website in PHP/MySQL and I'd like to implement a similar to stackoverflow tagging engine. I have 3 relevant tables in DB: 1. Items 2. Tags 3. ItemTagMap (maps tags to items, n:n mapping) Now, on search page I'd like to show distinct list of all tags for entire search result (not just the current page), so that users can "refine" their search by adding/removing tags from that tag list. The question is that it's a pretty heavy query on the DB and there can be tons of search requests that result in different result sets and thus different tag sets. Does anyone know how to implement

Is there any Treebank for free? [closed]

。_饼干妹妹 提交于 2019-12-02 15:53:57
Is any place I can download Treebank of English phrases for free or less than $100? I need training data containing bunch of syntactic parsed sentences (>1000) in English in any format. Basically all I need is just words in this sentences being recognized by part of speech. cyborg NLTK (for Python) offers several treebanks for free . Here are a couple (English) treebanks available for free: American National Corpus: MASC Questions: QuestionBank and Stanford's corrections British news: BNC TED talks: NAIST-NTT TED Treebank Georgetown University Multilayer Corpus: GUM Biomedical: NaCTeM GENIA

Unsupervised automatic tagging algorithms?

牧云@^-^@ 提交于 2019-12-02 14:07:12
I want to build a web application that lets users upload documents , videos , images , music , and then give them an ability to search them. Think of it as Dropbox + Semantic Search. When user uploads a new file, e.g. Document1.docx , how could I automatically generate tags based on the content of the file? In other words no user input is needed to determine what the file is about. If suppose that Document1.docx is a research paper on data mining, then when user searches for data mining , or research paper , or document1 , that file should be returned in search results, since data mining and

How do I determine what branch/tag I have checked out in git?

倖福魔咒の 提交于 2019-12-01 08:12:42
I clone my source using git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git w/ . Then I specify a specific branch/tag by doing git checkout <tag name> or git checkout origin/REL<release number> . Sometimes I forget what branch or tag I'm on. In SVN I would do a svn info to figure out what branch/tag I'm using (I realize that git has distinct definitions for branch and tag but for my purposes they are the same). How do I determine what branch/tag I am on? git branch tells you what branch you're on (with a * marker). Tags are just names for revisions, so Git won't tell you that you're

How do I determine what branch/tag I have checked out in git?

人走茶凉 提交于 2019-12-01 06:34:47
问题 I clone my source using git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git w/ . Then I specify a specific branch/tag by doing git checkout <tag name> or git checkout origin/REL<release number> . Sometimes I forget what branch or tag I'm on. In SVN I would do a svn info to figure out what branch/tag I'm using (I realize that git has distinct definitions for branch and tag but for my purposes they are the same). How do I determine what branch/tag I am on? 回答1: git branch tells you

Designing tag system that can tag multiple db tables

独自空忆成欢 提交于 2019-12-01 00:05:19
I am wanting to allow users to tag items so that they can search for them using tags. What is the best way of achieving this cleanly? So far the solution I have come up with only involves adding two extra tables to my current db system. <db Trackable product 1> int id; info etc </> <db Trackable product 2> int id; info etc </> //defines the M:M relationship between Tag and various types of Trackable products <db TagLink> int trackableProd1Id int trackableProd2Id int tagId </> <db Tag> int tagId tag name etc </> Is this a good way to go about it? A benefit of this approach is that it should

Designing tag system that can tag multiple db tables

时光毁灭记忆、已成空白 提交于 2019-11-30 18:18:34
问题 I am wanting to allow users to tag items so that they can search for them using tags. What is the best way of achieving this cleanly? So far the solution I have come up with only involves adding two extra tables to my current db system. <db Trackable product 1> int id; info etc </> <db Trackable product 2> int id; info etc </> //defines the M:M relationship between Tag and various types of Trackable products <db TagLink> int trackableProd1Id int trackableProd2Id int tagId </> <db Tag> int

Union and Intersect in Django

风流意气都作罢 提交于 2019-11-30 11:20:06
问题 class Tag(models.Model): name = models.CharField(maxlength=100) class Blog(models.Model): name = models.CharField(maxlength=100) tags = models.ManyToManyField(Tag) Simple models just to ask my question. I wonder how can i query blogs using tags in two different ways. Blog entries that are tagged with "tag1" or "tag2": Blog.objects.filter(tags_in=[1,2]).distinct() Blog objects that are tagged with "tag1" and "tag2" : ? Blog objects that are tagged with exactly "tag1" and "tag2" and nothing

Best DB (MySQL) structure: Articles which contain favored tags

自闭症网瘾萝莉.ら 提交于 2019-11-30 10:27:58
I've built a news site: - The articles are shown on the front page ordered by date. The newest one first. - The news are in the table "news" with the fields "id", "title", "text" and some other ones. - All articles are tagged with 1-5 relevant tags. - The tags are in the table "tags" with the fields "id", "tag", "article" and some other ones. - The field "article" of "tags" fits to the field "id" of "news". Now I want to give the user the opportunity to add tags to his "favored tags list". Then the user should only see news articles which contain one of the favored tags. Assuming the user Bob

How to impliment a Part-of-Speech (POS) tagger

拟墨画扇 提交于 2019-11-30 04:57:56
问题 I'm looking for the best PHP-based way to scan a lot of text entries (classifieds) and pull out keywords - anyone know about Part-of-Speech tagging? Is there a PHP-ish way to do this? I scan a lot of online classifieds - but none with categories! To speed up the categorization process, I'm looking to install a Part-of-Speech tagger (http://en.wikipedia.org/wiki/Part-of-speech_tagging). Basically, these are cool text-parsing algorithmic software bundles that can tell me what words are nouns