Javier Lara

  • My Posts
  • Archive
  • RSS
  • Ask me anything

The importance of math for software engineering

The other day I had the chance to attend a presentation where Peter Novig showed everyone just how important is math for someone who wants to be a really great Software Engineer.

In his presentation he mentioned an example of a Word Segmentation Program. The main function of this program is to figure out “where the word boundaries are”. This program is useful for spelling corrections, and is more notoriously used in Google Search Suggestions.

Ex.: If you input “thisisatest”. The expected result of the program is “this is a test”

Norvig showed everyone how one programmer had tackled the problem by coming up with a solution that was made up of —over 2,000 lines of code. It included all the rules of grammar in the English language. Indeed, this solution was an extremely accurate Word Segmenter.

However, Norvig explained everyone how he tackled the Word Segmenter problem in a much easier way, using math. To summarize it: he defined a probabilistic model that looks up all possible segmentations of a given text, and the likelihood of its existence in a trillion word data-set. The program enumerates the most probable solution candidates, and chooses the one with the highest probability.

Norvig’s program was written in just a little over 30 lines of code and achieved a similar accuracy as the 2,000 line solution. And best of all, if you wanted to make it work in other languages, just get a word data-set in that other language and you are good to go.

How about that? Now ask the first programmer to make his program work in German, Spanish, … [insert_language].

Get the source code and learn more about Peter Norvig’s work on Natural Language. You can also read the chapter of his book: Beautiful Data.

    • #math
    • #programación
    • #programming
    • #software
    • #tech
    • #javier lara
  • 1 year ago
  • 3
  • Comments
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

3 Notes/ Hide

  1. porunmundomejor reblogged this from javierlara
  2. maskindg likes this
  3. javierlara posted this

Recent comments

Blog comments powered by Disqus
← Previous • Next →

Portrait/Logo

About

I am Javier Lara. Born and raised in Dominican Republic. I blog about economics, entrepreneurship, technology, innovation, and other topics I find interesting.

--

Soy Javier Lara. Dominicano. Escribo sobre economía, emprendedurismo, tecnología, innovación, y otros temas que me parecen interesantes.



Me, Elsewhere

  • @laranomics on Twitter
  • javierandreslara on Flickr
  • Linkedin Profile

Twitter

loading tweets…

Following

  • emergentfutures
  • theadventureproject
  • nycgov
  • engineeringisawesome
  • parislemon
  • infoneer-pulse
  • rulesformyunbornson
  • bijan
  • good
  • staff
  • thenextweb
  • fred-wilson
  • smarterplanet
  • littlebigdetails
  • felixsalmon
  • loganabbott
  • supplydemanded
  • blakemasters
  • startupinstitute
  • johncapecelatro
  • theeconomist
  • devbootcamp
  • disruptism
  • startupquote
  • ryandawidjan
  • gnrlassembly
  • linkeado
  • devdom

I Dig These Posts

See more →
  • Post via klinger-io
    Peter Thiel's Startup Class Notes as PDF

    Source: Vator News

    @bgmasters created an awesome series of blog posts covering his notes of Peter Thiel’s...

    Post via klinger-io
  • Post via skillshare
    Education Innovation Report

    I. The Problem

    Bringing About Innovation: Where To Start? (Huffington Post)

    How do we inject excitement...

    Post via skillshare
  • Photo via emergentfutures
    6 Ways to Anticipate the Future of Digital Behavior

    “How do we observe the future?” So began the presentation of Duane Bray, partner and head of...

    Photo via emergentfutures
  • Link via emergentfutures
    So, what are the 5 forces to creating an effective pitch? Without further adieu, here is advice for creating the perfect pitch, courtesy of Tim...
    Link via emergentfutures
  • Photo via emergentfutures

    smarterplanet:

    Stanford Professors Launch Online University Coursera - Liz Gannes - News - AllThingsD

    There seems to be something in the...

    Photo via emergentfutures
  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Copyright Javier Lara. All Rights Reserved.

Effector Theme by Pixel Union