tagging

Database design for Tagging multiple types of entities

家住魔仙堡 提交于 2019-12-20 09:47:31
问题 I'm currently designing a database schema that's used to store recipes. In this database there are different types of entities that I want to be able to tag (ingredients, recipe issuers, recipes, etc). So a tag has multiple n:m relations. If I use the "three table design", this would result in tables (cross table) for every entity type (recipes, ingredients, issuers) that I have. In other words every time I introduce an entity I have to add a cross table for it. I was thinking of creating one

Mac OS X : add a custom meta data field to any file

坚强是说给别人听的谎言 提交于 2019-12-20 08:39:12
问题 I would like to me able to set (and get) a custom metadata attribute for any file. What is the best way to do this? Thanks 回答1: The OpenMeta framework is a de-facto third-party standard for adding metadata to OS X files using extended attributes. It is used by a number of third-party applications. 回答2: Custom attribute names work for me: $ xattr -w com.apple.metadata:MyAttribute gfdylvyieo a.txt $ mdls -n MyAttribute a.txt MyAttribute = "gfdylvyieo" $ mdfind gfdylvyieo /private/tmp/a.txt $

use :tjump instead of :tag vim on pressing ctrl-]

时光毁灭记忆、已成空白 提交于 2019-12-19 00:57:53
问题 in vim, when i press ctrl-] 1) the usual behavior: it goes to the first matching tag with the word under the cursor, after that we need to do :tjump separately to see a list of all matching tags and then jump to the desired tag. 2) what i want is: vim should search the tag file, if there are multiple matches, show me a list of all the matching tags if there is one match, simply jump to the matching tag (just like :tjump does) this behavior(2) already happens when we use g-ctrl-] , but i want

Count verbs, nouns, and other parts of speech with python's NLTK

江枫思渺然 提交于 2019-12-18 12:14:44
问题 I have multiple texts and I would like to create profiles of them based on their usage of various parts of speech, like nouns and verbs. Basially, I need to count how many times each part of speech is used. I have tagged the text but am not sure how to go further: tokens = nltk.word_tokenize(text.lower()) text = nltk.Text(tokens) tags = nltk.pos_tag(text) How can I save the counts for each part of speech into a variable? 回答1: The pos_tag method gives you back a list of (token, tag) pairs:

Scaling Web Applications and Tagging - Digg, Del.icio.us, StackOverflow

寵の児 提交于 2019-12-18 11:37:45
问题 How do websites like Digg, Del.icio.us, and StackOverflow implement tagging? I know this other question has an accepted answer of a many-to-many relation with a cross ref table. But how do the "big boys" do it? The same way? How is it scaling? 回答1: Here is the oft-quoted article which breaks down tagging schemas by real performance metrics: http://tagging.pui.ch/post/37027746608/tagsystems-performance-tests The author notes that the founder of delicious explains using an RDBMS for tagging

Is there an agreed ideal schema for tagging

对着背影说爱祢 提交于 2019-12-18 10:04:10
问题 I have a photo website and i want to support tags as my original category bucketing is starting to fail (some pictures are family and vacations, or school and friends). Is there an agreed tagging db schema? I still want to support having photos as part of an album. Right now i have a few tables: Photos PhotoID PhotoAlbumID Caption Date Photo Album AlbumID AlbumName AlbumDate 回答1: There are various schemas which are effective, each with their own performance implications for the common queries

Facial recognition/detection PHP or software for photo and video galleries

孤者浪人 提交于 2019-12-18 09:54:09
问题 I have a very large photo gallery with thousands of similar people, objects, locations, things. The majority of the people in the photos have their own user accounts and avatar photos to match. There are also logical short lists of people potentially in the photo based on additional data available for each photo. I allow users to tag photos with their friends and people they know but an automated process would be better. I've used photo tagger/finder from face.com integrating with Facebook

Need help with sql query to find things tagged with all specified tags

为君一笑 提交于 2019-12-17 22:57:07
问题 Let's say I have the following tables: TAGS id: integer name: string POSTS id: integer body: text TAGGINGS id: integer tag_id: integer post_id: integer How would I go about writing a query that select all posts that are tagged with ALL of the following tags (name attribute of tags table): "Cheese", "Wine", "Paris", "Frace", "City", "Scenic", "Art" See also: Need help with sql query to find things with most specified tags (note: similar, but not a duplicate!) 回答1: Using IN: SELECT p.* FROM

Python NLTK: How to tag sentences with the simplified set of part-of-speech tags?

一笑奈何 提交于 2019-12-17 22:22:56
问题 Chapter 5 of the Python NLTK book gives this example of tagging words in a sentence: >>> text = nltk.word_tokenize("And now for something completely different") >>> nltk.pos_tag(text) [('And', 'CC'), ('now', 'RB'), ('for', 'IN'), ('something', 'NN'), ('completely', 'RB'), ('different', 'JJ')] nltk.pos_tag calls the default tagger, which uses a full set of tags. Later in the chapter a simplified set of tags is introduced. How can I tag sentences with this simplified set of part-of-speech tags?

How do i implement tag searching? with lucene?

﹥>﹥吖頭↗ 提交于 2019-12-17 17:41:33
问题 I havent used lucene. Last time i ask (many months ago, maybe a year) people suggested lucene. If i shouldnt use lucene what should i use? As am example say there are items tagged like this apples carrots apples carrots apple banana if a user search apples i dont care if there is any preference from 1,2 and 4. However i seen many forums do this which i HATED is when a user search apple carrots 2 and 3 have high results while 1 is hard to find even though it matches my search more closely.