Tried the Google Cloud Natural Language example. It worked nicely but I want it to be able to detect calendar events such as:
"Appointment at the Kendall Building at 800 Florida Ave NE on June 28th from 7p to 8p."
Would be nice to get the date/time categorized.
Any ideas?
Related
When I'm trying to implement the QA system with GPT-3, there is an error occurred:
openai.error.InvalidRequestError: Org org-Ilv48EJDyLWiTc2SJWjOnRaM does not have access to the answers endpoint. Reach out to deprecation#openai.com if you have any questions
My code is:
import openai
openai.api_key = "my-openai-key"
document_list = ["Google was founded in 1998 by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University in California. Together they own about 14 percent of its shares and control 56 percent of the stockholder voting power through supervoting stock. They incorporated Google as a privately held company on September 4, 1998. An initial public offering (IPO) took place on August 19, 2004, and Google moved to its headquarters in Mountain View, California, nicknamed the Googleplex. In August 2015, Google announced plans to reorganize its various interests as a conglomerate called Alphabet Inc. Google is Alphabet's leading subsidiary and will continue to be the umbrella company for Alphabet's Internet interests. Sundar Pichai was appointed CEO of Google, replacing Larry Page who became the CEO of Alphabet.",
"Amazon is an American multinational technology company based in Seattle, Washington, which focuses on e-commerce, cloud computing, digital streaming, and artificial intelligence. It is one of the Big Five companies in the U.S. information technology industry, along with Google, Apple, Microsoft, and Facebook. The company has been referred to as 'one of the most influential economic and cultural forces in the world', as well as the world's most valuable brand. Jeff Bezos founded Amazon from his garage in Bellevue, Washington on July 5, 1994. It started as an online marketplace for books but expanded to sell electronics, software, video games, apparel, furniture, food, toys, and jewelry. In 2015, Amazon surpassed Walmart as the most valuable retailer in the United States by market capitalization."]
response = openai.Answer.create(
search_model="ada",
model="curie",
question="when was google founded?",
documents=document_list,
examples_context="In 2017, U.S. life expectancy was 78.6 years.",
examples=[["What is human life expectancy in the United States?","78 years."]],
max_tokens=10,
stop=["\n", "<|endoftext|>"],
)
print(response)
where "my-openai-key" is the secret key allocated in openai's website.
I am using the Google Cloud PHP Natural Language library, but I am struggling to extract the date from a sentence. The date would be in various formats e.g.
Tomorrow at 9am
Monday 23rd of July
01-01-2018
24-01-2018
01-24-2018 (if you're not British)
I can get this working with Dialofglow, so it knows when an entity is a date and/or datetime, but for some reason with this library it cannot figure out if something is a date and/or date time
Any help would be much appreciated
You can get dates out from text on Dialogflow because this is a Natural Language Understanding service, while Cloud NL API is only a Natural Language Processing service.
This means that on Cloud NL API you can only do some types of analyses, such as Syntax Analysis, Entity Analysis, Sentiment Analysis, Entity Sentiment Analysis and Content Classification.
You may say: "Wait, then why a date is not classified as an entity?" and the answer is that it could, but it's not a feature yet released on this product. You may consider to request this feature on GCP's Issue Tracker.
Anyone have a good ide how I can create music top lists using Spotify or echonest Web API?
For example create a top 25 list of music from the 80's of the genre rock in Sweden. Or the most streamed tracks on the global market of genre pop for the year 2010.
Using the Search endpoint, you can retrieve tracks by genre within some year interval. It also accepts a market parameter, but the order is not guaranteed to be by popularity though.
https://api.spotify.com/v1/search?type=track&q=genre:pop+year:1980-2020&market=SE
This is probably as close as you can get using the Web API as it is today.
There are playlists that are updated with the most popular tracks in most (if not all) markets, although not by genre. For Sweden's Top 50, see http://open.spotify.com/user/spotify/playlist/7jmQBEvJyGHPqKEl5UcEe9.
I wanted to find out the number of check-in counts for some regions of Manhattan (eg, for each zip code), in 2 weeks, and I wanted it to be classified into 24 hours a day.
Does anyone know if it is possible and if yes how can I do that?
Only venue managers (if you own the venue) can get fine-grade check-in information via the Merchant Platform API: https://developer.foursquare.com/overview/merchants
API call/example: https://developer.foursquare.com/docs/venues/stats
Armansu asked the same question here: https://groups.google.com/forum/?fromgroups=#!topic/foursquare-api/5k6lzRwJFjA
I know that a lot of this information is probably entirely privatized, but does anyone know of a good source of real time information on what kind of trading activity is where in the market? It doesn't need to be fast enough to actually make informed trading decisions based on it, I'm more looking to aggregate it into some beautiful graphics. For fun. Because I have personal problems.
I'd be grateful for any help!
The best I'm aware of is the Yahoo Finance API. It'll give you delayed prices and some bid/ask stuff. There's a description of how it works here:
http://www.gummy-stuff.org/Yahoo-data.htm
Not sure, but I was of the opinion that Google Finance API was better than Yahoo:
http://code.google.com/apis/finance/
There was a project called OpenTick that planned on giving access to data from the exchanges themselves (eg., the Chicago Board of Trade), provided you paid the exchanges whatever fees were required. That project quietly died.
You can get some market benchmark data from the St Louis Fed. Aside from that, I haven't found anything better than Yahoo! Finance or Google Finance. Both the NASD and the NYSE give access to historical data on their websites, but I don't see any kind of web service interface.
Bloomberg open api http://www.openbloomberg.com/open-api/ which is recently made free can be used to get historical market data and also real time data. If you are looking for historical stock price there is a nice api http://www.quandl.com/ , you can get even more then 10 year old stock prices for co. in many formats.
I would have subscribed to the suggestion of the Google API, but it is not available anymore.
This post offers the best list of Financial Data accessible from R I've encountered online: http://www.r-bloggers.com/financial-data-accessible-from-r-part-iv/.
Yet this is not an R post. Beyond those sources, I would wholeheartedly recommend TD Ameritrade's Thinkorswim platform (www.thinkorswim.com). It is a trading platform with free real time data to US financial markets. You can open an account and keep just one cent on it if not needed for actual investing/trading.
Furthermore, I would recommend the Ninja Trader platform (http://ninjatrader.com), which offers free end of day historical data for US financial markets. You can export data from Ninja Trader to txt format and then import it into R or Python if so desired.