Named-Entity-Recognizer | model trained to identify Indian names

 by   adityarai7297 Python Version: Current License: No License

kandi X-RAY | Named-Entity-Recognizer Summary

kandi X-RAY | Named-Entity-Recognizer Summary

Named-Entity-Recognizer is a Python library. Named-Entity-Recognizer has no bugs, it has no vulnerabilities and it has low support. However Named-Entity-Recognizer build file is not available. You can download it from GitHub.

I have gone with an approach to build an entity recognizer with indian names from scratch using a convolutional neural network. This model can be repurposed to classify words into different categories without requiring the context of the words provided appropriate training data is given and the required input dimension changes are done in the model_cnn.py script and predict.py script. First i scraped the names (more than 30,000) then converted them into one hot encoded vectors (all names are converted to lowercase). [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]. a 2d array of dimension 15x26 where each row represents the index of the alphabet used. the word is trimmed or padded to fit the length 15 for a uniform input to the model. Same is done with a corpora of commonly used english words (more than 20,000). These are combined and act as my Xtrain values. A Label array is created which is "1" if the value at that index is an indian name and "0" if otherwise. this acts as my Ytrain values. The process mentioned above is done by running the word_vectorizer.py script. This produces 2 files Xtrain.pkl and Ytrain.pkl which is used for training the CNN. After this the model_cnn.py script is run which takes the above 2 pickle files as input and trains the convolutional model (you can check the code to get details of the layers used). After training is complete for about 50 epochs a training accuracy of 98.5% was reached and the model was saved as "trained_model.h5" file. The predict script takes input from "Input_text.txt" file (this is the file where you will be giving the input) and returns the output on the terminal. I have added a nice gui feature that highlights the Indian Name words in the output. I have included all the files though you will only be needing "trained_model.h5" , "predict.py" and "Input_text.txt". I've taken additional efforts to make execution as simple as possible. activate the environment you have been working on cd to the directory where these files are present execute word_vectorizer.py to get Xtrain and Ytrain pickle files execute model.py to train the model and save it in trained_model.py write your text in Input_text.txt (limited to one text at a time for now) execute predict.py and observe output on terminal.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              Named-Entity-Recognizer has a low active ecosystem.
              It has 0 star(s) with 0 fork(s). There are 1 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              Named-Entity-Recognizer has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of Named-Entity-Recognizer is current.

            kandi-Quality Quality

              Named-Entity-Recognizer has no bugs reported.

            kandi-Security Security

              Named-Entity-Recognizer has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              Named-Entity-Recognizer does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              Named-Entity-Recognizer releases are not available. You will need to build from source code and install.
              Named-Entity-Recognizer has no build file. You will be need to create the build yourself to build the component from source.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Named-Entity-Recognizer
            Get all kandi verified functions for this library.

            Named-Entity-Recognizer Key Features

            No Key Features are available at this moment for Named-Entity-Recognizer.

            Named-Entity-Recognizer Examples and Code Snippets

            No Code Snippets are available at this moment for Named-Entity-Recognizer.

            Community Discussions

            No Community Discussions are available at this moment for Named-Entity-Recognizer.Refer to stack overflow page for discussions.

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install Named-Entity-Recognizer

            You can download it from GitHub.
            You can use Named-Entity-Recognizer like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/adityarai7297/Named-Entity-Recognizer.git

          • CLI

            gh repo clone adityarai7297/Named-Entity-Recognizer

          • sshUrl

            git@github.com:adityarai7297/Named-Entity-Recognizer.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link