Code Monkey home page Code Monkey logo

rakun's Issues

Information about keywords that are 2-grams or 3-grams

  1. I have tried the code and it is impressive, however I have some difficulties to show in the output not single words, but 2-grams or 3-grams that represent a keyword for specific text. Any info on how to tune the hyperparameters?

  2. Concerning the hyperparameters could you explain some of them, such as:

  •                "pair_diff_length":2,
    
  •                "bigram_count_threshold":2,
    
  •                "num_tokens":[1,2],
    
  •      "max_similar" : 3, ## n most similar can show up n times
    
  •      "max_occurrence" : 3} ## maximum frequency overall
    

Thanks.

"for loop" in "missing connective" part is a suspected case of bug

Hello, I majored in computer science at Okayama University in Japan.

When I use this algorithm, RaKUn for my NLP task by using Japanese,
I found for loop in "missing connectives" part is a suspected case of bug.

it is following part,
file: __init__.py"
line: 449 ...

for ind in i1_indexes:
                            if ind + 2 in i2_indexes_map:
                                joint_kw = " ".join([
                                    p1, self.raw_text[ind + 1],
                                    self.raw_text[ind + 2]
                                ])
                                final_keywords.append((joint_kw, kw[1]))
                                joint = True

I think if you don't exit this for loop with break, there is a possibility that multiple similar keywords will be added. Is this normal?
Could you please confirm this?

Packages should never overwrite the root logger.

https://github.com/SkBlaz/rakun/blob/master/mrakun/__init__.py#L29

logging.basicConfig(format='%(asctime)s - %(message)s',
                    datefmt='%d-%b-%y %H:%M:%S')
logging.getLogger().setLevel(logging.INFO)

Using getLogger() without any arguments makes it default to a root logger, and thus
overwrites its level against the users wishes. This makes integrating the package into bigger applications
very difficult as it robs control of the logs from the developer.

Although I'm not aware of what the good practice for setting up loggers for a package is, replacing those lines with the following significantly reduces log clutter:

logging.basicConfig(format='%(asctime)s - %(message)s', datefmt='%d-%b-%y %H:%M:%S')
logging.getLogger(__name__).setLevel(logging.INFO)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.