Giter VIP home page Giter VIP logo

ph-7 / free-text-search Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 2.0 571 KB

This full-text search allows users to search real estate properties (present in Daft.ie) by just speaking or typing what their want. The engine will then parse and translate the words and return the correct data.

Home Page: http://github.com/pH-7/Free-Text-Search

License: Other

PHP 77.28% CSS 15.25% JavaScript 7.47%
speech property freetext free-text-search free-text-searching listings property-listings api soap php

free-text-search's Introduction

Simple Free Text Property Search

Description

Free Text Search Engine for the Irish Estate Properties using the Daft.ie API.

The Engine translates what the user are looking for and transforms the input string into a string requests and then will send that request to the Daft.ie API.

The script also offers the voice speech recognition thanks HTML5 & JavaScript speech-input.

In this script, I use:

  • PSR0 to PSR4 coding standards
  • Formatted/documented code
  • DRY (Don't Repeat Yourself) principle
  • OOP code (including PHP Interfaces & Traits (PHP 5.4 specification)
  • spl_autoload_register (which is very useful with PHP namespaces)
  • View/Controller pattern
  • Singleton pattern (even if not necessary...)
  • PHP alternative syntax for the template (which makes the visibility easier)
  • Class member access on instantiation (PHP >= 5.4)
  • Short Array syntax (PHP >= 5.4)
  • Using SOAPClient

Search Query Examples

  • 2 or 3 bed to rent between 1000 and 2000
  • 3 bedrooms to buy in Dublin
  • 2 or 3 beds apartment to rent in Cork around 400 and 600 euro
  • 4 bedroom house to let in Galway for 1000 around 900 and 14000 per month

Specification

  • Search Type (Rental/Sale)
  • Price (Min-Max)
  • Bedroom (Min-Max)
  • Property Types (house, apartment, site)
  • House Types (terraced, semi-detached, detached, end-of-terrace, townhouse)
  • Retrieve Areas from the API
  • Retrieve Counties from the API
  • Each search term has its own Class and is getting back by the "Parser" class and included by spl_autoload_register() SPL function
  • HTML5 speech-input search
  • Displayed the property results thanks to Daft's API

Other Coding Convention

In addition of using the PSR and PHP Pear, I use my own for the naming of the variables

Here are the variable prefixes:

  • a = Array
  • i = Integer
  • f = Float, Double
  • b = Boolean
  • s = String
  • o = Object
  • m = Mixed
  • r = Resource
  • c = 1 Character (I used only sometime that, as char is not a PHP valid type)

Following the "letter type lower case, the variable name is in UpperCamelCase (e.g., $aMyVariable)

Server Requirements of the Web App

Application Server PHP 5.4.0 or higher.

PHP Extension SOAPClient

Other Requirements

About Me

I'm Pierre-Henry Soria, IT developer and passionate about e-businesses and marketing.

Where to contact me?

You can by email at pierrehenrysoria [[AT]] gmail [[D0T]] com

License

The script is under Creative Commons Attribution 3.0 license or later; See the LICENSE.txt file.

free-text-search's People

Contributors

ph-7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

rezox qidouhai

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.