You are great! I have forked drum and plan to do some modifications. Is there any best practise to setup a development environment? Or just run `python setup.py install` each time after I change the source code.
On Fri, Jul 15, 2016 at 1:20 PM Stephen McDonald <[email protected]> wrote: > On Fri, Jul 15, 2016 at 2:33 PM, Lyric Wei <[email protected]> wrote: > >> I think the fix you mentioned is correct. If I recall it's related to a >>> change between Django 1.8 and 1.9, and we made the same fix in Mezzanine >>> already, but Drum was not updated presumably. I can submit the fix if you >>> really don't want to, but I encourage you to. >>> >>> >> Oh, I am glad to do that.. I don't find source code of Mezzanine in Drum >> project, but I got this: >> https://github.com/stephenmcd/drum/blob/master/setup.py#L54 . Since you >> have made the fix in latest Mezzanine, I can simply change this line, from >> "mezzanine >= 4.0.1" to "mezzanine >= 4.1.0", am i right? >> > > That needs to happen, but it's separate from the fix - what I meant was > that Drum literally needs the same change that was applied to Mezzanine. > > I've bumped the version here: > https://github.com/stephenmcd/drum/commit/177a202e012ac4c65a5aa2aa289b11008a1c62b7 > And made the fix here: > https://github.com/stephenmcd/drum/commit/7b327615a93ee4fa04d595b53d20f9d9f34db925 > > >> >> That's excellent info, thanks for going into detail there. >>> >>> Do you think it's possible to programmatically extract tags in those >>> languages, using different logic? If so we can make the extract function >>> configurable by the developer. >>> >> >> Yes. Search engines like Google need this kind of technology to create >> indexes for each words to support different languages. And there are >> several existed open source projects to extract tags in those languages. >> >> A famous project named JieBa(https://github.com/fxsjy/jieba): a chinese >> text segmentation project in Python, which use dictionary and statistical >> result to extract words, also works for Japanese if we provide suitable >> dictionary. >> > > I've made the tag extraction configurable now, see here: > https://github.com/stephenmcd/drum/commit/147984d813c54996e0b97f32959fdd3992bf509d > > >> >> >> On Friday, July 15, 2016 at 7:38:45 AM UTC+8, Stephen McDonald wrote: >> >>> >>> >>> On Thu, Jul 14, 2016 at 5:31 PM, Lyric Wei <[email protected]> wrote: >>> >>>> > If you have a bug fix, please go ahead and submit it in a pull >>>> request via Github. >>>> >>>> I am trying to fix it, not yet. I am not familiar with django. But I >>>> though it's a bug in mezzanine.core.models. >>>> >>> >>> I think the fix you mentioned is correct. If I recall it's related to a >>> change between Django 1.8 and 1.9, and we made the same fix in Mezzanine >>> already, but Drum was not updated presumably. I can submit the fix if you >>> really don't want to, but I encourage you to. >>> >>> >>>> >>>> > What do you mean? >>>> >>>> I am requesting a new feature, the tags should support non-character >>>> based languages, like Japanese, Arabic, Chinese, etc. >>>> >>>> the current keywords extract approach doesn't support those languages. >>>> >>>> Maybe we can allow user to add tag when they add new links, manually >>>> adding tags, but simple. >>>> >>>> or >>>> >>>> Drum support different keywords extract approaches, to extract keywords >>>> from non-character based languages. >>>> >>>> Btw, words in those non-character based languages are not split by >>>> *space* and *symbols*.That's why I say "different keywords extract >>>> approaches". for example, >>>> >>>> In English, we say "This morning, the weather is good", can be split as >>>> "This", "morning", "the", "weather", "is", "good" by space and symbols. >>>> >>>> In Japanese, we say 今朝は天気が良いです, can be split as "今朝", "は", "天気", "が", >>>> "良い", "です", according to the grammar, not the space and symbols. >>>> >>>> In Chinese, we say 今天早上天气不错, can be split as "今天", "早上", "天气", "不错", >>>> according to the grammar either, not the space and symbols. >>>> >>> >>> That's excellent info, thanks for going into detail there. >>> >>> Do you think it's possible to programmatically extract tags in those >>> languages, using different logic? If so we can make the extract function >>> configurable by the developer. >>> >>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Thursday, July 14, 2016 at 3:11:21 PM UTC+8, Stephen McDonald wrote: >>>> >>>>> >>>>> >>>>> On Thu, Jul 14, 2016 at 4:54 PM, Lyric Wei <[email protected]> wrote: >>>>> >>>>>> Thank you for quick response. Now django show me the follow error >>>>>> message in /usr/local/lib/python2.7/dist-packages/drum/links/models.py >>>>>> >>>>>> > self.keywords.add(AssignedKeyword(keyword=keyword)) >>>>>> >>>>>> > instance isn't saved. Use bulk=False or save the object first. >>>>>> >>>>>> I check out the code and found how to resolve it. I have to pass >>>>>> bulk=False to save method to bypass. >>>>>> >>>>> >>>>> If you have a bug fix, please go ahead and submit it in a pull request >>>>> via Github. >>>>> >>>>> >>>>>> >>>>>> Oh yes, the more important question. Is it possible to add an existed >>>>>> tag manually when user adding a link? >>>>>> >>>>>> Because I am using drum for international site, a lot of languages, >>>>>> like Japanese, Korean, Arabic, Chinese, are not supported by the keyword >>>>>> extract method drum is using, which i found it in `save` method. >>>>>> >>>>> >>>>> What do you mean? >>>>> >>>>> >>>>>> >>>>>> I though there are two approaches to solve the problem, to support >>>>>> different language: >>>>>> >>>>>> 1. allow visitors who submit the link to add tags either. >>>>>> 2. allow drum to support different word extract method, which i >>>>>> suppose the user can specified in settings.py. >>>>>> >>>>>> I thought the first is easy, but 2nd is more powerful. >>>>>> >>>>>> On Thursday, July 14, 2016 at 9:53:22 AM UTC+8, Stephen McDonald >>>>>> wrote: >>>>>>> >>>>>>> In Mezzanine they're called "keywords", so you should see that. >>>>>>> >>>>>>> I've just updated the readme to mention that. >>>>>>> >>>>>>> On Wed, Jul 13, 2016 at 10:31 PM, Lyric Wei <[email protected]> >>>>>>> wrote: >>>>>>> >>>>>>>> Hi there, >>>>>>>> >>>>>>>> I am using drum(https://github.com/stephenmcd/drum) as a news >>>>>>>> social website. drum is a Reddit / Hacker News clone for Mezzanine. >>>>>>>> >>>>>>>> Its document mentioned that >>>>>>>> >>>>>>>> > This means that for auto-tagging to work, the tags must already >>>>>>>> exist in the database. You can either add them manually via the >>>>>>>> admin... >>>>>>>> >>>>>>>> But I can't find the way to add existed tags in the admin panel. >>>>>>>> Could you help me? >>>>>>>> >>>>>>>> Thank you. >>>>>>>> >>>>>>>> -- >>>>>>>> You received this message because you are subscribed to the Google >>>>>>>> Groups "Mezzanine Users" group. >>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>> send an email to [email protected]. >>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Stephen McDonald >>>>>>> http://jupo.org >>>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Mezzanine Users" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected]. >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Stephen McDonald >>>>> http://jupo.org >>>>> >>>> >>> >>> >>> -- >>> Stephen McDonald >>> http://jupo.org >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Mezzanine Users" group. >> > To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. > > >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Stephen McDonald > http://jupo.org > -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
