1 / 17

Yenta

Yenta. Kenny Rivera - Tester Becky Tang – System Architect Shylah Weber – Systems Integrator Anthony Yim – Project Manager. A Simple Recommendation Language. Definition. Yenta 1) Yiddish word which describes an old woman who is a matchmaker - a Yentle. (Ref. Fiddler on the Roof)

zanthe
Download Presentation

Yenta

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Yenta Kenny Rivera - TesterBecky Tang – System ArchitectShylah Weber – Systems IntegratorAnthony Yim – Project Manager A Simple Recommendation Language

  2. Definition Yenta 1) Yiddish word which describes an old woman who is a matchmaker - a Yentle. (Ref. Fiddler on the Roof) 2) In modern use the meaning has become that of an annoying old hag. (http://www.urbandictionary.com)

  3. Motivation Recommendation engines are becoming increasingly popular We wanted to make recommendations: • Fast • Simple to program • Flexible in content

  4. Overview Imperative language Yenta allows recommendations based on either of the following input: • A “seed” or example piece of data • A set of criteria or “tags”

  5. Syntactic Constructs • Sample Yenta program: • Built-in subroutines (3 main steps) • import(string fileName) • applyBasicScore(string tag, string tagValue, double weight, . . . ) • printTop(int n) • Java-like declarations of primitive types • file type file myMusicFile = import("music.txt"); myMusicFile.applyScore("Year", ”2006", "0.8", "Genre", "Pop", "0.2"); myMusicFile.printTop(3);

  6. Equivalent Java Code for Import() public void importFile(Stringfilename)throwsIOException{ BufferedReader in = new BufferedReader(newFileReader(filename)); BufferedReader in2 = new BufferedReader(newFileReader(filename)); String line = in.readLine(); String lineCopy = line; rows = 0; while (line != null){ rows++; line = in.readLine(); } StringTokenizerst = new StringTokenizer(lineCopy, ”\t"); cols = 0; while(st.hasMoreTokens()){ st.nextToken(); cols++; } tags = new Tag[cols]; line = in2.readLine(); StringTokenizer st3 = new StringTokenizer(line, ”\t"); for(intk = 0; (k < cols) && st3.hasMoreTokens(); k++){ tags[k] = new Tag(st3.nextToken()); tags[k].col = k; } rows--; file = new String[rows][cols]; line = in2.readLine(); inti = 0; while (line != null){ StringTokenizer st2 = new StringTokenizer(line, ”\t"); intj = 0; while(st2.hasMoreTokens()){ file[i][j] = st2.nextToken(); j++; } i++; line = in2.readLine(); } scores = new double[rows]; } Yikes!

  7. Other Syntactic Constructs • Flow control • for loops • if statements • Other types • int • double • string (seen) • scoreFunc

  8. Translator Architecture Yenta Program Main Java compiler Main.java Java interpreter Java file representing the Yenta program Java compiler Java program Java interpreter Yenta Output

  9. Translator Architecture YentaProg.txt Main Java compiler Main.java Java interpreter YentaProg.java javac Main.java java Main < YentaProg.txt javac YentaProg.java java YentaProg Java compiler YentaProg Java interpreter Yenta Output

  10. Interpreter Implementation • Wrote Java methods that are always in the output file • Our grammar simply calls these methods with the programmer’s parameters

  11. Development Environment + + +

  12. Tools ANTLR v3 • Parser + Lexer • Takes a LL(*) grammar as input. • “Spits out” tokens as output. Example ANTLR grammar

  13. Tools ANTLRWorks parse tree

  14. Tools StringTemplate example StringTemplate Outputs… Equiv. Java code that was “printed” out.

  15. The Proposed Test Suite • Unit testing • Grammar was constructed based on several programs designed to exploit key features • Advantages: • Provides strict guidelines that code must satisfy. • Unit testing finds problems early in development • Fuzz testing • Provides random data to our example programs to test for errors and inconsistencies

  16. Advantages Yenta is a simple, easy-to-use language that is: • Easy to learn • Fast to write • Concise, easy-to-read code • Can be used by beginners but also augmented by more advanced features

  17. Advantages Yenta’s primary advantage is that it can be used to recommend anything a programmer wishes (Like Columbia classes!)

More Related