Giter VIP home page Giter VIP logo

movie-name-extractor's Introduction

movie information extraction

code to extract movie name out of file name

step 1: regex filter 1: to remove all data in () and [] after extracting information like season no / episode no from it. Regular expressions used are:

  "/\[.*?\]|\(.*?\)/"
  "/s(\d{1,2})e(\d{1,3})|(\d{1,2})x(\d{1,3})/";

step 2: Now a movie name may look like:

Iron.Man.3.213.3D.18p

Replace the "." with " " or white space to get name like

Iron Man 3 213 3D 18p

Now the movie is of From

[name] [version] [year] [3D/2D] [resolution]

So now we need to parse this kind of name to get all information!

Parsing can be done using different regex filters

Regex 1: to identify movie part no like in Iron Man 3

/\b\d /i

Regex 2: to determine the year like Iron man 213 or Iron Man 2013

/\d{3,4}/i

Regex 3: to determine dimensions like Iron man 3D or Iron Man 3d

/[0-90]{1}d|[0-9]{1}D/i

Regex 4: to determine Resolution like Iron man 18p or Iron Man 1080p

/\d{1,4}p|\d{1,4}P/

And from this we can generate information like

  Filename: Iron.Man.3.213.3D.18p
  Title: Iron Man 3
  Part: 3
  Year: 213
  Resolution: 18p
  Dimension: 3D

movie-name-extractor's People

Contributors

mebjas avatar abhinavdahiya avatar

Watchers

James Cloos avatar  avatar  avatar

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.